1.5.46 • Published 2 years ago

30s v1.5.46

Weekly downloads
38
License
CC0-1.0
Repository
github
Last release
2 years ago

30s

A command-line application for 30 seconds of code snippets.

NPM build status codecov dependabot status semantic-release license

Demo

Features

  • Written in JavaScript (ES6)
  • View, view by tag and search snippets
  • Show what you find necessary by picking a layout
  • Colorful output or JSON
  • Copy all code to clipboard
  • Automatically updates with new snippet changes
  • Works on Linux, Mac and Windows

Installation

Pick one of the following options to install the command-line application:

Option 1: NPM / Yarn

npm install -g 30s
yarn add -g 30s

Option 2: Source

$ git clone git@github.com:sQVe/30s.git
$ cd 30s/
$ npm install
$ node lib/index.js <command> <query>

Usage

Commands

Short versionLong versionDescription
rrandomView random snippet
ssearchFuzzy search (RegExp) snippets by id
ttagView snippets by tag
vviewView snippet with id
*View snippet with id

Options

Short versionLong versionDescription
-c--cpCopy snippet code to clipboard
-j--jsonPrint output in JSON format
-l--layoutPrint output with specified layout (default: "itced")
-h--helpOutput usage information
Layout
Layout keyDescription
iOutput snippet id
tOutput snippet tags
cOutput snippet code
eOutput snippet examples
dOutput snippet description

Examples

ExampleDescription
30s headView snippet with id head
30s v headView snippet with id head
30s view headView snippet with id head
30s rView random snippet
30s randomView random snippet
30s t arrayView snippets by tag array
30s tag arrayView snippets by tag array
30s s allFind all snippets with an id that contains all
30s search allFind all snippets with an id that contains all
30s view merge --cpView snippet with id merge and copy its code
30s view merge --jsonView snippet with id merge and output as JSON
30s search all --layout ceFind all snippets with an id that contains all and output code and example

Contributing

Bug reports & feature requests

Please use the issue tracker to report bugs or file feature requests.

Developing

Pull requests are more than welcome. Do the following to start helping out:

  1. Fork this repository to your own GitHub account and then clone it to your local device.
  2. Run npm install in the created directory to install all necessary dependencies.

Optional steps:

  1. Uninstall 30s if it's already installed: npm uninstall -g 30s
  2. Link it to the global module directory: npm link

Style guide & conventions

Try 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.

Roadmap

See the development board for a detailed development roadmap. Below are a short outline of important improvements:

  • Autocomplete with omelette
  • Replace commander with basic yargs and own logic

Thanks

A big thank you to the core team and all the contributers at 30-seconds-of-code for creating an awesome curated collection of snippets.

License

Creative Commons License
CC0 1.0 Universal
1.5.46

2 years ago

1.5.45

3 years ago

1.5.43

3 years ago

1.5.44

3 years ago

1.5.42

3 years ago

1.5.41

3 years ago

1.5.40

3 years ago

1.5.39

3 years ago

1.5.38

3 years ago

1.5.37

3 years ago

1.5.36

3 years ago

1.5.35

3 years ago

1.5.34

3 years ago

1.5.33

3 years ago

1.5.32

3 years ago

1.5.31

3 years ago

1.5.30

3 years ago

1.5.29

3 years ago

1.5.28

3 years ago

1.5.27

3 years ago

1.5.26

3 years ago

1.5.25

3 years ago

1.5.24

3 years ago

1.5.23

3 years ago

1.5.22

3 years ago

1.5.21

3 years ago

1.5.20

3 years ago

1.5.19

4 years ago

1.5.18

4 years ago

1.5.17

4 years ago

1.5.16

4 years ago

1.5.15

4 years ago

1.5.14

4 years ago

1.5.13

4 years ago

1.5.12

4 years ago

1.5.11

4 years ago

1.5.10

4 years ago

1.5.9

4 years ago

1.5.8

4 years ago

1.5.7

4 years ago

1.5.6

4 years ago

1.5.5

4 years ago

1.5.4

4 years ago

1.5.3

4 years ago

1.5.2

4 years ago

1.5.1

4 years ago

1.5.0

4 years ago

1.4.51

4 years ago

1.4.50

4 years ago

1.4.49

4 years ago

1.4.48

4 years ago

1.4.47

4 years ago

1.4.46

4 years ago

1.4.45

4 years ago

1.4.44

4 years ago

1.4.43

4 years ago

1.4.42

4 years ago

1.4.41

4 years ago

1.4.40

4 years ago

1.4.39

4 years ago

1.4.38

4 years ago

1.4.37

4 years ago

1.4.36

4 years ago

1.4.35

4 years ago

1.4.34

4 years ago

1.4.33

4 years ago

1.4.32

4 years ago

1.4.31

4 years ago

1.4.30

4 years ago

1.4.29

4 years ago

1.4.28

4 years ago

1.4.27

4 years ago

1.4.26

4 years ago

1.4.25

4 years ago

1.4.24

4 years ago

1.4.23

4 years ago

1.4.22

4 years ago

1.4.21

4 years ago

1.4.20

4 years ago

1.4.19

5 years ago

1.4.18

5 years ago

1.4.17

5 years ago

1.4.16

5 years ago

1.4.15

5 years ago

1.4.14

5 years ago

1.4.13

5 years ago

1.4.12

5 years ago

1.4.11

5 years ago

1.4.10

5 years ago

1.4.9

5 years ago

1.4.8

5 years ago

1.4.7

5 years ago

1.4.6

5 years ago

1.4.5

5 years ago

1.4.4

5 years ago

1.4.3

5 years ago

1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.7

5 years ago

1.3.6

5 years ago

1.3.5

5 years ago

1.3.4

5 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.8

5 years ago

1.2.7

5 years ago

1.2.6

5 years ago

1.2.5

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.1.0

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.1.15

5 years ago

0.1.14

5 years ago

0.1.13

5 years ago

0.1.12

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago