This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Made by Pieter de Bie <frimmirf@gmail.com> | |
# Based on a "Pastie" task by someone | |
require "tempfile" | |
GIST_URL = 'http://gist.github.com/gists' | |
if ARGV.include? "-p" | |
text = `pbpaste` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo; end | |
describe 'foo' do | |
it "should not be borked" do | |
Foo.should_receive('baz').with('huh', :include => [:a, :b], :conditions => {:c => :d}) | |
Foo.baz('huh', {:include => [:a, :b]}, :conditions => {:c => :d}) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(gdb) bt | |
#0 0x28200de3 in poll () from /lib/libc.so.6 | |
#1 0x2816c532 in poll () from /lib/libpthread.so.2 | |
#2 0x28670861 in pqSocketPoll (sock=4, forRead=1, forWrite=0, end_time=-1) at fe-misc.c:1037 | |
#3 0x28670723 in pqSocketCheck (conn=0x8d36c00, forRead=1, forWrite=0, end_time=-1) at fe-misc.c:979 | |
#4 0x286705d8 in pqWaitTimed (forRead=1, forWrite=0, conn=0x8d36c00, finish_time=-1) at fe-misc.c:911 | |
#5 0x286705ab in pqWait (forRead=1, forWrite=0, conn=0x8d36c00) at fe-misc.c:894 | |
#6 0x2866d001 in PQgetResult (conn=0x8d36c00) at fe-exec.c:1223 | |
#7 0x2866d4c5 in PQexecFinish (conn=0x8d36c00) at fe-exec.c:1452 | |
#8 0x2866d1eb in PQexec (conn=0x8d36c00, query=0x80f5300 "SELECT * FROM \"ticket_changes\" ORDER BY ticket_changes.created_at DESC LIMIT 25") at fe-exec.c:1293 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Hi</title> | |
</head> | |
<body> | |
<ul> | |
<li>one</li> | |
<li>two</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun reverse-alist (alist) | |
(mapcar | |
'(lambda (cell) ((cdr cell) . (car cell))) | |
alist)) | |
(reverse-alist '(("a" . "b") | |
("c" . "d"))) | |
; => '(("b" . "a") | |
; ("c" . "d")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns clojoku | |
(:use [clojure.contrib.seq-utils :only (indexed)]) | |
(:use [clojure.contrib.str-utils :only (str-join)]) | |
(:use [clojure.set :only (union)])) | |
(defstruct board :cells) | |
(defn interpose-n [n sep coll] | |
"Returns a list with sep inserted after every n entries in coll" | |
(mapcat (fn [[idx x]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./script/../config/../vendor/rails/railties/lib/initializer.rb:410:in `initialize_database': undefined method `configurations=' for ActiveRecord::Base:Class (NoMethodError) | |
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:141:in `process' | |
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:113:in `send' | |
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:113:in `run' | |
from /Users/kyleh/oly-dev/api/config/environment.rb:4 | |
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' | |
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' | |
from /Users/kyleh/oly-dev/api/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require' | |
from /Users/kyleh/oly-dev/api/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in' | |
from /Users/kyleh/oly-dev/api/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Initially, the first time ActionView::Template#split is hit (so view loading has begun?): | |
(rdb:1) where | |
--> #0 ActionView::Template.split(file#String) | |
at line /Users/kyleh/oly-dev/admin/vendor/rails/actionpack/lib/action_view/template.rb:226 | |
#1 ActionView::Template.initialize(template_path#String, load_paths#ActionView::Template:...,...) | |
at line /Users/kyleh/oly-dev/admin/vendor/rails/actionpack/lib/action_view/template.rb:103 | |
#2 ActionView::Template::Path.new(file#String) | |
at line /Users/kyleh/oly-dev/admin/vendor/rails/actionpack/lib/action_view/template.rb:58 | |
#3 Array.directory? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'spec' | |
class Foo | |
def bar | |
end | |
end | |
describe 'multistubs' do | |
it "should raise then return" do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## expand %m, %*; expand '$(echo hi)', '${foovar}' | |
setopt prompt_percent prompt_subst | |
_prompt_git_info () { | |
local g="$(git rev-parse --git-dir 2>/dev/null)" | |
if [ -n "$g" ]; then | |
local r | |
local b | |
if [ -d "$g/../.dotest" ] |
OlderNewer