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 19, 2017
1 parent d5743a0 commit 2999197
Show file tree
Hide file tree
Showing 224 changed files with 3,828 additions and 287 deletions.
4 changes: 4 additions & 0 deletions data/common/code
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@
- Open a file or directory in VS Code:

`code {{path/to/file_or_folder}}`

- Open a file or directory in the currently open VS Code window:

`code --reuse-window {{path/to/file_or_folder}}`
19 changes: 19 additions & 0 deletions data/common/cppclean
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# cppclean

> Find unused code in C++ projects.

- Run in a project's folder:

`cppclean {{path/to/project}}`

- Run on a project where the headers are in the "inc1/" and "inc2/" folders:

`cppclean {{path/to/project}} --include-path={{inc1}} --include-path={{inc2}}`

- Run on a specific file "main.cpp":

`cppclean {{main.cpp}}`

- Run on the current directory, excluding the "build" directory:

`cppclean {{.}} --exclude={{build}}`
23 changes: 23 additions & 0 deletions data/common/dc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# dc

> An arbitrary precision calculator. Uses reverse polish notation (RPN).

- Run calculator in interactive mode:

`dc`

- Execute dc script in file:

`dc -f {{file}}`

- Calculate 4 times 5 [4 5 *], subtract 17 [17 -], and [p]rint the output (using echo):

`echo "4 5 * 17 - p"| dc`

- Set number of decimal places to 7 [7 k], calculate 5 divided by -3 [5 _3 /] and [p]rint (using dc -e):

`dc -e "7 k 5 _3 / p"`

- Calculate the golden ratio, phi: Set number of decimal places to 100 [100 k], square root of 5 [5 v] plus 1 [1 +], divided by 2 [2 /], and [p]rint result:

`dc -e "100 k 5 v 1 + 2 / p"`
23 changes: 23 additions & 0 deletions data/common/dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# dep

> Tool for dependency management in Go projects.

- Initialize the current directory as the root of a Go project:

`dep init`

- Install any missing dependencies (Scans Gopkg.toml and your .go files):

`dep ensure`

- Report the status of the project's dependencies:

`dep status`

- Add a dependency to the project:

`dep ensure -add {{package_url}}`

- Update the locked versions of all dependencies:

`dep ensure -update`
15 changes: 15 additions & 0 deletions data/common/doxygen
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# doxygen

> A documentation system for various programming languages.

- Generate a default template configuration file "Doxyfile":

`doxygen -g`

- Generate a template configuration file:

`doxygen -g {{path/to/config_file}}`

- Generate documentation using an existing configuration file:

`doxygen {{path/to/config_file}}`
4 changes: 4 additions & 0 deletions data/common/ember
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@

`ember build`

- Build the project in production mode:

`ember build -prod`

- Run the development server:

`ember serve`
Expand Down
23 changes: 0 additions & 23 deletions data/common/file

This file was deleted.

15 changes: 0 additions & 15 deletions data/common/fsck

This file was deleted.

2 changes: 1 addition & 1 deletion data/common/fzf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

- Start finder on running processes:

`ps axu | fzf`
`ps aux | fzf`

- Select multiple files with `Shift + Tab` and write to a file:

Expand Down
23 changes: 23 additions & 0 deletions data/common/gatsby
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# gatsby

> Static site generator for React.

- Create a new site:

`gatsby new {{site_name}}`

- Create a new site with a Gatsby 'starter':

`gatsby new {{site_name}} {{url_of_starter_github_repo}}`

- Start a live-reloading local development server:

`gatsby develop`

- Perform a production build and generate static HTML:

`gatsby build`

- Start a local server which serves the production build:

`gatsby serve`
8 changes: 6 additions & 2 deletions data/common/git-commit
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# git commit

> Commit staged files to the repository.
> Commit files to the repository.

- Commit staged files to the repository with comment:
- Commit staged files to the repository with a message:

`git commit -m {{message}}`

- Replace the last commit with currently staged changes:

`git commit --amend`

- Auto stage all modified files and commit with a message:

`git commit -a -m {{message}}`
23 changes: 23 additions & 0 deletions data/common/git-gc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# git gc

> Optimise the local repository by cleaning unnecessary files.

- Optimise the repository:

`git gc`

- Aggressively optimise, takes more time:

`git gc --aggressive`

- Do not prune loose objects (prunes by default):

`git gc --no-prune`

- Suppress all output:

`git gc --quiet`

- View full usage:

`git gc --help`
19 changes: 19 additions & 0 deletions data/common/gofmt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# gofmt

> Tool for formatting Go source code.

- Format a file and display the result to the console:

`gofmt {{source.go}}`

- Format a file, overwriting the original file in-place:

`gofmt -w {{source.go}}`

- Format a file, and then simplify the code, overwriting the original file:

`gofmt -s -w {{source.go}}`

- Print all (including spurious) errors:

`gofmt -e {{source.go}}`
10 changes: 9 additions & 1 deletion data/common/gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
# gradle

> Gradle is the official build system for Android Studio.
> Gradle is an advanced open source build automation system.

- Compile a package:

`gradle build`

- Exclude test task:

`gradle build -x {{test}}`

- Run in offline mode to prevent gradle from accessing the network during builds:

`gradle build --offline`

- Clear the build folder:

`gradle clean`
Expand Down
12 changes: 2 additions & 10 deletions data/common/grep
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,9 @@

`grep -{{C|B|A}} 3 {{search_string}} {{path/to/file}}`

- Print the count of matches instead of the matching text:
- Print file name with the corresponding line number for each match:

`grep -c {{search_string}} {{path/to/file}}`

- Print line number for each match:

`grep -n {{search_string}} {{path/to/file}}`

- Print file names with matches:

`grep -l {{search_string}} {{path/to/file}}`
`grep -Hn {{search_string}} {{path/to/file}}`

- Use the standard input instead of a file:

Expand Down
20 changes: 20 additions & 0 deletions data/common/hg
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# hg

> A command line interface for Mercurial, a distributed source control management system.
> See the `hg-add` and `hg-commit` pages for additional information.

- Execute Mercurial command:

`hg {{command}}`

- Call general help:

`hg help`

- Call help on a command:

`hg help {{command}}`

- Check the Mercurial version:

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

> Adds specified files to the staging area for the next commit in Mercurial.

- Add files or directories to the staging area:

`hg add {{path/to/file}}`

- Add all unstaged files matching a specified pattern:

`hg add --include {{pattern}}`

- Add all unstaged files, excluding those that match a specified pattern:

`hg add --exclude {{pattern}}`

- Recursively add sub-repositories:

`hg add --subrepos`

- Perform a test-run without performing any actions:

`hg add --dry-run`
27 changes: 27 additions & 0 deletions data/common/hg-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# hg commit

> Commit all staged or specified files to the repository.

- Commit staged files to the repository:

`hg commit`

- Commit a specific file or directory:

`hg commit {{path/to/file}}`

- Commit with a specific message:

`hg commit --message {{message}}`

- Commit all files matching a specified pattern:

`hg commit --include {{pattern}}`

- Commit all files, excluding those that match a specified pattern:

`hg commit --exclude {{pattern}}`

- Commit using the interactive mode:

`hg commit --interactive`
19 changes: 19 additions & 0 deletions data/common/ignite
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# ignite

> A CLI for React Native boilerplates, plugins, generators, and more.

- Create a new React Native project:

`ignite new {{project_name}}`

- Generate file from a plugin:

`ignite generate {{plugin_name}} {{file_name}}`

- Add an Ignite plugin to the project:

`ignite add {{plugin_name}}`

- Remove an Ignite plugin from the project:

`ignite remove {{plugin_name}}`
Loading

0 comments on commit 2999197

Please sign in to comment.