Observed since 20 Oct, 19:23 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
30s
A command-line application for 30 seconds of code snippets
A command-line application for 30 seconds of code snippets.

Pick one of the following options to install the command-line application:
npm install -g 30s
yarn add -g 30s
$ git clone git@github.com:sQVe/30s.git
$ cd 30s/
$ npm install
$ node lib/index.js <command> <query>
| Short version | Long version | Description |
|---|---|---|
r | random | View random snippet |
s | search | Fuzzy search (RegExp) snippets by id |
t | tag | View snippets by tag |
v | view | View snippet with id |
* | View snippet with id |
| Short version | Long version | Description |
|---|---|---|
-c | --cp | Copy snippet code to clipboard |
-j | --json | Print output in JSON format |
-l | --layout | Print output with specified layout (default: "itced") |
-h | --help | Output usage information |
| Layout key | Description |
|---|---|
i | Output snippet id |
t | Output snippet tags |
c | Output snippet code |
e | Output snippet examples |
d | Output snippet description |
| Example | Description |
|---|---|
30s head | View snippet with id head |
30s v head | View snippet with id head |
30s view head | View snippet with id head |
30s r | View random snippet |
30s random | View random snippet |
30s t array | View snippets by tag array |
30s tag array | View snippets by tag array |
30s s all | Find all snippets with an id that contains all |
30s search all | Find all snippets with an id that contains all |
30s view merge --cp | View snippet with id merge and copy its code |
30s view merge --json | View snippet with id merge and output as JSON |
30s search all --layout ce | Find all snippets with an id that contains all and output code and example |
Please use the issue tracker to report bugs or file feature requests.
Pull requests are more than welcome. Do the following to start helping out:
npm install in the created directory to install all necessary dependencies.Optional steps:
30s if it's already installed: npm uninstall -g 30snpm linkTry to follow functional programming best practices. Use pure functions and Ramda when possible.
Write commits following: Angular Commit Message Conventions. This enables us to automatically release new versions together with semantic-release on fix and feat commit types.
prettier and eslint-config-sqve (a config based on standardjs) enforces our styling and formatting. It runs automatically on pre-commit and is also checked for issues on Travis CI.
See the development board for a detailed development roadmap. Below are a short outline of important improvements:
omelettecommander with basic yargs and own logicA big thank you to the core team and all the contributers at 30-seconds-of-code for creating an awesome curated collection of snippets.
Creative Commons License
CC0 1.0 Universal
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
@babel/polyfillEnvironment{
"local_name": "@babel/polyfill",
"alias": false,
"peer_metadata": null
} | ~7.4.0 | runtime |
@babel/runtimeEnvironment{
"local_name": "@babel/runtime",
"alias": false,
"peer_metadata": null
} | ~7.5.4 | runtime |
chalkEnvironment{
"local_name": "chalk",
"alias": false,
"peer_metadata": null
} | ~2.4.0 | runtime |
cli-highlightEnvironment{
"local_name": "cli-highlight",
"alias": false,
"peer_metadata": null
} | ~2.1.0 | runtime |
clipboardyEnvironment{
"local_name": "clipboardy",
"alias": false,
"peer_metadata": null
} | ~2.1.0 | runtime |
commanderEnvironment{
"local_name": "commander",
"alias": false,
"peer_metadata": null
} | ~3.0.0 | runtime |
core-jsEnvironment{
"local_name": "core-js",
"alias": false,
"peer_metadata": null
} | ~3.2.0 | runtime |
markedEnvironment{
"local_name": "marked",
"alias": false,
"peer_metadata": null
} | ~0.7.0 | runtime |
marked-terminalEnvironment{
"local_name": "marked-terminal",
"alias": false,
"peer_metadata": null
} | ~3.3.0 | runtime |
ramdaEnvironment{
"local_name": "ramda",
"alias": false,
"peer_metadata": null
} | ~0.26.0 | runtime |
@babel/cliEnvironment{
"local_name": "@babel/cli",
"alias": false,
"peer_metadata": null
} | ~7.5.0 | development |
@babel/coreEnvironment{
"local_name": "@babel/core",
"alias": false,
"peer_metadata": null
} | ~7.5.0 | development |
@babel/plugin-transform-runtimeEnvironment{
"local_name": "@babel/plugin-transform-runtime",
"alias": false,
"peer_metadata": null
} | ~7.5.0 | development |
@babel/preset-envEnvironment{
"local_name": "@babel/preset-env",
"alias": false,
"peer_metadata": null
} | ~7.5.0 | development |
@semantic-release/changelogEnvironment{
"local_name": "@semantic-release/changelog",
"alias": false,
"peer_metadata": null
} | ~3.0.0 | development |
@semantic-release/gitEnvironment{
"local_name": "@semantic-release/git",
"alias": false,
"peer_metadata": null
} | ~7.0.0 | development |
@types/jestEnvironment{
"local_name": "@types/jest",
"alias": false,
"peer_metadata": null
} | ^24.0.0 | development |
@types/nodeEnvironment{
"local_name": "@types/node",
"alias": false,
"peer_metadata": null
} | ^12.0.0 | development |
@types/ramdaEnvironment{
"local_name": "@types/ramda",
"alias": false,
"peer_metadata": null
} | ^0.26.0 | development |
babel-coreEnvironment{
"local_name": "babel-core",
"alias": false,
"peer_metadata": null
} | 7.0.0-bridge.0 | development |
babel-eslintEnvironment{
"local_name": "babel-eslint",
"alias": false,
"peer_metadata": null
} | ~10.0.0 | development |
babel-jestEnvironment{
"local_name": "babel-jest",
"alias": false,
"peer_metadata": null
} | ~24.8.0 | development |
babel-plugin-ramdaEnvironment{
"local_name": "babel-plugin-ramda",
"alias": false,
"peer_metadata": null
} | ~2.0.0 | development |
coverallsEnvironment{
"local_name": "coveralls",
"alias": false,
"peer_metadata": null
} | ~3.0.0 | development |
eslintEnvironment{
"local_name": "eslint",
"alias": false,
"peer_metadata": null
} | ~6.0.0 | development |
eslint-config-sqveEnvironment{
"local_name": "eslint-config-sqve",
"alias": false,
"peer_metadata": null
} | ~2.2.2 | development |
eslint-plugin-fpEnvironment{
"local_name": "eslint-plugin-fp",
"alias": false,
"peer_metadata": null
} | ^2.3.0 | development |
eslint-plugin-importEnvironment{
"local_name": "eslint-plugin-import",
"alias": false,
"peer_metadata": null
} | ^2.16.0 | development |
eslint-plugin-nodeEnvironment{
"local_name": "eslint-plugin-node",
"alias": false,
"peer_metadata": null
} | ^9.0.0 | development |
eslint-plugin-promiseEnvironment{
"local_name": "eslint-plugin-promise",
"alias": false,
"peer_metadata": null
} | ^4.0.0 | development |
eslint-plugin-reactEnvironment{
"local_name": "eslint-plugin-react",
"alias": false,
"peer_metadata": null
} | ^7.12.0 | development |
eslint-plugin-standardEnvironment{
"local_name": "eslint-plugin-standard",
"alias": false,
"peer_metadata": null
} | ^4.0.0 | development |
huskyEnvironment{
"local_name": "husky",
"alias": false,
"peer_metadata": null
} | ~3.0.0 | development |
jestEnvironment{
"local_name": "jest",
"alias": false,
"peer_metadata": null
} | ~24.8.0 | development |
lint-stagedEnvironment{
"local_name": "lint-staged",
"alias": false,
"peer_metadata": null
} | ~9.2.0 | development |
prettierEnvironment{
"local_name": "prettier",
"alias": false,
"peer_metadata": null
} | ~1.18.2 | development |
prettier-eslint-cliEnvironment{
"local_name": "prettier-eslint-cli",
"alias": false,
"peer_metadata": null
} | ~5.0.0 | development |
rollupEnvironment{
"local_name": "rollup",
"alias": false,
"peer_metadata": null
} | ~1.19.4 | development |
rollup-plugin-add-shebangEnvironment{
"local_name": "rollup-plugin-add-shebang",
"alias": false,
"peer_metadata": null
} | ~0.3.0 | development |
rollup-plugin-babelEnvironment{
"local_name": "rollup-plugin-babel",
"alias": false,
"peer_metadata": null
} | ~4.3.0 | development |
rollup-plugin-commonjsEnvironment{
"local_name": "rollup-plugin-commonjs",
"alias": false,
"peer_metadata": null
} | ~10.0.0 | development |
rollup-plugin-jsonEnvironment{
"local_name": "rollup-plugin-json",
"alias": false,
"peer_metadata": null
} | ~4.0.0 | development |
rollup-plugin-node-resolveEnvironment{
"local_name": "rollup-plugin-node-resolve",
"alias": false,
"peer_metadata": null
} | ~5.2.0 | development |
semantic-releaseEnvironment{
"local_name": "semantic-release",
"alias": false,
"peer_metadata": null
} | ~15.13.0 | development |
Source distribution
{
"integrity": "sha512-t76Z2XOEjddV/jz4YZ/SOv4C4hHLlSV0Ew3NnQFEP124xuuYktjkGlG+237sYmL2Tx3X85HjGYGqGldfu99wMw==",
"shasum": "2e17f413fea6d1da8b4d49a05379767c0cdd2708",
"tarball": "https://registry.npmjs.org/30s/-/30s-1.4.5.tgz",
"fileCount": 6,
"unpackedSize": 255276,
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaTYJCRA9TVsSAnZWagAAdyEP/0QOM3wE+kbGY83WBCaW\nHVRQKHtxqMAXULcdWXkWB8b799aVsa7lNV2PlLiwfnZ5gi+UnLBYQ89cLqdC\n1L/pDQXu1H/3p3vugww6HApi9t935ff6DV4boBXCcqswSE7wxn09G8yWpi1X\n0MN64ET23Bf/kub79xGXtg3s5qsAGmQVinUrazMbTpSVsKsc+ePWOI1P8d8q\nXtF4fgnmk6Vb5YRySDcYF+A4ixtOATHrdXpY6Y73HirwIOKaClvrTjjp++MY\nmdoE6sdJHH+T0bXLgUBKuLUN6BRlq7Jr+8mdmGE6fSBriAdlfKTqCZY3C+hu\nbFHjNRBiQZG5zwNv2yUTVSAOXqG1Uz7eAprH3YwHxizeCyWvhxoL4tB+Ahif\nrcttGD2XksPa/BcQeAf5/7t/6GovA5lkedw3gNTVeVzDvqfhvxxwGm+EniAu\ngPLYjj5Vcv4sOUBMzN+rSLgiAQ88gpQHI0/Mx9S7uMZgCVm461khmn6yOLeN\nWzRJ7fLGZtBQ9mW3cx6MkBwksbpXFzB7alY4XfVGr1hpn4Hk5SFjd4A9LjCK\n1AsCdrYG7fkgJrU5FqsSCFYu+prK6WDfMkZivOhmCzO8vP7cJGljltz45C7Z\n+stDPXERgnotRzldb2J6apDfQZn4ZcM7572iGAMY6sn0UIZFiPSnMC+G3mzJ\njV2Y\r\n=6peO\r\n-----END PGP SIGNATURE-----\r\n",
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEUCIQDGLmbBook1M9MY5YwmlmauHK2aOhxxxyhSqplrK9VjRQIgc6KBBPvupJUYJZncbg6ys0C01Px7N5mMwsK4zX1StK4="
}
]
}Shared repository data · GitHub
Observed since 20 Oct, 19:23 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:2b2074fc488c282457842bfb8eeb2efddd484fa8cc96ca3e3feafcf31f2ce9bc