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
su root | |
cd ~ | |
# Install dependencies | |
apt-get update | |
apt-get install git-core curl build-essential openssl libssl-dev sudo vi | |
# Build node | |
git clone https://github.com/joyent/node.git | |
cd node | |
./configure --openssl-libpath=/usr/lib/ssl | |
make |
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
"string http://domain.tld/path with a URL".replace(/(http[s]?:\/\/)([^\s]+)/, "<a href='$1$2'>$2</a>") |
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
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch filename.extension' --prune-empty --tag-name-filter cat -- --all | |
git push origin master --force |
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
for f in `ls | egrep "\.jpg|\.jpeg|\.gif|\.png$"`; do echo -e ".`echo $f | tr . "_"` {\n\twidth: `identify -format '%w' $f`px;\n\theight: `identify -format '%h' $f`px;\n\tbackground: url(data:image/${f#*.};base64,"; openssl base64 -in $f | tr -d "\n" | tr -d "\r"; echo -e ");\n}\n"; done > images.css |
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
# delete any existing branch | |
git branch -D gh-pages | |
git push origin --delete gh-pages | |
# create new branch and switch to it | |
git checkout -b gh-pages | |
# remove all but git files | |
rm -rf $(ls -a | egrep -v '^(\.|\.\.|\.git)$') | |
# create an empty index.html and commit it | |
touch index.html | |
git add -A |
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
sed -i -e "s|filename.png|data:image/png;base64,$(openssl base64 -in filename.png | tr -d '\n')|g" filename.css |
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
git config --global credential.helper cache |
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
((function(){j=document.createElement("script");j.src="http://code.jquery.com/jquery-latest.pack.js";document.getElementsByTagName("head")[0].appendChild(j);})()) |
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
curl -X POST -F "files[]=file1.jpg" -F "files[]=file2.jpg" … http://url.com |
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
gem install localtunnel | |
tunnel -k ~/.ssh/some.pub 8080 |