Author: Robert Virding (Co-inventor of Erlang)
Slides: pdf
Video: youtube
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) |
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', |
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 |
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 riemann-config-test | |
(:use | |
midje.sweet | |
riemann.streams | |
riemann.client | |
riemann.email | |
riemann.sns | |
[riemann.time :only [unix-time linear-time once! every!]]) | |
(:require | |
riemann.streams |
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.
(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])) |