Skip to content

Instantly share code, notes, and snippets.

View nordringrayhide's full-sized avatar

Nodrin Grayhide nordringrayhide

  • home
  • Worldwide
View GitHub Profile
@nordringrayhide
nordringrayhide / ruby_debug_pow.markdown
Created December 10, 2011 06:57 — forked from alexagui/ruby_debug_pow.markdown
How to Ruby Debug with Pow

How to Ruby Debug with Pow

Below are steps I followed to get ruby debugger ruby-debug running with Pow. Based on info from this thread basecamp/pow#43 and this blog post http://flochip.com/2011/04/13/running-pow-with-rdebug/

1) Update your Gemfile

Assuming you're writing your app in Ruby 1.9 and using Bundler, just add the dependency to your development gems:

@nordringrayhide
nordringrayhide / gist:1513431
Created December 23, 2011 07:02
Remove Jenkins plugin
cd /Users/Shared/Jenkins/Home/plugins
sudo remove plugin-name*
sudo launchctl unload -w /Library/LaunchDaemons/org.jenkins-ci.plist
sudo launchctl load -w /Library/LaunchDaemons/org.jenkins-ci.plist
module Chef
class Recipe
def search
puts 'A'
end
end
end
module LocalSearch
def search
@nordringrayhide
nordringrayhide / service
Created January 20, 2012 08:25 — forked from brentkirby/service
Unicorn + Runit + RVM
#!/bin/bash -e
#
# Since unicorn creates a new pid on restart/reload, it needs a little extra love to
# manage with runit. Instead of managing unicorn directly, we simply trap signal calls
# to the service and redirect them to unicorn directly.
#
# To make this work properly with RVM, you should create a wrapper for the app's gemset unicorn.
#
function is_unicorn_alive {
@nordringrayhide
nordringrayhide / gist:1894453
Created February 23, 2012 19:17
Command line PostgreSQL database dump
# dump database
PGPASSWORD=<password> && export PGPASSWORD && pg_dump -U <username> \
-h <hostname> <database> > dump.sql && unset PGPASSWORD
# import sql file
PGPASSWORD=<password> && export PGPASSWORD && psql -U <username> \
-h <hostname> -d <database> < dump.sql
@nordringrayhide
nordringrayhide / Gemfile
Created February 29, 2012 06:51 — forked from d--j/Gemfile
# include at least one source and the rails gem
source :gemcutter
gem 'rails', '~> 2.3.5', :require => nil
group :development do
# bundler requires these gems in development
gem 'rails-footnotes'
end
group :test do
@nordringrayhide
nordringrayhide / gist:2048790
Created March 16, 2012 06:32
super instead alias_method_chain
class A
def foo
puts 'A#foo'
end
end
class B < A
def foo
super
puts 'B#foo'
@nordringrayhide
nordringrayhide / vimify.sh
Created March 19, 2012 09:16
My vimrc file
#!/bin/sh
mkdir -p ~/.vim/bundle/vundle
git clone git://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
wget https://raw.github.com/gist/2104598/fb27ed1e0434575ede483df96692d93a626b1116/vimrc-with-vandle-support.vim \
-O ~/.vimrc
vim +BundleInstall +qall
@nordringrayhide
nordringrayhide / rvm-fetch.patch.txt
Created April 9, 2012 09:50
intall RVM 1.10.3, Ruby 1.8.7, 1.9.2, 1.9.3 for working with Pow & curl with SSL support at OSx Lion && XCode 4.3 command tools
#NOTE it should be applied after rvm-install.sh before rvm-post-install.sh running
#http://jfire.io/blog/2012/03/02/xcode-4-dot-3-homebrew-and-ruby/
vi /path/to/rvm/scripts/fetch
# -k key has been added for SSL certificate checking disable
66 fetch_command="curl -k -f -L --create-dirs -C - " # -s for silent
@nordringrayhide
nordringrayhide / Gemfile
Created May 12, 2012 21:29
Rails foreman gem configs
# Usage: bundle --binstubs && bin/foreman start
gem 'unicorn', '~> 4.3.1'
group :development do
gem 'foreman', '~> 0.46.0'
end