Skip to content

Instantly share code, notes, and snippets.


Stuart Gaλe bishboria

View GitHub Profile
View bench_fib_complex.rb
ONE = 1
TWO = 2
def plus(a, b)
a + b
def minus(a, b)
a - b
View download_scotruby_videos.rb
# The videos can be found at
# Usage: ruby download_scotruby_videos.rb /path/to/directory
page = ""
path = ARGV.first || '.'
[ "Continuous Delivery - A Better Software Deployment Strategy", "D1_GH_01-Ruby1280_b.mp4" ],
[ "Perfectionists Anonymous", "D1_GH_03-Ruby1280_b.mp4" ],
[ "ElasticSearch, AMQP and Ruby; or how I learned to stop spelunking and love the logs", "D1_GH_04-Ruby1280_b.mp4" ],
[ "How we learn a language", "D1_GH_05-Ruby1280_b.mp4" ],
View sicp_exercise_2_23.scm
(define (my-for-each proc list-of-values)
(cond ((null? list-of-values) #t)
(else (proc (car list-of-values))
(my-for-each proc (cdr list-of-values)))))
;; or
(define (my-for-each proc list-of-values)
(if (null? list-of-values)
View vimgolf.vimrc
set nocompatible " use vim defaults
set scrolloff=3 " keep 3 lines when scrolling
set ai " set auto-indenting on for programming
set showcmd " display incomplete commands
set nobackup " do not keep a backup file
set number " show line numbers
set ruler " show the current row and column
package ca.jbrains.pos.test;
import static org.junit.Assert.*;
import java.util.*;
import org.junit.*;
public class SellOneItemTest {
private Display display;