Skip to content

Instantly share code, notes, and snippets.

@LBRapid
LBRapid / require_relative_failure.txt
Created June 13, 2011 14:35
require_relative failure
** Invoke default (first_time)
** Invoke spec (first_time)
** Execute spec
/Users/johnd/.rvm/rubies/ruby-1.8.7-p334/bin/ruby -S rspec ./spec/controllers/api/spree_base_controller_spec.rb ./spec/models/user_spec.rb
/Users/johnd/.rvm/gems/ruby-1.8.7-p334/gems/linecache-0.45/lib/linecache.rb:66:in `require': no such file to load -- require_relative (LoadError)
from /Users/johnd/.rvm/gems/ruby-1.8.7-p334/gems/linecache-0.45/lib/linecache.rb:66
from /Users/johnd/.rvm/gems/ruby-1.8.7-p334/gems/ruby-debug-base-0.10.4/lib/ruby-debug-base.rb:3:in `require'
from /Users/johnd/.rvm/gems/ruby-1.8.7-p334/gems/ruby-debug-base-0.10.4/lib/ruby-debug-base.rb:3
from /Users/johnd/.rvm/gems/ruby-1.8.7-p334/gems/ruby-debug-0.10.4/cli/ruby-debug.rb:5:in `require'
from /Users/johnd/.rvm/gems/ruby-1.8.7-p334/gems/ruby-debug-0.10.4/cli/ruby-debug.rb:5
@michiel
michiel / cors-nginx.conf
Created July 5, 2011 10:41
Wide-open CORS config for nginx
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#
@adamvaughan
adamvaughan / gist:1336692
Created November 3, 2011 14:52
creating a self signed certificate
➜ openssl genrsa -des3 -out server.key 1024
Generating RSA private key, 1024 bit long modulus
................++++++
...............++++++
e is 65537 (0x10001)
Enter pass phrase for server.key:
Verifying - Enter pass phrase for server.key:
➜ openssl req -new -key server.key -out server.csr
Enter pass phrase for server.key:
You are about to be asked to enter information that will be incorporated
@burke
burke / 0-readme.md
Created January 27, 2012 13:44 — forked from funny-falcon/cumulative_performance.patch
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@drj42
drj42 / org-mode-reference-in.org
Created February 6, 2012 23:53
This is a cheat sheet for Emacs org-mode... in org-mode format!
@glucero
glucero / custom_screen_send.vim
Created March 22, 2013 16:26
custom functions for the screen vim plugin
let g:ScreenImpl = 'Tmux'
function! CustomScreenSend()
silent! %s/\s\+$//e
silent! g/^$/d
ScreenSend
silent! normal! ggdG
endfunction
@jasonlally
jasonlally / meta_data_socrata_api.py
Last active December 18, 2015 22:08
Loops through all the city data catalogs using Socrata and dumps them to a structured JSON document that can be read by a D3 tree map.
#Connects to the Socrata search API and loads data describing the tabular datasets in the catalog for use by D3 tree map
#This version connects to a list of existing Socrata instances and loops through the ones categorized as city
#Use: python dataportalapi.py > portaldata.json
import requests, json, math, re
def check_categories(d,category):
for i in range(len(d)):
if d[i]['name'] == category: return i
return -1
var BVT = function(width, depth, init, elems) {
this._width = width;
this._depth = depth;
this._leaf = depth === 1;
this._shift = (this._depth - 1) * Math.round(Math.log(width) / Math.log(2));
this._himask = this._width - 1;
this._lomask = Math.pow(2, this._shift) - 1;
this._elems = elems;
@martinklepsch
martinklepsch / README.md
Last active February 28, 2022 04:34
A very minimal Emacs configuration to get started with Emacs & Evil-mode

A Starting Point for using Emacs & Evil-mode

(I wrote a bit about why Emacs and Vim on my blog and thought it might be nice to give some starting point for people that want to try it.)

If you just want to play around with Emacs & Evil mode do the following:

  1. mkdir ~/.emacs.d/
  2. copy init.el into ~/.emacs.d/
  3. Download Emacs from http://emacsformacosx.com
@gabebw
gabebw / books.md
Last active August 29, 2015 14:05

Books

I like to read books, here are my thoughts about them.

Sci Fi

  • John Scalzi is thankfully prolific. If you haven't read anything by him, [Redshirts] is a meta exploration of Star-Trek-like shows. If you liked Galaxy Quest, you'll love it.