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
#Prompt that doesn't call git | |
PS1='\[\e[0;36m\]\u\[\e[m\] \[\e[0;36m\]\w\[\e[m\] \[\e[0;35m\]\$\[\e[m\] \[\e[0;37m\]' | |
alias subl='/c/Program\ Files/Sublime\ Text\ 3/sublime_text.exe' | |
alias gw='gradlew' | |
git config --global alias.st status | |
git config --global alias.lo 'log --oneline' | |
git config --global alias.pr 'pull --rebase' | |
git config --global core.editor "'c:\Program Files\Sublime Text 3\sublime_text.exe' -w" |
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
#!/bin/bash | |
path=`which npm`; | |
if [ "$path" == "" ]; | |
then | |
curl https://npmjs.org/install.sh | sh | |
fi | |
npm -g install weinre |
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
$(CKEDITOR.instances.my_instance.getSelection().getStartElement().$) |
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
# First, generate the key. You will be prompted to enter a password, but we will strip it out in the next step: | |
openssl genrsa -des3 -out server.orig.key 2048 | |
# Then, stip out the password: | |
openssl rsa -in server.orig.key -out server.key | |
# Edit the OSX openssl config file to include your alternate names. | |
# Edit the 'subjectAltName' field. E.g.: |
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
<?php | |
/* | |
Special thanks to: | |
Ryan Duff and Firas Durri, authors of WP-ContactForm, to which this | |
plugins' initial concept and some parts of code was built based on. | |
modernmethod inc, for SAJAX Toolkit, which was used to build this | |
plugins' AJAX implementation | |
*/ |
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
#!/bin/bash | |
SOURCE="${BASH_SOURCE[0]}" | |
DIR="$( dirname "$SOURCE" )" | |
while [ -h "$SOURCE" ] | |
do | |
SOURCE="$(readlink "$SOURCE")" | |
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" | |
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | |
done | |
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" |
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
#Android SDK | |
M2_HOME=/usr/local/apache-maven | |
ANDROID_HOME=/usr/local/android-sdk-macosx | |
PATH=$PATH:$M2_HOME:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools | |
#RVM | |
PATH=$PATH:$HOME/.rvm/bin | |
#Local bin | |
PATH=$PATH:$HOME/bin |
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
#Generates aes-256 encrypted bz2-compressed mysql dumps named "[app name] ([timestamp]).backup" | |
#To decrypt: | |
#cat backupname.backup | openssl enc -d -aes-256-cbc -salt -pass pass:[password] > backupname.sql | |
require 'yaml' | |
require 'encryptor' | |
def backup(src, name) | |