diff --git a/tldr/git-blame b/tldr/git-blame index fb33481c..503179f5 100644 --- a/tldr/git-blame +++ b/tldr/git-blame @@ -23,3 +23,11 @@ source: https://github.com/tldr-pages/tldr.git - Print file with author name and commit hash on each line before a specific commit: `git blame {{commit}}~ {{path/to/file}}` + +- Print author name and commit hash information for a specific line range: + +`git blame -L {{start_line}},{{end_line}} {{path/to/file}}` + +- Ignore whitespaces and line moves: + +`git blame -w -C -C -C {{path/to/file}}` diff --git a/tldr/git-config b/tldr/git-config index 590a2d04..2f4d61dd 100644 --- a/tldr/git-config +++ b/tldr/git-config @@ -13,25 +13,25 @@ source: https://github.com/tldr-pages/tldr.git `git config --global {{user.name|user.email}} "{{Your Name|email@example.com}}"` -- List local or global configuration entries: +- List local, global or system configuration entries and show their file location: -`git config --list --{{local|global}}` +`git config --list --{{local|global|system}} --show-origin` -- List only system configuration entries (stored in `/etc/gitconfig`), and show their file location: +- Set the global value of a given configuration entry (in this case an alias): -`git config --list --system --show-origin` +`git config --global {{alias.unstage}} "reset HEAD --"` - Get the value of a given configuration entry: -`git config alias.unstage` +`git config {{alias.unstage}}` -- Set the global value of a given configuration entry: +- Use an alias: -`git config --global alias.unstage "reset HEAD --"` +`git {{unstage}}` - Revert a global configuration entry to its default value: -`git config --global --unset alias.unstage` +`git config --global --unset {{alias.unstage}}` - Edit the local Git configuration (`.git/config`) in the default editor: diff --git a/tldr/git-maintenance b/tldr/git-maintenance index 3ee96c46..7f79d25f 100644 --- a/tldr/git-maintenance +++ b/tldr/git-maintenance @@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git `git maintenance register` -- Start running maintenance on the current repository: +- Schedule maintenance tasks on the current repository every hour: `git maintenance start` diff --git a/tldr/gprof b/tldr/gprof index e2330657..829eef53 100644 --- a/tldr/gprof +++ b/tldr/gprof @@ -9,14 +9,18 @@ source: https://github.com/tldr-pages/tldr.git > It profiles the function executions of a program. > More information: . -- Compile binary with gprof information and run it to get `gmon.out`: +- Compile binary to default `a.out` with gprof information and run it to get `gmon.out`: -`gcc -pg {{program.c}} && {{./a.out}}` +`gcc -pg {{program.c}} && ./a.out` -- Run gprof to obtain profile output: +- Run gprof on default `a.out` and `gmon.out` to obtain profile output: `gprof` +- Run gprof on a named binary: + +`gprof {{path/to/binary}} {{path/to/gmon.out}}` + - Suppress profile field's description: `gprof -b` diff --git a/tldr/lame b/tldr/lame new file mode 100644 index 00000000..c8749484 --- /dev/null +++ b/tldr/lame @@ -0,0 +1,21 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# lame + +> Encode WAV to MP3 files. +> More information: . + +- Encode an audio file to MP3 using CBR 320 kbit/second: + +`lame -b 320 {{path/to/file}}.wav {{path/to/output}}.mp3` + +- Encode an audio file to MP3 using the V0 preset: + +`lame -V 0 {{path/to/file}}.wav {{path/to/output}}.mp3` + +- Encode an audio file to AAC: + +`lame {{path/to/file}}.wav {{path/to/output}}.aac`