Skip to content

Instantly share code, notes, and snippets.

View foxyblocks's full-sized avatar

Chris Schlensker foxyblocks

View GitHub Profile
@foxyblocks
foxyblocks / train.js
Created January 25, 2015 07:02
Elevator Saga (Train strategy)
{
init: function(elevators, floors) {
var floorsWaiting = {
up: [],
down: []
};
var self = this;
var distance = function(num1, num2) {
@foxyblocks
foxyblocks / classic.js
Created January 25, 2015 07:02
Elevator Saga (classic elevator strategy)
{
init: function(elevators, floors) {
var floorsWaiting = {
up: [],
down: []
};
var self = this;
var distance = function(num1, num2) {
PROPS = %w{
appearance
align-content
align-items
backface-visibility
background-size
border-radius
box-orient
box-shadow
box-sizing
var angular = require('angular');
// Simple directive that prevents an event from propagating to
// up the dom tree.
//
// ex:
// <div ng-click='doSomething()'>
// <a stop-event='click'>Some link</a>
// </div>
//
if student == :brave
puts "Griffindor!"
elsif student == :smart
puts "Ravenclaw!"
elsif student == :asshole
puts "Slytherin!"
else
puts "Shit... I don't know... Hufflepuff! ... I guess..."
end
8fa668c - (HEAD, origin/master, origin/HEAD, master) fix landing spec (4 minutes ago) <Christian Schlensker>
diff --git a/spec/features/landing_spec.rb b/spec/features/landing_spec.rb
index 13a5cc5..167cdae 100644
--- a/spec/features/landing_spec.rb
+++ b/spec/features/landing_spec.rb
@@ -42,7 +42,7 @@ describe 'Course Landing Pages', :js do

within container do
fill_in :email, with: email
- click_on button
@foxyblocks
foxyblocks / KIF.podspec
Created February 28, 2012 18:35
A CocoaPods PodSpec for the KIF framework
#
# Be sure to run `pod spec lint KIF.podspec' to ensure this is a
# valid spec.
#
# Remove all comments before submitting the spec.
#
Pod::Spec.new do |s|
s.name = 'KIF'
s.version = '0.0.1'
s.license = 'MIT'
@foxyblocks
foxyblocks / gist:2314735
Created April 5, 2012 22:38
easy vim hash=>rocket and php $object->thingy
"Paste into your .vimrc
" for insert mode remap <c-l> to:
" Insert a hash rocket for ruby
" Insert a -> for php
function! SmartHash()
let ruby = match(expand("%"), '\(.rb\|.haml\)$') != -1
let php = match(expand("%"), '.php') != -1
if php
@foxyblocks
foxyblocks / env.rb
Created August 8, 2012 04:54
Conditional spork with cucumber
ENV["RAILS_ENV"] ||= 'test'
require 'pry'
# Conditional Spork.prefork (this comment is needed to fool Spork's `bootstrapped?` check)
if /spork/i =~ $0
require File.expand_path("../env_spork", __FILE__)
else
require File.expand_path("../env_base", __FILE__)
end
@foxyblocks
foxyblocks / .ackrc
Created August 9, 2012 18:09
Ackrc
--type-set=mustache=.mustache
--type-set=css=.css,.scss,.less
--type-set=html=.html,.haml,.hamlc
--type-set=js=.js,.coffee