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
scope 'merb-gen' do | |
# do merb-gen stuff here | |
end | |
scope 'monkey' do | |
# do monkey stuff here | |
end | |
[ew[ |
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' rescue nil | |
require 'gosu' | |
require 'chipmunk' | |
class Array | |
# e.g. [1,2,3].each_link yields [1,2], [2,3] | |
def each_link | |
prev = first | |
self[1, size].each do |item| | |
yield prev, item |
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
Nov 1 09:45:51 fleet scsi: [ID 107833 kern.warning] WARNING: /pci@0,0/pci1002,597b@5/pci1095,7132@0/disk@1,0 (sd5): | |
Nov 1 09:45:51 fleet Error for Command: read(10) Error Level: Retryable | |
Nov 1 09:45:51 fleet scsi: [ID 107833 kern.notice] Requested Block: 1804505446 Error Block: 1804505509 | |
Nov 1 09:45:51 fleet scsi: [ID 107833 kern.notice] Vendor: ATA Serial Number: | |
Nov 1 09:45:51 fleet scsi: [ID 107833 kern.notice] Sense Key: Media_Error | |
Nov 1 09:45:51 fleet scsi: [ID 107833 kern.notice] ASC: 0x11 (unrecovered read error), ASCQ: 0x0, FRU: 0x0 | |
Nov 1 09:45:54 fleet scsi: [ID 107833 kern.warning] WARNING: /pci@0,0/pci1002,597b@5/pci1095,7132@0/disk@1,0 (sd5): | |
Nov 1 09:45:54 fleet Error for Command: read(10) Error Level: Retryable | |
Nov 1 09:45:54 fleet scsi: [ID 107833 kern.notice] Requested Block: 1804505446 Error Block: 1804505509 | |
Nov 1 09:45:54 fleet scsi: [ID 10783 |
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
# formats - array of MediaFormat objects | |
# :width - desired width | |
# :height - desired height | |
# :fuzz - number of pixels it's ok to be off by | |
# :constrain - scale image client-side to specified :width and :height, using image best matching specified :width and :height | |
# :include_cropped - include cropped images | |
def image_helper(formats, options={}) | |
options[:constrain] = true unless options[:constrain].blank? | |
options[:fuzz] ||= 0 |
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
#!/bin/bash | |
commit=$(git rev-parse $1) | |
branch=$2 | |
if [[ -z "$branch" ]]; then | |
branch=HEAD | |
fi | |
while true; do | |
commit=$(git rev-list --children $branch --not $commit^@ | \ |
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
#!/bin/sh | |
git cherry -v HEAD $1 | grep ^+ | while read line; do | |
hash=`git rev-parse --short $( echo "$line" | cut -d' ' -f2 )` | |
description=$( echo "$line" | cut -d' ' -f3- | cut -c 1-64 ) | |
conflict=$( git cherry-pick -n $hash 2> /dev/null | grep 'CONFLICT' ) | |
status=$( git status ) | |
if ! current_git_status=$( echo "$status" | grep 'working directory clean' ); then | |
if [ "$conflict" ]; then | |
num_conflicting_files=$( echo "$status" | grep 'unmerged: ' | wc -l | sed 's/ //g' ) |
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
#!/bin/sh | |
# changed to only work on clean repos | |
# after each revision is tried, if it's still dirty, nuke all untracked files. they represent the situation in which a patch is applied to a file that was added in an unmerged patch | |
git cherry -v HEAD $1 | grep ^+ | while read line; do | |
status=$( git status ) | |
if current_git_status=$( echo "$status" | grep 'working directory clean' ); then | |
hash=`git rev-parse --short $( echo "$line" | cut -d' ' -f2 )` | |
description=$( echo "$line" | cut -d' ' -f3- | cut -c 1-64 ) |
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
02:28 PM dave@vmonster/0 [~/src/disco] erl -rsh ssh -sname testmaster | |
Erlang (BEAM) emulator version 5.6.3 [source] [64-bit] [smp:4] [async-threads:0] [kernel-poll:false] | |
Eshell V5.6.3 (abort with ^G) | |
(testmaster@vmonster)1> slave:start(localhost, "testnode"). | |
{ok,testnode@localhost} | |
(testmaster@vmonster)2> net_adm:ping(testnode@localhost). | |
pong | |
(testmaster@vmonster)3> | |
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
mysql> BEGIN; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> CREATE TABLE a (a text); | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> ROLLBACK; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> describe a; |
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
Feb 26 08:27:55 darkstar dovecot: Time just moved backwards by 217 seconds. This might cause a lot of problems, so I'll just kill myself |
OlderNewer