Just install this in your apps like so:
gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'
| # ** ERROR 1 ** | |
| # FATAL: lock file "postmaster.pid" already exists | |
| # HINT: Is another postmaster (PID 4646) running in data directory "/usr/local/var/postgres"? | |
| # | |
| # ** ERROR 2 ** | |
| # Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? | |
| # | |
| # To fix one of this errors: | |
| cat /usr/local/var/postgres/postmaster.pid # pid is the number on first line |
Just install this in your apps like so:
gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'
| # If you're getting this error trying to use ApacheBench on OS X Lion: | |
| # Benchmarking mwmanning.com (be patient)...apr_socket_recv: Connection reset by peer (54) | |
| # | |
| # You need to download the latest beta version of Apache and rebuild ab. | |
| # Here's how (assuming you have homebrew installed). | |
| # Install Homebrew (https://github.com/mxcl/homebrew) and then the Perl Regex support | |
| brew install pcre | |
| # Download the latest from http://httpd.apache.org/download.cgi, then decompress and compile it |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| // This method gives you an easier way of calling super | |
| // when you're using Backbone in plain javascript. | |
| // It lets you avoid writing the constructor's name multiple | |
| // times. You still have to specify the name of the method. | |
| // | |
| // So instead of having to write: | |
| // | |
| // User = Backbone.Model.extend({ | |
| // save: function(attrs) { | |
| // this.beforeSave(attrs); |
| " :Gp changes gem 'hello' to gem 'hello', :path => '../hello' | |
| " Another :Gp changes it back | |
| fun! RubyGemfilePathLocal() | |
| let line = getline(".") | |
| if match(line, ":path") != -1 | |
| substitute /\m,[ ]\{-}:path.\{-}["''].\{-}["'']//g | |
| else | |
| substitute /\mgem \(["'']\)\(.\{-}\)["''].*/\0, :path => \1..\/\2\1/g | |
| endif | |
| endfun |
| <html> | |
| <head> | |
| <title>Dynamic Stacked Bar Chart using d3.js</title> | |
| <script src="http://mbostock.github.com/d3/d3.v2.js"></script> | |
| <style> | |
| rect.a { | |
| fill: green; | |
| } | |
| rect.b { | |
| fill: orange; |
| #!/bin/bash | |
| debug=`git diff --cached | grep -C 2 -E '+\s*And (open|show me the page|save_and_open_page)'` | |
| pry=`git diff --cached | grep -C 2 -E 'binding.pry'` | |
| debugger=`git diff --cached | grep -C 2 debugger` | |
| console_log=`git diff --cached | grep -C 2 console.log` | |
| conflicts=`git diff --cached | grep -C 2 -E '<<<|>>>'` | |
| if [ -n "$debug" ]; then | |
| echo "debugging statements added in this commit" |
First install the required gems:
gem install octokit awesomeprint rainbowThen run it to extract all of your open GitHub issues into files (with comments).
ruby my-gh-issues.rb| travis@vserver16:~$ rvm list | |
| rvm rubies | |
| ruby-1.9.2-p180 [ x86_64 ] | |
| => ruby-1.8.7-p334 [ x86_64 ] | |
| ruby-1.8.6-p420 [ x86_64 ] | |
| ree-1.8.7-2011.03 [ x86_64 ] | |
| ruby-1.9.1-p378 [ x86_64 ] | |
| jruby-1.6.1 [ linux-amd64-java ] |