Skip to content

Instantly share code, notes, and snippets.

View floydpink's full-sized avatar

Hari Pachuveetil floydpink

View GitHub Profile
@floydpink
floydpink / remote_branch.sh
Created December 11, 2012 15:24
Create and delete remote branches
# create new remote branch on push
git push origin mybranch
# delete existing remote branch on push
git push origin :mybranch
@floydpink
floydpink / invocation_method.cs
Created December 17, 2012 04:03
The main method that does the AOP magic
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);
}
@floydpink
floydpink / setup.sh
Created January 7, 2013 04:05
Octopress blog on a custom domain site hosted on GitHub Pages - 1
# 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
@floydpink
floydpink / deployment.sh
Last active December 10, 2015 18:08
Octopress blog on a custom domain site hosted on GitHub Pages - 2
# 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
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"
@floydpink
floydpink / travis-secure-key-mac.sh
Last active March 6, 2021 22:18 — forked from lukewpatterson/gist:4242707
Generating secure environment variables for GitHub deployment keys to be used from a Travis-CI build.
# On a Mac, use this script to generate secure deployment key
# To generate secure SSH deploy key for a github repo to be used from Travis
base64 --break=0 ~/.ssh/id_rsa_deploy > ~/.ssh/id_rsa_deploy_base64
ENCRYPTION_FILTER="echo \$(echo \"- secure: \")\$(travis encrypt \"\$FILE='\`cat $FILE\`'\" -r floydpink/harimenon.com)"
# If you don't have homebrew please install it from http://brew.sh/
brew install coreutils
gsplit --bytes=100 --numeric-suffixes --suffix-length=2 --filter="$ENCRYPTION_FILTER" ~/.ssh/id_rsa_deploy_base64 id_rsa_
# To reconstitute the private SSH key from within the Travis-CI build (typically from 'before_script')
//This code gives this error:
// Uncaught Error: assertion failed: Ember.Object.create no longer supports defining methods that call _super.
var App = Ember.Application.create({
init:function(){
this._super.deferReadiness();
}
});
@floydpink
floydpink / .bashrc
Last active December 15, 2015 08:19
Start a new WEBrick instance at command prompt
HISTCONTROL=ignoredups:erasedups
HISTIGNORE=clear
PROMPT_COMMAND='history -a'
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
[[ -s $USERPROFILE/.pik/.pikrc ]] && source $USERPROFILE/.pik/.pikrc
SSH_ENV="$HOME/.ssh/environment"
@floydpink
floydpink / Question.js
Last active December 15, 2015 23:49
Question about loading a few favorite repositories from Travis using ember-data. This is for the Travis-CI Mobile I am trying to put together here - https://github.com/floydpink/Travis-CI-www. Thank you for your help.
// I have a bunch of repo ids in an array
var favoriteRepos = ["451069","538603","291565","425941","496588","189854","323203","668498","557554","7934","207993"];
// How do we go about loading all these repos with the current ember-data implementation and the Travis API?
// This would be the 'Favorites' screen I am trying to implement here - http://floydpink.github.io/Travis-CI-www/#/favorites
// This is what I have tried unsuccessfully so far:
// This is in the repo model - https://github.com/floydpink/Travis-CI-www/blob/master/js/app/models/Repo.js
Repo.reopenClass({

Keybase proof

I hereby claim:

  • I am floydpink on github.
  • I am floydpink (https://keybase.io/floydpink) on keybase.
  • I have a public key whose fingerprint is F79E FDED 6BAC 4B7D C436 A838 9B5A 929A C7A3 F555

To claim this, I am signing this object: