Skip to content

Instantly share code, notes, and snippets.

View olsonjeffery's full-sized avatar
💭
:3

Jeff Olson olsonjeffery

💭
:3
View GitHub Profile
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())
}
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() )
}
@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
@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>
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]
Blah: class {
bar: Func
baz: Func
foo: func() {
derp: String
this bar = func {
derp = "derp"
}
this baz = func {
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
@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..
@olsonjeffery
olsonjeffery / gist:749108
Created December 20, 2010 22:21
issue with backbone + zepto in ff 3.6
The Error:
element["insertAdjacent" + (html instanceof Element ? "Element" : "HTML")] is not a function
http://localhost:8080/scripts/zepto.js
Line 145
the zepto.js is 5ecaa (HEAD of the zepto repo)
backbone.js is 261059 (HEAD of backbone's repo)
the stack looks like..
@olsonjeffery
olsonjeffery / gnome-shell-signals.txt
Created February 12, 2011 16:42
gnome-shell signals for window stuff .. #gnome-shell on irc.oftc.org
< pfox__> Where would do I need to look in the gnome-shell
code to see the signals exposed for window
creation/destruction and workspace switching? can i
keep it confined to the js?
08:35 -!- elleuca [~elleuca@adsl-ull-172-178.50-151.net24.it] has
left #gnome-shell []
08:36 < milanbv> pfox__: they are in Mutter
08:36 < milanbv> but you can use them from JS
08:37 < milanbv> the code is in
~/gnome-shell/source/mutter/src/core/workspace.c