Skip to content

Commit

Permalink
Simplify generation process to keep common commands in separate Go file
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed Nov 27, 2019
1 parent d2316b3 commit d8ecc94
Show file tree
Hide file tree
Showing 3,882 changed files with 496 additions and 93,913 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 1 addition & 3 deletions data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ rm -fr data
mkdir data
curl -sSL https://github.com/tldr-pages/tldr/raw/master/LICENSE.md -o LICENSE-tldr-pages
curl -sSL https://github.com/tldr-pages/tldr/archive/master.tar.gz | tar --transform 's/\.md//' -xz --directory data tldr-master/pages/ --strip-components=2
cp -n data/common/* data/linux/
cp -n data/common/* data/osx/
cp -n data/common/* data/windows/
cd "$cwd"/data/common && go run 4d63.com/embedfiles -out ../../data_common.go -file-names-var commonFileNames -files-var commonFiles .
cd "$cwd"/data/linux && go run 4d63.com/embedfiles -out ../../data_linux.go .
cd "$cwd"/data/osx && go run 4d63.com/embedfiles -out ../../data_darwin.go .
cd "$cwd"/data/windows && go run 4d63.com/embedfiles -out ../../data_windows.go .
21 changes: 21 additions & 0 deletions data/common/csvkit
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# csvkit

> Manipulation toolkit for CSV files.
> See the individual commands: `csvclean`, `csvcut`, `csvformat`, `csvgrep`, `csvlook`, `csvpy`, `csvsort`, `csvstat`.
> More information: <https://csvkit.readthedocs.io/en/0.9.1/cli.html>.

- Run a command on a CSV file with a custom delimiter:

`{{cmd}} -d {{delimiter}} {{filename.csv}}`

- Run a command on a CSV file with a tab as a delimiter (overrides -d):

`{{cmd}} -t {{filename.csv}}`

- Run a command on a CSV file with a custom quote character:

`{{cmd}} -q {{quote_char}} {{filename.csv}}`

- Run a command on a CSV file with no header row:

`{{cmd}} -H {{filename.csv}}`
File renamed without changes.
4 changes: 4 additions & 0 deletions data/common/git-show
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@
- Show a commit's hash and message in a single line, suppressing the diff output:

`git show --oneline -s {{commit}}`

- Show the contents of a file as it was at a given revision (e.g. branch, tag or commit):

`git show {{revision}}:{{path/to/file}}`
7 changes: 6 additions & 1 deletion data/common/git-status
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# git status

> Show the index (changed files).
> Show the changes to files in a git repository.
> Lists changed, added and deleted files compared to the currently checked-out commit.
> More information: <https://git-scm.com/docs/git-status>.

- Show changed files which are not yet added for commit:
Expand All @@ -10,3 +11,7 @@
- Give output in short format:

`git status -s`

- Don't show untracked files in the output:

`git status --untracked-files=no`
24 changes: 24 additions & 0 deletions data/common/pprof
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# pprof

> Command-line tool for visualization and analysis of profile data.
> More information: <https://github.com/google/pprof>.

- Generate a text report from a specific profiling file, on fibbo binary:

`pprof -top {{./fibbo}} {{./fibbo-profile.pb.gz}}`

- Generate a graph and open it on a web browser:

`pprof -svg {{./fibbo}} {{./fibbo-profile.pb.gz}}`

- Run pprof in interactive mode to be able to manually launch `pprof` on a file:

`pprof {{./fibbo}} {{./fibbo-profile.pb.gz}}`

- Run a web server that serves a web interface on top of `pprof`:

`pprof -http={{localhost:8080}} {{./fibbo}} {{./fibbo-profile.pb.gz}}`

- Fetch a profile from an HTTP server and generate a report:

`pprof {{http://localhost:8080/debug/pprof}}`
36 changes: 0 additions & 36 deletions data/linux/7z

This file was deleted.

25 changes: 0 additions & 25 deletions data/linux/7za

This file was deleted.

17 changes: 0 additions & 17 deletions data/linux/7zr

This file was deleted.

16 changes: 0 additions & 16 deletions data/linux/aapt

This file was deleted.

20 changes: 0 additions & 20 deletions data/linux/ab

This file was deleted.

24 changes: 0 additions & 24 deletions data/linux/abduco

This file was deleted.

24 changes: 0 additions & 24 deletions data/linux/ack

This file was deleted.

28 changes: 0 additions & 28 deletions data/linux/act

This file was deleted.

32 changes: 0 additions & 32 deletions data/linux/adb

This file was deleted.

32 changes: 0 additions & 32 deletions data/linux/ag

This file was deleted.

23 changes: 0 additions & 23 deletions data/linux/airpaste

This file was deleted.

24 changes: 0 additions & 24 deletions data/linux/alacritty

This file was deleted.

Loading

0 comments on commit d8ecc94

Please sign in to comment.