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
PATH=$HOME/bin:$ADDPATH:$PATH | |
SSH_ENV="$HOME/.ssh/environment" | |
# start the ssh-agent | |
function start_agent { | |
echo "Initializing new SSH agent..." | |
# spawn ssh-agent | |
ssh-agent | sed 's/^echo/#echo/' > "$SSH_ENV" | |
echo succeeded | |
chmod 600 "$SSH_ENV" |
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
# set up Octopress site to publish to your projects gh-pages repository | |
rake setup_github_pages # enter the URL to the repository whose gh-pages hosts example.com | |
# make below changes to to enable deployment to a gh-pages subdirectory named 'blogs' | |
# _config.yml | |
destination: public/blogs | |
url: http://example.com/blogs | |
subscribe_rss: /blogs/atom.xml | |
root: /blogs | |
# config.rb - for Compass & Sass |
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
# clone Octopress | |
git clone git://github.com/imathis/octopress.git my-site-blog | |
cd my-site-blog | |
# install dependencies | |
gem install bundler | |
bundle install | |
# install the default Octopress theme | |
rake 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
public void Intercept(IInvocation invocation) | |
{ | |
if (Log.IsDebugEnabled) Log.Debug(CreateInvocationLogString("Called", invocation)); | |
try | |
{ | |
invocation.Proceed(); | |
if (Log.IsDebugEnabled) | |
if (invocation.Method.ReturnType != typeof(void)) | |
Log.Debug("Returning with: " + invocation.ReturnValue); | |
} |
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
# create new remote branch on push | |
git push origin mybranch | |
# delete existing remote branch on push | |
git push origin :mybranch |
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
// To compress anything from within JS | |
var compressed = lzwCompress.pack(humongousObj); | |
// And to decompress it | |
var original = lzwCompress.unpack(compressed); |
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 log --all --decorate --oneline --graph |
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 log --graph --left-right --cherry-pick --oneline master...experiment |
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
var JSONKeyMinify = function (Array, JSON, undefined) { | |
"use strict"; | |
// http://stackoverflow.com/questions/1988349/array-push-if-does-not-exist | |
// http://stackoverflow.com/questions/4433402/replace-keys-json-in-javascript | |
Array.prototype.inArray = function (comparer) { | |
for (var i = 0; i < this.length; i++) { | |
if (comparer(this[i])) return true; | |
} | |
return false; | |
}; |
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
gm mogrify -output-directory low-res -resize 60% *.png |