mirror of
https://github.com/cheat/cheat.git
synced 2024-11-16 00:48:29 +01:00
Merge pull request #220 from dufferzafar/sheets
Added jq, jrnl sheets. Updated Git and Markdown.
This commit is contained in:
commit
6ca560c1b7
4 changed files with 47 additions and 0 deletions
|
@ -51,3 +51,9 @@ git show 83fb499:path/fo/file.ext # Shows the file as it a
|
|||
git diff branch_1 branch_2 # Check difference between branches
|
||||
git log # Show all the commits
|
||||
git status # Show the changes from last commit
|
||||
|
||||
# Commit history of a set of files
|
||||
git log --pretty=email --patch-with-stat --reverse --full-index -- Admin\*.py > Sripts.patch
|
||||
|
||||
# Import commits from another repo
|
||||
git --git-dir=../some_other_repo/.git format-patch -k -1 --stdout <commit SHA> | git am -3 -k
|
||||
|
|
13
cheat/cheatsheets/jq
Normal file
13
cheat/cheatsheets/jq
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Pretty print the json
|
||||
jq "." < filename.json
|
||||
|
||||
# Access the value at key "foo"
|
||||
jq '.foo'
|
||||
|
||||
# Access first list item
|
||||
jq '.[0]'
|
||||
|
||||
# Slice & Dice
|
||||
jq '.[2:4]'
|
||||
jq '.[:3]'
|
||||
jq '.[-2:]'
|
25
cheat/cheatsheets/jrnl
Normal file
25
cheat/cheatsheets/jrnl
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Add entry to default jrnl (from your configured text editor)
|
||||
jrnl
|
||||
|
||||
# Add entry to default jrnl
|
||||
jrnl Write entry here.
|
||||
|
||||
# List of tags
|
||||
jrnl --tags
|
||||
|
||||
# Entries per tag
|
||||
jrnl @tag
|
||||
|
||||
# Export jrnl as json
|
||||
jrnl --export json
|
||||
|
||||
# Entries in a timeframe
|
||||
jrnl -from 2009 -until may
|
||||
|
||||
# Add Sublime text to .jrnl_config
|
||||
|
||||
# Windows
|
||||
"editor": "F:\\Powerpack\\Sublime\\sublime_text.exe -w"
|
||||
|
||||
# Linux
|
||||
"editor": "/usr/bin/sublime -w"
|
|
@ -35,6 +35,9 @@ ___
|
|||
# links
|
||||
This is [an example](http://example.com "Title") inline link.
|
||||
|
||||
# image
|
||||
![Alt Text](/path/to/file.png)
|
||||
|
||||
# emphasis
|
||||
*em* _em_
|
||||
|
||||
|
|
Loading…
Reference in a new issue