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/runtimeEnvironment{
"local_name": "@babel/runtime",
"alias": false,
"peer_metadata": null
} | ~7.15.0 | runtime |
chalkEnvironment{
"local_name": "chalk",
"alias": false,
"peer_metadata": null
} | ~4.1.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.3.0 | runtime |
commanderEnvironment{
"local_name": "commander",
"alias": false,
"peer_metadata": null
} | ~8.2.0 | runtime |
core-jsEnvironment{
"local_name": "core-js",
"alias": false,
"peer_metadata": null
} | ~3.18.0 | runtime |
markedEnvironment{
"local_name": "marked",
"alias": false,
"peer_metadata": null
} | ~2.0.0 | runtime |
marked-terminalEnvironment{
"local_name": "marked-terminal",
"alias": false,
"peer_metadata": null
} | ~4.2.0 | runtime |
ramdaEnvironment{
"local_name": "ramda",
"alias": false,
"peer_metadata": null
} | ~0.27.0 | runtime |
@babel/cliEnvironment{
"local_name": "@babel/cli",
"alias": false,
"peer_metadata": null
} | ^7.12.0 | development |
@babel/coreEnvironment{
"local_name": "@babel/core",
"alias": false,
"peer_metadata": null
} | ^7.12.0 | development |
@babel/plugin-transform-runtimeEnvironment{
"local_name": "@babel/plugin-transform-runtime",
"alias": false,
"peer_metadata": null
} | ^7.12.0 | development |
@babel/preset-envEnvironment{
"local_name": "@babel/preset-env",
"alias": false,
"peer_metadata": null
} | ^7.12.0 | development |
@rollup/plugin-commonjsEnvironment{
"local_name": "@rollup/plugin-commonjs",
"alias": false,
"peer_metadata": null
} | ^20.0.0 | development |
@rollup/plugin-jsonEnvironment{
"local_name": "@rollup/plugin-json",
"alias": false,
"peer_metadata": null
} | ^4.1.0 | development |
@rollup/plugin-node-resolveEnvironment{
"local_name": "@rollup/plugin-node-resolve",
"alias": false,
"peer_metadata": null
} | ^13.0.0 | development |
@semantic-release/changelogEnvironment{
"local_name": "@semantic-release/changelog",
"alias": false,
"peer_metadata": null
} | ^6.0.0 | development |
@semantic-release/gitEnvironment{
"local_name": "@semantic-release/git",
"alias": false,
"peer_metadata": null
} | ^10.0.0 | development |
@types/jestEnvironment{
"local_name": "@types/jest",
"alias": false,
"peer_metadata": null
} | ^27.0.0 | development |
@types/nodeEnvironment{
"local_name": "@types/node",
"alias": false,
"peer_metadata": null
} | ^16.0.0 | development |
@types/ramdaEnvironment{
"local_name": "@types/ramda",
"alias": false,
"peer_metadata": null
} | ^0.27.0 | development |
babel-coreEnvironment{
"local_name": "babel-core",
"alias": false,
"peer_metadata": null
} | 7.0.0-bridge.0 | development |
babel-jestEnvironment{
"local_name": "babel-jest",
"alias": false,
"peer_metadata": null
} | ^27.0.0 | development |
babel-plugin-ramdaEnvironment{
"local_name": "babel-plugin-ramda",
"alias": false,
"peer_metadata": null
} | ^2.0.0 | development |
codecovEnvironment{
"local_name": "codecov",
"alias": false,
"peer_metadata": null
} | ^3.7.0 | development |
eslintEnvironment{
"local_name": "eslint",
"alias": false,
"peer_metadata": null
} | ^7.8.0 | development |
eslint-config-sqveEnvironment{
"local_name": "eslint-config-sqve",
"alias": false,
"peer_metadata": null
} | ^3.1.0 | 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.20.0 | development |
eslint-plugin-nodeEnvironment{
"local_name": "eslint-plugin-node",
"alias": false,
"peer_metadata": null
} | ^11.0.0 | development |
eslint-plugin-promiseEnvironment{
"local_name": "eslint-plugin-promise",
"alias": false,
"peer_metadata": null
} | ^5.0.0 | development |
eslint-plugin-reactEnvironment{
"local_name": "eslint-plugin-react",
"alias": false,
"peer_metadata": null
} | ^7.18.0 | development |
huskyEnvironment{
"local_name": "husky",
"alias": false,
"peer_metadata": null
} | ^7.0.0 | development |
jestEnvironment{
"local_name": "jest",
"alias": false,
"peer_metadata": null
} | ^27.0.0 | development |
lint-stagedEnvironment{
"local_name": "lint-staged",
"alias": false,
"peer_metadata": null
} | ^11.0.0 | development |
prettierEnvironment{
"local_name": "prettier",
"alias": false,
"peer_metadata": null
} | ^2.1.0 | development |
rollupEnvironment{
"local_name": "rollup",
"alias": false,
"peer_metadata": null
} | ^2.26.0 | 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.4.0 | development |
semantic-releaseEnvironment{
"local_name": "semantic-release",
"alias": false,
"peer_metadata": null
} | ^18.0.0 | development |
Source distribution
{
"integrity": "sha512-ZCIZKtry/AuquYglLU1NN1pBFLfQl10/Rc0XCTiW+1kj0mWQtI9cQNOtmpxSPy2KgZbUTq+coJ2w7mb+q0uxdA==",
"shasum": "e95b0557d401ab432b84b7341302dbcebbb93c45",
"tarball": "https://registry.npmjs.org/30s/-/30s-1.5.46.tgz",
"fileCount": 5,
"unpackedSize": 416994,
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhkvoNCRA9TVsSAnZWagAAkHEP/ibu/I9CMBTYmR+uLQgB\n+aaZHgh4BiymNpHRkg3Y4OlfIw6o6QN9sZYwjk3Mv/tRAsD99dfDseUhEJA/\nbeiApbVqlpdXN2KwECJ8vuOd07MYyXhXkrSKTHJvd9yI7QYPtrkhJXToEfUn\nainbakiC86NPUwPdzPL3L5zUnRAkRW1+vKC7NDFgYoz+0tOp/WEWxPWK/Sr0\nT0rxnSyH2Vd/7n5MsptR2/TrmcOFIYbgM+Wupsj3ek1u1pDM2W16J1PegzD/\nj5nmbXCkHoaiiQ/6W1XCHSlF00pe1lR0XqiGzWAm2SiMKxBh5ub7Z6+wDYgA\nzV+YRgk2jlFXC9+WvdSk9b4lkHH1cKFi+2zIEyc3DcQI2K+zXQLs27eakg8d\ncGFijuLQJek1MLORJUFjVTfjwelosTxYAJr+9X9aaFFJ3EnRe9ronRCWzX01\nIpGMhw88Lktp0qC1P7/5Ji+2n1PQhBvnvQmeFSWiQ/Pm9IQ6+r/3gj/DeRPI\nexZEVL3JSPfP/gE7cp/c11/t+30T5WZc1gSxzMStkSEOiI4mUIGz7VyH7l7g\n9VjF82e963rafdwlzRoV3L2e2ua6Tj7oq0/uN4ZjuBQMzfCjjO6o+0ep4iW5\nUCvsG5nZUXxAwLMaCJIruhQY1fQNpme+kXyfFeqjmGEDZl+ntVOMLZ0GJRR8\nJjMs\r\n=mmIE\r\n-----END PGP SIGNATURE-----\r\n",
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEQCIBtLoxOD2TF/ftIH5Qah13+Pm1hTeuEjfrTcukwIAIjQAiAPoJsGFCtj+uH9N1e96fqTqYZoarTWnQPywCmqmULK9Q=="
}
]
}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:4c0380dca53ce0d26f7cff925ff38838ffab29de00833cda944843e65a2ed8ea