Skip to content

Instantly share code, notes, and snippets.

View wjlroe's full-sized avatar
📷

William Roe wjlroe

📷
View GitHub Profile
@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)
@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

@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',
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
@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
@teropa
teropa / resources.md
Last active December 4, 2020 05:42
Clojure Resources

Tutorials

(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

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

(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]))
@jlduran
jlduran / article.md
Last active April 4, 2024 04:35
pandoc booktabs minimal template (illustrative purposes only) (See: https://github.com/jgm/pandoc/pull/1076)

How big's your cloud? {-}


                    **Apple**    **Google**   **Microsoft**

Revenue[^1], $bn 34.6 22.3 58.4

Profit[^1], $bn 5.2 4.6 14.6

Market capitalisation 170.2 127.3 230.4