This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function parse_git_branch { | |
local branch=`cd $DIR;git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` | |
if [ "$branch" == "" ]; then | |
exit 1 | |
else | |
echo $branch | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************** | |
* fix-theme-slugs-mongo.js | |
* | |
* To run, replace localhost/db_name with your connection info and | |
* run this command: | |
* | |
* mongo localhost/db_name --quiet fix-layout-slugs-mongo.js | |
* | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -x | |
# git name-rev is fail | |
CURRENT=`git branch | grep '\*' | awk '{print $2}'` | |
git checkout master | |
git pull origin master | |
git checkout ${CURRENT} | |
git rebase master | |
git checkout master | |
git merge ${CURRENT} | |
git push origin master |