Skip to content

Instantly share code, notes, and snippets.

View jacqui's full-sized avatar

Jacqui Lough jacqui

View GitHub Profile
export rvm_gemset_create_on_use_flag=1
export rvm_project_rvmrc=1
export rvm_trust_rvmrcs_flag=1
#!/bin/bash
scp olytech@olytech1:/data/overall/after_oly* ~/data/overall/
export rvm_gemset_create_on_use_flag=1
export rvm_project_rvmrc=1
export rvm_trust_rvmrcs_flag=1
@jacqui
jacqui / .profile
Created December 15, 2011 19:52 — forked from tysone/snippet.sh
Display current rvm gemset and git branch in your prompt (bash).
# Adapted from: http://ariejan.net/2010/04/25/ruby-version-and-gemset-in-your-bash-prompt-yes-sir
function rvm_version {
local gemset=$(echo $GEM_HOME | awk -F'@' '{print $2}')
[ "$gemset" != "" ] && echo "@$gemset"
}
# https://github.com/git/git/blob/master/contrib/completion/git-completion.bash
# defines '__git_ps1' current git branch function
source ~/.git-completion.bash
export rvm_gemset_create_on_use_flag=1
export rvm_project_rvmrc=1
export rvm_trust_rvmrcs_flag=1
@jacqui
jacqui / gist:1224381
Created September 17, 2011 21:18
Vim Plugins
require 'sunspot'
module SunspotAdapter
class InstanceAdapter < Sunspot::Adapters::InstanceAdapter
def id
@instance.id
end
end
#!bash
#
# bash completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
@jacqui
jacqui / gist:983051
Created May 20, 2011 14:43 — forked from pauldix/gist:981916
Redis SORT command examples
# Optimized for writes, sort on read
# LVC
redis.hset("bonds|1", "bid_price", 96.01)
redis.hset("bonds|1", "ask_price", 97.53)
redis.hset("bonds|2", "bid_price", 95.50)
redis.hset("bonds|2", "ask_price", 98.25)
redis.sadd("bond_ids", 1)
redis.sadd("bond_ids", 2)
require 'rubygems'
require 'pp'
unless self.class.const_defined? "IRB_RC_HAS_LOADED"
# Log to STDOUT if in Rails
if ENV.include?('RAILS_ENV') && !Object.const_defined?('RAILS_DEFAULT_LOGGER')
require 'logger'
RAILS_DEFAULT_LOGGER = Logger.new(STDOUT)
end