Skip to content

Instantly share code, notes, and snippets.

View olsonjeffery's full-sized avatar
💭
:3

Jeff Olson olsonjeffery

💭
:3
View GitHub Profile
@olsonjeffery
olsonjeffery / Creator.cs
Created November 30, 2010 18:52
An idea of what a useful API for using fluent fixtures might look like.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Client.Framework;
using NHibernate;
namespace Example.Specs.Creators
{
// Creator<T> provides an framework for defining streamlined, *test-only* factories for domain entities..
ooc-glu, Compiling regenerated modules...
gcc -std=gnu99 -Wall -g -I/home/jeff/src/rock/libs/headers/ -Irock_tmp -w -c rock_tmp/ooc-glu/glu/Glu.c -o rock_tmp/glu_Glu.o -I/home/jeff/src/rock/libs/headers/ -Irock_tmp -D__OOC_USE_GC__ -DGC_NO_THREAD_REDIRECTS -I.libs/source -I.libs/sdk -I.libs/out -I.libs/ooc-sdl -I.libs/ooc-glu -w -lGLU -lGL
gcc -std=gnu99 -Wall -g -I/home/jeff/src/rock/libs/headers/ -Irock_tmp -w .libs/source-linux32.a .libs/sdk-linux32.a .libs/out-linux32.a .libs/ooc-sdl-linux32.a .libs/ooc-glu-linux32.a .libs/source-linux32.a .libs/sdk-linux32.a .libs/out-linux32.a .libs/ooc-sdl-linux32.a .libs/ooc-glu-linux32.a -D__OOC_USE_GC__ -DGC_NO_THREAD_REDIRECTS -I.libs/source -I.libs/sdk -I.libs/out -I.libs/ooc-sdl -I.libs/ooc-glu -o icmadness -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -lSDL -lGLEW -lGL -lGLU -lm -lSDL_image -lftgl -I/usr/include/FTGL -I/usr/include/freetype2 -lpthread /home/jeff/src/rock/libs/linux32/libgc.a
.libs/source-linux32.a(gfx_Texture.o): In function `gfx_Texture__T
Blah: class {
bar: Func
baz: Func
foo: func() {
derp: String
this bar = func {
derp = "derp"
}
this baz = func {
exec = require('child_process').exec
spawn = require('child_process').spawn
sha1Hash = (path, cb) ->
curr = process.cwd()
process.chdir path
bleh = ''
exec 'git log -1', (er, o, e) ->
process.chdir curr
sha1 = o.split('\n')[0].replace('commit ', '')[0..7]
@olsonjeffery
olsonjeffery / sproutcore_gem_install_log.txt
Created September 21, 2010 15:48
powershell output when trying to install the sproutcore gem
PS C:\> gem install rdiscount --platform=ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed rdiscount-1.6.5
1 gem installed
Installing ri documentation for rdiscount-1.6.5...
Installing RDoc documentation for rdiscount-1.6.5...
PS C:\> ruby -rubygems -e "require 'rdiscount'; puts RDiscount.new('**Hello RubyInstaller**').to_html"
<p><strong>Hello RubyInstaller</strong></p>
@olsonjeffery
olsonjeffery / Examples.cs
Created September 14, 2010 20:35
Example of a RequireQueryStringValuesAttribute for ASP.NET MVC
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Reflection;
// Examples.cs
// based on the RequireRouteValuesAttribute found on SO at:
// http://stackoverflow.com/questions/1045316/asp-net-mvc-ambiguous-action-methods
import structs/ArrayList
main: func {
list := ArrayList<int> new()
for (i in 0..10) list add(i)
anotherList := list filter(|x| x <= 5)
anotherList each(|x| (x toString()) println() )
}
main: func {
"Hello world" println()
list := ArrayList<Int> new()
for (i in 0..10) list add(i)
stringList := list map(|x| (x as Int) toString() + "blah ")
stringList each(|x| (x as String) println())
}