Skip to content

Instantly share code, notes, and snippets.

View chrisfarber's full-sized avatar

Chris Farber chrisfarber

View GitHub Profile
$.fn.spinner = (optsOrFalse) ->
if (optsOrFalse != false)
# EVENTUALLY add small, med, large sizes for these options based on the height of the element being spun
spinSize = 25
settings = $.extend({
lines: 10
length: 5
width: 2
radius: 3
/*
CS 343 Project 3
Polynomials
Chris Farber, Winter 2010
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "polynomial.h"
import Foundation
import RxSwift
class Ref<E> {
private let value : Variable<E>
private let q = dispatch_queue_create("net.chrisfarber.Ref<\(E.self)>", DISPATCH_QUEUE_SERIAL)
init(i:E) {
value = Variable(i)
}
@chrisfarber
chrisfarber / block.rb
Last active March 28, 2017 20:03
exploring ruby's nuances
module Thing
module_function
def thing(&block)
(1..3).map(&block)
end
def other_thing
thing do |v|
next(:surprise) if v == 2