Skip to content

Instantly share code, notes, and snippets.

View outworlder's full-sized avatar

Stephen Pedrosa Eilert outworlder

  • San Francisco Bay Area
View GitHub Profile
@outworlder
outworlder / gist:4695257
Created February 2, 2013 00:40
Moderation Magic - Work in progress
module ModeratedModel
extend ActiveSupport::Concern
included do
belongs_to :admin_approval
scope :moderated, where(moderated: true)
scope :not_moderated, where(moderated: false)
end
module ClassMethods
NSInteger numberOfRows = [tableView numberOfRows];
if (numberOfRows > 0)
[tableView scrollRowToVisible:numberOfRows - 1];
GOARCH=amd64
GOBIN=/usr/local/bin
GOOS=darwin
GOROOT=/usr/local/Cellar/go/1.0.1
(function() {
var $screen, animate, camera, define_ships, init_simulation, mesh, render, renderer, scene;
$screen = $('#viewscreen');
renderer = mesh = scene = camera = null;
init_simulation = function() {
var cobra_geom, fov, material, screenHeight, screenWidth;
screenWidth = $screen.width();
@outworlder
outworlder / gist:2039617
Created March 14, 2012 21:22
Elite ship sources
/*-- Defined object types, their point --*/
/*-- co-ordinates and facet orders in --*/
/*-- anitclockwise fashion as viewed --*/
static int TRIANGLEpoints[][]= /* triangle for explosions */
rake test
WARNING: 'require 'rake/rdoctask'' is deprecated. Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead.
at /home/stephen/.rvm/gems/rbx-head@global/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
rake/gempackagetask is deprecated. Use rubygems/package_task instead
[BUG: requested Object for unknown NativeMethod handle type]
/home/stephen/.rvm/rubies/rbx-head/bin/rbx(_ZN8rubinius3bugEPKc+0x80) [0x81c4180]
/home/stephen/.rvm/rubies/rbx-head/bin/rbx(rb_define_const+0x18f) [0x8388bff]
/home/stephen/Documentos/Projetos/Guilda/ci/ruby-libvirt-0.4.0/ext/libvirt/_libvirt.so(init_domain+0x18cb) [0x12c53b]
/home/stephen/Documentos/Projetos/Guilda/ci/ruby-libvirt-0.4.0/ext/libvirt/_libvirt.so(Init__libvirt+0x156a) [0x12521a]
/home/stephen/.rvm/rubies/rbx-head/bin/rbx(_ZN8rubinius16GenericArguments6invokeEPNS_5StateEPNS_12NativeMethodEPNS_23NativeMethodEnvironmentERNS_9ArgumentsE+0x1566) [0x82dfb36]
# -*- coding: utf-8 -*-
def ☠(n)
☥ = 10
blacks = %w(♟ ♝ ♞ ♜ ♛ ♚)
whites = %w(♙ ♗ ♘ ♖ ♕ ♔)
n.times { puts "yaaaaaaar" }
puts ☥
# -*- coding: utf-8 -*-
def ☠(n)
n.times { puts "yaaaaaaar" }
end
☠(10)
(foreign-declare "#include <mongo.h>")
(define-foreign-type Mongo c-pointer)
(define mongo-create
(foreign-lambda* c-pointer ()
"mongo* mongo;
mongo = malloc(sizeof(mongo));
C_return(mongo);"))
;;; Collect Postgresql statistics
(use postgresql)
(define connection-string (make-parameter '((host . "<ip>")
(user . "<user here>")
(dbname . "<db name here>"))))
(define conn (connect (connection-string)))