From 434802341e36ada35eeec4e60147a502bd20f910 Mon Sep 17 00:00:00 2001 From: Shadab Zafar Date: Wed, 20 May 2015 00:17:55 +0530 Subject: [PATCH 1/4] jq is a command line json processor Here is the awesome manual: http://stedolan.github.io/jq/manual/ --- cheat/cheatsheets/jq | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 cheat/cheatsheets/jq 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:]' From 889c8ef8fe839845aa20eef4d693dc20ebabc6b7 Mon Sep 17 00:00:00 2001 From: Shadab Zafar Date: Wed, 20 May 2015 00:27:14 +0530 Subject: [PATCH 2/4] Added two funky git cheats! --- cheat/cheatsheets/git | 6 ++++++ 1 file changed, 6 insertions(+) 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 From 33f0dc346b52f66e246aa0fa3b904636d479c3eb Mon Sep 17 00:00:00 2001 From: Shadab Zafar Date: Wed, 20 May 2015 00:53:24 +0530 Subject: [PATCH 3/4] jrnl is an application to store your life journal ...in plain text files https://github.com/maebert/jrnl --- cheat/cheatsheets/jrnl | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 cheat/cheatsheets/jrnl 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" From 820de5dba81b90da5a57d6bfbe3aa6d09cbfd71f Mon Sep 17 00:00:00 2001 From: Shadab Zafar Date: Wed, 20 May 2015 00:58:39 +0530 Subject: [PATCH 4/4] Add Image syntax to markdown --- cheat/cheatsheets/markdown | 3 +++ 1 file changed, 3 insertions(+) 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_