This file contains 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
jQuery(document).ready(function () { | |
jQuery(".imgResize").on('load', function () { | |
var $this = jQuery(this); | |
if ($this.width() > $this.height()) { | |
$this.addClass("landscape"); | |
} else if ($this.width() < $this.height()) { | |
$this.addClass("portrait"); | |
} else { | |
} |
This file contains 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
//Add to functions.php | |
add_action('wp_head', 'show_template'); | |
function show_template() { | |
global $template; | |
print_r($template); | |
} |
This file contains 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
git add * | |
git commit -m "commit message" | |
//Fetch changes and overwrite local conflicts | |
git fetch origin master | |
git merge -s recursive -X theirs origin/master |
This file contains 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
git reset --hard |
This file contains 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
git clean -df . |
This file contains 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
git reset --soft HEAD~1 |
This file contains 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
git revert [commithash] |
This file contains 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
sudo yum update | |
sudo yum install gcc-c++ make | |
sudo yum install openssl-devel | |
sudo yum install git | |
git clone git://github.com/joyent/node.git | |
cd node | |
git checkout v0.10.26 | |
./configure | |
make | |
sudo make install |
This file contains 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
echo "[MongoDB] | |
name=MongoDB Repository | |
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64 | |
gpgcheck=0 | |
enabled=1" | sudo tee -a /etc/yum.repos.d/mongodb.repo | |
sudo yum install -y mongodb-org-server mongodb-org-shell mongodb-org-tools | |
sudo mkdir /data /log /journal |
This file contains 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
github-repo() { | |
repo_name=$1 | |
dir_name=`basename $(pwd)` | |
if [ "$repo_name" = "" ]; then | |
echo "Repo name (hit enter to use '$dir_name')?" | |
read repo_name | |
fi | |
if [ "$repo_name" = "" ]; then |
OlderNewer