general:
curl <url> | python -m json.tool > <filename>
example:
<snippet> | |
<content><![CDATA[ | |
import pdb; pdb.set_trace()]]> | |
</content> | |
<scope>source.python</scope> | |
<tabTrigger>pdb</tabTrigger> | |
</snippet> |
{ | |
"url": "http://example.com/api/23/", | |
"author": 1, | |
"date_created": "2015-03-26T11:01:23.262391Z", | |
"date_updated": "2015-03-26T11:01:23.262391Z", | |
"html": "<form></form>", | |
"javascript": "<script></script>", | |
"form": { | |
"id": 123, | |
"method": "POST", |
{ | |
"url": "http://example.com/api/23/", | |
"author": 1, | |
"date_created": "2015-03-26T11:01:23.262391Z", | |
"date_updated": "2015-03-26T11:01:23.262391Z", | |
"html": "<form></form>", | |
"javascript": "<script></script>", | |
"form": { | |
"id": 123, | |
"method": "POST", |
# debug salt states: | |
`sudo salt-call state.sls <your-salt-state-to-debug> test=True` | |
git stash show -p stash@{0} |
osx
git mergetool -t opendiff
ubuntu linux
git mergetool -t meld
cat ~/.zsh_history | awk -F\; '{ print $2 }' | sort | uniq -c | sort -n
merged_branches(){ | |
local red=`tput setaf 1` | |
local green=`tput setaf 2` | |
local bold=`tput bold` | |
local reset=`tput sgr0` | |
local current_branch=$(git rev-parse --abbrev-ref HEAD) | |
for branch in $(git branch --merged | cut -c3-) | |
do | |
if [[ $branch = $current_branch ]]; then |
Deleting is also a pretty simple task (despite it feeling a bit kludgy):
git push origin :newfeature
That will delete the newfeature branch on the origin remote, but you’ll still need to delete the branch locally with git branch -d newfeature.
http://gitready.com/beginner/2009/02/02/push-and-delete-branches.html