Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
LOOKING INTENTLY INTO THE VOID

Daniel Schierbeck dasch

💭
LOOKING INTENTLY INTO THE VOID
View GitHub Profile
View gist:23898
" Vim color file
" Maintainer: Mingbai <mbbill AT gmail DOT com>
" Last Change: 2006-12-24 20:09:09
set background=dark
if version > 580
" no guarantees for version 5.8 and below, but this makes it stop
" complaining
hi clear
if exists("syntax_on")
View dasch.vim
" Vim color file
" Maintainer: Daniel Schierbeck <daniel DOT schierbeck PONY gmail UNICORN com>
" Last Change: 2008-11-25 16:41 GMT+1
set background=dark
if version > 580
" no guarantees for version 5.8 and below, but this makes it stop
" complaining
hi clear
if exists("syntax_on")
View mocha.vim
" Vim color file
" Maintainer: Daniel Schierbeck <daniel DOT schierbeck PONY gmail UNICORN com>
" Last Change: 2006-12-24 20:09:09
set background=dark
if version > 580
" no guarantees for version 5.8 and below, but this makes it stop
" complaining
hi clear
if exists("syntax_on")
View gist:41665
# Replaces "string1" with "string2" recursively
# Approach 1:
find ./ -type f | xargs sed -i 's/string1/string2/'
# Approach 2:
rpl -x'.cpp' -x'.h' -pR "string1" "string2" *
View Fixes T007_Index
From 68e1b50e28bf780f68424ac36602c3de9fdf51e7 Mon Sep 17 00:00:00 2001
From: Daniel Schierbeck <daniel.schierbeck@gmail.com>
Date: Sat, 17 Oct 2009 17:01:28 +0200
Subject: [PATCH] Changed type of Core.GitIndex.Members to a list
Using an array gave weird exceptions on Mono 2.0.
---
Core/GitIndex.cs | 4 ++--
Core/IndexTreeWalker.cs | 7 ++++---
Tests/T0007_Index.cs | 27 ++++++++++++++-------------
View shoulda-patch-68.diff
From 3b857c2663c516f3c63774b7b4c90dbb93935642 Mon Sep 17 00:00:00 2001
From: Daniel Schierbeck <daniel.schierbeck@gmail.com>
Date: Sat, 31 Oct 2009 01:51:48 +0100
Subject: [PATCH] Allow for Rails.root instead of RAILS_ROOT
RAILS_ROOT is being deprecated in Rails 3.0
---
lib/shoulda/rails.rb | 3 +++
lib/shoulda/test_unit.rb | 1 +
2 files changed, 4 insertions(+), 0 deletions(-)
View hookup.rb
context "A stack" do
setup { Stack.new(42) }
context "which gets #pop called on it" do
hookup { topic.pop }
asserts(:size).equals(0)
end
asserts(:size).equals(1)
end
View hallway_test.rb
require 'test_helper'
context "The Hallway model" do
setup { Hallway }
teardown { Hallway.delete_all }
hookup { create_hallway }
asserts(:count).equals(1)
asserts("adding duplicate") { create_hallway }.raises(ActiveRecord::RecordInvalid)
View database.yml
test:
adapter: sqlite3
database: ":memory:"
View gemcutter.sh
## Working with Gemcutter ##
# Add an owner to a Gem
gem owner --add $EMAIL
# Remove an owner from a Gem
gem owner --remove $EMAIL