Skip to content

Instantly share code, notes, and snippets.

View wjlroe's full-sized avatar
📷

William Roe wjlroe

📷
View GitHub Profile
@toranb
toranb / half_baked_pagination.js
Created January 1, 2013 23:59
A half baked ember.js pagination solution using the v2 router api
PersonApp = Ember.Application.create();
PersonApp.SearchField = Ember.TextField.extend({
keyUp: function(e) {
var search = this.get('value');
this.get('controller.target').send('searchUsers', {match:search});
}
});
PersonApp.PersonView = Ember.View.extend({
templateName: 'person',
@scrooloose
scrooloose / chef.vim
Last active December 12, 2015 07:38 — forked from dougireton/chef.vim
function! SyntaxCheckers_chef_foodcritic_IsAvailable()
return executable('foodcritic')
endfunction
function! SyntaxCheckers_chef_foodcritic_GetLocList()
" let exe = expand(g:syntastic_ruby_exec)
" if !has('win32')
" let exe = 'RUBYOPT= ' . exe
" endif
(ns logic-ast.core
(:refer-clojure :exclude [==])
(:require [clojure.java.io :as io]
[clojure.pprint :as pp]
[cljs.env :as env]
[cljs.analyzer.utils :as u]
[cljs.analyzer :as ana]
[clojure.core.logic
:refer [run run* conde == fresh lcons partial-map defne] :as l]
[clojure.core.logic.pldb :as pldb]))
@buritica
buritica / iosd
Created March 29, 2012 18:52
Enable Remote Inspector on Mobile Safari
#!/bin/bash
# Open iPhone Simulator on default location for XCode 4.3 if found
[[ -d /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] &&
open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app
# Open iPhone Simulator on default location for XCode 4.2 if found
[[ -d /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] &&
open /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app
@zed
zed / .gitignore
Created November 20, 2011 14:20
WebSocket Echo :python:twisted:txws:jquery:
/twistd.pid
/_trial_temp/
@sleeptillseven
sleeptillseven / erlang_vm.md
Last active July 18, 2016 13:44
Collection of interesting resources for studying the Erlang VM

List of Interesting Resources Describing the Erlang VM

Hitchhiker's guide to the Erlang VM

Author: Robert Virding (Co-inventor of Erlang)

Slides: pdf

Video: youtube

require 'connection_pool'
require 'redis'
require 'metriks'
class RedisClientWrapper
def initialize(options)
@options = options.delete(:pool)
@pool = ConnectionPool.new(@options) do
::Redis.new(options)
end
@mebens
mebens / gist:3929259
Created October 22, 2012 02:07
Generate a linear radial gradient in Love2D
local function scale(x, min1, max1, min2, max2)
return min2 + ((x - min1) / (max1 - min1)) * (max2 - min2)
end
local function distance(x1, y1, x2, y2)
return math.sqrt((x2 - x1) ^ 2 + (y2 - y1) ^ 2)
end
function radialGradient(radius)
local data = love.image.newImageData(radius * 2, radius * 2)

Guide to loading/error events and substates

In addition to the techniques described in the Asynchronous Routing Guide, the Ember Router provides powerful yet overridable conventions for customizing asynchronous transitions between routes by making use of error and loading substates.

loading substates

@oubiwann
oubiwann / 01-setup.sh
Last active November 11, 2018 13:56 — forked from digego/keynote.scm
Instructions for Running Andrew Sorensen's OSCON 2014 Keynote Performance
$ git clone https://gist.github.com/8b4404e538e61c7996a5.git
$ cd 8b4404e538e61c7996a5
$ mkdir salamander && cd salamander
$ curl -L -O https://archive.org/download/SalamanderDrumkit/salamanderDrumkit.tar.bz2
$ curl -L -O https://github.com/johnsen/drumsandpercussion/blob/master/SalamanderKick/salamanderdrum-kick-r1.tar.gz
$ curl -L -O http://freepats.zenvoid.org/Piano/SalamanderGrandPianoV3_44.1khz16bit.tar.bz2
$ tar xvfz salamanderDrumkit.tar.bz2
$ tar xvfz salamanderdrum-kick-r1.tar.gz
$ mv Kick/kick* OH/
$ tar xvfz SalamanderGrandPianoV3_44.1khz16bit.tar.bz2