diff --git a/cheat/cheatsheets/git b/cheat/cheatsheets/git index a31f4de..c52df05 100644 --- a/cheat/cheatsheets/git +++ b/cheat/cheatsheets/git @@ -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 | git am -3 -k diff --git a/cheat/cheatsheets/jq b/cheat/cheatsheets/jq new file mode 100644 index 0000000..d57cc13 --- /dev/null +++ b/cheat/cheatsheets/jq @@ -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:]' diff --git a/cheat/cheatsheets/jrnl b/cheat/cheatsheets/jrnl new file mode 100644 index 0000000..c3540e2 --- /dev/null +++ b/cheat/cheatsheets/jrnl @@ -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" diff --git a/cheat/cheatsheets/markdown b/cheat/cheatsheets/markdown index 8b551a6..917fcf1 100644 --- a/cheat/cheatsheets/markdown +++ b/cheat/cheatsheets/markdown @@ -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_