Skip to content

Commit

Permalink
Update data files
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed Dec 1, 2017
1 parent 80ac874 commit 769ad31
Show file tree
Hide file tree
Showing 64 changed files with 1,054 additions and 30 deletions.
4 changes: 4 additions & 0 deletions data/common/chmod
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@
- Give [o]thers (not in the file owner's group) the same rights as the group:

`chmod o=g {{file}}`

- Change permissions recursively giving [g]roup and [o]thers the abililty to [w]rite:

`chmod -R g+w,o+w {{directory}}`
27 changes: 27 additions & 0 deletions data/common/csslint
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# csslint

> A linter for CSS code.

- Lint a single CSS file:

`csslint {{file.css}}`

- Lint multiple CSS files:

`csslint {{file1.css}} {{file2.css}} {{file3.css}}`

- List all possible style rules:

`csslint --list-rules`

- Specify certain rules as errors (which result in a non-zero exit code):

`csslint --errors={{errors,universal-selector,imports}} {{file.css}}`

- Specify certain rules as warnings:

`csslint --warnings={{box-sizing,selector-max,floats}} {{file.css}}`

- Specify certain rules to completely ignore:

`csslint --ignore={{ids,rules-count,shorthand}} {{file.css}}`
20 changes: 20 additions & 0 deletions data/common/g++
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# gplusplus

> Compiles C++ source files.
> Part of GCC (GNU Compiler Collection).

- Compile a source code file into an executable binary:

`g++ {{source.cpp}} -o {{output_executable}}`

- Display (almost) all errors and warnings:

`g++ {{source.cpp}} -Wall -o {{output_executable}}`

- Choose a language standard to compile for(C++98/C++11/C++14/C++17):

`g++ {{source.cpp}} -std={{language_standard}} -o {{output_executable}}`

- Include libraries located at a different path than the source file:

`g++ {{source.cpp}} -o {{output_executable}} -I{{header_path}} -L{{library_path}} -l{{library_name}}`
15 changes: 15 additions & 0 deletions data/common/protoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# protoc

> Parse Google Protobuf `.proto` files and generate output in the specified language.

- Generate Python code from a `.proto` file:

`protoc --python_out={{path/to/output_directory}} {{input_file.proto}}`

- Generate Java code from a `.proto` file that imports other `.proto` files:

`protoc --java_out={{path/to/output_directory}} --proto_path={{path/to/import_search_path}} {{input_file.proto}}`

- Generate code for multiple languages:

`protoc --csharp_out={{path/to/c#_output_directory}} --js_out={{path/to/js_output_directory}} {{input_file.proto}}`
23 changes: 23 additions & 0 deletions data/common/pycodestyle
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# pycodestyle

> A tool to check Python code against PEP 8 style conventions.

- Check the style of a single file:

`pycodestyle {{file.py}}`

- Check the style of multiple files:

`pycodestyle {{file1.py}} {{file2.py}} {{file3.py}}`

- Show only the first occurrence of an error:

`pycodestyle --first {{file.py}}`

- Show the source code for each error:

`pycodestyle --show-source {{file.py}}`

- Show the specific PEP 8 text for each error:

`pycodestyle --show-pep8 {{file.py}}`
23 changes: 23 additions & 0 deletions data/common/rails
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# rails

> A server-side MVC framework written in Ruby.

- Create a new rails project:

`rails new "{{project_name}}"`

- Start local server for current project on port 3000:

`rails server`

- Start local server for current project on a specified port:

`rails server -p "{{port}}"`

- Open console to interact with application from command line:

`rails console`

- Check current version of rails:

`rails --version`
23 changes: 23 additions & 0 deletions data/common/ruby
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# ruby

> Ruby programming language interpreter.

- Open an Interactive Ruby Shell (REPL):

`irb`

- Execute a Ruby script:

`ruby {{script.rb}}`

- Execute a single Ruby command in the command line:

`ruby -e {{command}}`

- Check for syntax errors on a given Ruby script:

`ruby -c {{script.rb}}`

- Show the version of Ruby you are using:

`ruby -v`
24 changes: 24 additions & 0 deletions data/common/rustup
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# rustup

> Rust toolchain installer.
> Install, manage, and update Rust toolchains.

- Install the nightly toolchain for your system:

`rustup install nightly`

- Switch the default toolchain to nightly so that the `cargo` and `rustc` commands will use it:

`rustup default nightly`

- Update all toolchains:

`rustup update`

- List installed toolchains:

`rustup show`

- Run cargo build with a certain toolchain:

`rustup run {{toolchain_name}} cargo build`
4 changes: 4 additions & 0 deletions data/common/sudo
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@
- Repeat the last command as sudo:

`sudo !!`

- Launch the default shell with root privileges:

`sudo -i`
19 changes: 19 additions & 0 deletions data/common/surge
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# surge

> Simple command line web publishing.

- Upload a new site to surge.sh:

`surge {{path/to/my_project}}`

- Deploy site to custom domain (note that the DNS records must point to the surge.sh subdomain):

`surge {{path/to/my_project}} {{my_custom_domain.com}}`

- List your surge projects:

`surge list`

- Remove a project:

`surge teardown {{my_custom_domain.com}}`
2 changes: 1 addition & 1 deletion data/common/zpool
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

- Show the history of all pool operations:

`zpool histrory {{pool_name}}`
`zpool history {{pool_name}}`

- Create a mirrored pool:

Expand Down
19 changes: 19 additions & 0 deletions data/linux/arp-scan
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# arp-scan

> Send ARP packets to hosts (specified as IP addresses or hostnames) to scan the local network.

- Scan the current local network:

`arp-scan --localnet`

- Scan an IP network with a custom bitmask:

`arp-scan {{192.168.1.1}}/{{24}}`

- Scan an IP network within a custom range:

`arp-scan {{127.0.0.0}}-{{127.0.0.31}}`

- Scan an IP network with a custom net mask:

`arp-scan {{10.0.0.0}}:{{255.255.255.0}}`
4 changes: 4 additions & 0 deletions data/linux/chmod
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@
- Give [o]thers (not in the file owner's group) the same rights as the group:

`chmod o=g {{file}}`

- Change permissions recursively giving [g]roup and [o]thers the abililty to [w]rite:

`chmod -R g+w,o+w {{directory}}`
27 changes: 27 additions & 0 deletions data/linux/csslint
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# csslint

> A linter for CSS code.

- Lint a single CSS file:

`csslint {{file.css}}`

- Lint multiple CSS files:

`csslint {{file1.css}} {{file2.css}} {{file3.css}}`

- List all possible style rules:

`csslint --list-rules`

- Specify certain rules as errors (which result in a non-zero exit code):

`csslint --errors={{errors,universal-selector,imports}} {{file.css}}`

- Specify certain rules as warnings:

`csslint --warnings={{box-sizing,selector-max,floats}} {{file.css}}`

- Specify certain rules to completely ignore:

`csslint --ignore={{ids,rules-count,shorthand}} {{file.css}}`
20 changes: 20 additions & 0 deletions data/linux/g++
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# gplusplus

> Compiles C++ source files.
> Part of GCC (GNU Compiler Collection).

- Compile a source code file into an executable binary:

`g++ {{source.cpp}} -o {{output_executable}}`

- Display (almost) all errors and warnings:

`g++ {{source.cpp}} -Wall -o {{output_executable}}`

- Choose a language standard to compile for(C++98/C++11/C++14/C++17):

`g++ {{source.cpp}} -std={{language_standard}} -o {{output_executable}}`

- Include libraries located at a different path than the source file:

`g++ {{source.cpp}} -o {{output_executable}} -I{{header_path}} -L{{library_path}} -l{{library_name}}`
15 changes: 15 additions & 0 deletions data/linux/protoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# protoc

> Parse Google Protobuf `.proto` files and generate output in the specified language.

- Generate Python code from a `.proto` file:

`protoc --python_out={{path/to/output_directory}} {{input_file.proto}}`

- Generate Java code from a `.proto` file that imports other `.proto` files:

`protoc --java_out={{path/to/output_directory}} --proto_path={{path/to/import_search_path}} {{input_file.proto}}`

- Generate code for multiple languages:

`protoc --csharp_out={{path/to/c#_output_directory}} --js_out={{path/to/js_output_directory}} {{input_file.proto}}`
23 changes: 23 additions & 0 deletions data/linux/pycodestyle
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# pycodestyle

> A tool to check Python code against PEP 8 style conventions.

- Check the style of a single file:

`pycodestyle {{file.py}}`

- Check the style of multiple files:

`pycodestyle {{file1.py}} {{file2.py}} {{file3.py}}`

- Show only the first occurrence of an error:

`pycodestyle --first {{file.py}}`

- Show the source code for each error:

`pycodestyle --show-source {{file.py}}`

- Show the specific PEP 8 text for each error:

`pycodestyle --show-pep8 {{file.py}}`
23 changes: 23 additions & 0 deletions data/linux/rails
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# rails

> A server-side MVC framework written in Ruby.

- Create a new rails project:

`rails new "{{project_name}}"`

- Start local server for current project on port 3000:

`rails server`

- Start local server for current project on a specified port:

`rails server -p "{{port}}"`

- Open console to interact with application from command line:

`rails console`

- Check current version of rails:

`rails --version`
19 changes: 19 additions & 0 deletions data/linux/rtorrent
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# rtorrent

> Download torrents over the command line.

- Add a torrent file or magnet to be downloaded:

`rtorrent {{torrent_or_magnet}}`

- Start the download:

`<Ctrl>S`

- View details about downloading torrent:

`->`

- Close rtorrent safely:

`<Ctrl>Q`
23 changes: 23 additions & 0 deletions data/linux/ruby
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# ruby

> Ruby programming language interpreter.

- Open an Interactive Ruby Shell (REPL):

`irb`

- Execute a Ruby script:

`ruby {{script.rb}}`

- Execute a single Ruby command in the command line:

`ruby -e {{command}}`

- Check for syntax errors on a given Ruby script:

`ruby -c {{script.rb}}`

- Show the version of Ruby you are using:

`ruby -v`
Loading

0 comments on commit 769ad31

Please sign in to comment.