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.8.0 | runtime |
@babel/runtimeEnvironment{
"local_name": "@babel/runtime",
"alias": false,
"peer_metadata": null
} | ~7.8.0 | runtime |
chalkEnvironment{
"local_name": "chalk",
"alias": false,
"peer_metadata": null
} | ~3.0.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
} | ~4.1.0 | runtime |
core-jsEnvironment{
"local_name": "core-js",
"alias": false,
"peer_metadata": null
} | ~3.6.0 | runtime |
markedEnvironment{
"local_name": "marked",
"alias": false,
"peer_metadata": null
} | ~0.8.0 | runtime |
marked-terminalEnvironment{
"local_name": "marked-terminal",
"alias": false,
"peer_metadata": null
} | ~4.0.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.8.0 | development |
@babel/coreEnvironment{
"local_name": "@babel/core",
"alias": false,
"peer_metadata": null
} | ~7.8.0 | development |
@babel/plugin-transform-runtimeEnvironment{
"local_name": "@babel/plugin-transform-runtime",
"alias": false,
"peer_metadata": null
} | ~7.8.0 | development |
@babel/preset-envEnvironment{
"local_name": "@babel/preset-env",
"alias": false,
"peer_metadata": null
} | ~7.8.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
} | ~8.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
} | ^13.0.0 | development |
@types/ramdaEnvironment{
"local_name": "@types/ramda",
"alias": false,
"peer_metadata": null
} | ^0.26.0 | development |
@typescript-eslint/eslint-pluginEnvironment{
"local_name": "@typescript-eslint/eslint-plugin",
"alias": false,
"peer_metadata": null
} | ~2.16.0 | development |
@typescript-eslint/parserEnvironment{
"local_name": "@typescript-eslint/parser",
"alias": false,
"peer_metadata": null
} | ~2.16.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.3 | development |
babel-jestEnvironment{
"local_name": "babel-jest",
"alias": false,
"peer_metadata": null
} | ~24.9.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.6.0 | development |
eslintEnvironment{
"local_name": "eslint",
"alias": false,
"peer_metadata": null
} | ~6.8.0 | development |
eslint-config-sqveEnvironment{
"local_name": "eslint-config-sqve",
"alias": false,
"peer_metadata": null
} | ~2.6.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
} | ~4.2.0 | development |
eslint-plugin-reactEnvironment{
"local_name": "eslint-plugin-react",
"alias": false,
"peer_metadata": null
} | ~7.17.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
} | ~4.0.0 | development |
jestEnvironment{
"local_name": "jest",
"alias": false,
"peer_metadata": null
} | ~24.9.0 | development |
lint-stagedEnvironment{
"local_name": "lint-staged",
"alias": false,
"peer_metadata": null
} | ~9.5.0 | development |
prettierEnvironment{
"local_name": "prettier",
"alias": false,
"peer_metadata": null
} | ~1.19.0 | development |
rollupEnvironment{
"local_name": "rollup",
"alias": false,
"peer_metadata": null
} | ~1.29.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.3.0 | development |
rollup-plugin-commonjsEnvironment{
"local_name": "rollup-plugin-commonjs",
"alias": false,
"peer_metadata": null
} | ~10.1.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
} | ~16.0.0 | development |
typescriptEnvironment{
"local_name": "typescript",
"alias": false,
"peer_metadata": null
} | ~3.7.0 | development |
Source distribution
{
"integrity": "sha512-8hnC9uro52uAFJdkfeA4bTVPCtUcG6eN1ozCd4duh5I1Up1fGkYKYm+cs9tJm/qLA+uRQE9HzVVybHPdne1Iqg==",
"shasum": "f3590f808ea809d2951168b86ff5d7364dc60cea",
"tarball": "https://registry.npmjs.org/30s/-/30s-1.4.44.tgz",
"fileCount": 6,
"unpackedSize": 271895,
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJebQTzCRA9TVsSAnZWagAAnQoP/2FG2ytzyGxWoC+3NLjL\nU4N38D6sWoZ5FrChU3W4SwSPapr3g/vlPvhgvZo5aIye3MYPw36TyhQ0rvpt\n12bsId8vEHGIGAFmZiY8MqvxZUhnablwGfhiPXlS6lGDJOvRfaDMoYDlOZEa\ndiydYI9x3YPepnbtGL5ejExIv1od39EpNdaE7EOidqHrwEveSBaGEgEGB0MI\npvvZXO3upcIXk9nUbMGrNzrVQpQn+zgsG/vFsBBOH/y1BvShXoH6BKZl/qD/\nGAlFrNhsolWHY/Ujw2xoYivxN300g2/mrJRwD0kkxKV+K3+tslj2R/S+OXXD\nHDS8H8r4LUMJ/j5VqrOdX2t9mbL8cQATq8LLjKmEmUl6wqW/AAaC6jQrd6J/\nvhConixp+MfuvB2NuNfKPbqkP/o4X0i9ZLiCD4juJL7VvPFUsesek00vxIgv\njJJ2fcs/TdzjaQJyD/CqIL4lBC2ERsssD6VkBzcm4IOBg7i2wNmHRO+XbpKb\n1QJhSm1UbnDi1DGJVGoRWPN5s8NzBw7FPcQLWX8l1NzCAIKLHEgBaiMwgYCJ\ntSMCHNb3lxb0xQcvgO9+VPHzAYmvROkkjISjrgSS8hQxfcm9aVxUJqi06lgw\nDf0IRgu5xjstO42sBwyixy1t4cJ2DLaQVN0A3a5a7Hi4pvuQWG6W3loAtf6O\nRc6i\r\n=lv8h\r\n-----END PGP SIGNATURE-----\r\n",
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEUCIQDRZkBl7544Y3658ArxaHcN19xXpdwF4rtvI3ShB0jk2QIgS+0tfTaGhzTVYrEWmf8ZmX5wrHwEQ+AhLc4SHuv8zhA="
}
]
}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:cb7ffd9b5a93d557cf7a57e946a35ff0404811e3f8ed8d8524ac8c63cf0bee6e