Skip to content

Instantly share code, notes, and snippets.

View doppioslash's full-sized avatar

Claudia Doppioslash doppioslash

View GitHub Profile
@arturaz
arturaz / gist:9757939
Last active August 29, 2015 13:57
Example of keyboard dashing behaviour for Unity3D using TLPLib Reactive Extensions (https://github.com/tinylabproductions/tlplib)
using System;
using System.Collections;
using com.tinylabproductions.TLPLib.Collection;
using com.tinylabproductions.TLPLib.Functional;
using com.tinylabproductions.TLPLib.Reactive;
using UnityEngine;
namespace Keyboard {
class KeyboardDash : MonoBehaviour {
private const int presses = 2;
@puffnfresh
puffnfresh / LoobVerifiedMonoid.idr
Created April 22, 2014 13:46
Verified monoid for a boolean algebra
module LoobVerifiedMonoid
data Loob = Eurt | Eslaf
instance Semigroup Loob where
Eurt <+> _ = Eurt
Eslaf <+> r = r
instance Monoid Loob where
neutral = Eslaf
@Whelton
Whelton / gradients_maths_and_insanity.md
Created September 21, 2014 21:12
Gradients, Maths and Insanity

Here a quick thought of insanity before I leave the office at ~1.05am. I dwell and fret over design, particularly when its me making the decision, to the point of insanity (a recurring theme here).

If I have a base color, I use Adobe's Kuler to get matching colors (with some rule depending) or I checkout ColourLovers to use a platte crafted by someone with a keener eye than I. Similarly I use a typography calculator to define font sizes relative to each other and so on, so on. I have a whole bunch of these rules and methods I use so I can sleep easier knowing there is method behind my design choices.

Heres one I came up against just there, I wanted to put in a nice gradient as background in something I'm building at the moment, like anyone else who is a regular connoisseur of GitHub's trending repos, I stumbled across uiGradients ([Repo](https://git

@nasser
nasser / chance.clj
Created February 8, 2015 22:21
chance macro
(defmacro chance [& body]
(let [r (gensym "chance")
pairs (sort-by first (partition 2 body))
odds (map first pairs)
exprs (map last pairs)
sum (apply + odds)
fracs (map #(float (/ % sum)) odds)
frac-pairs (partition 2 (interleave fracs exprs))]
`(let [~r (rand)]
(cond
@jewelia
jewelia / gist:0b8f26e91f2818bef460
Last active August 29, 2015 14:15
3 Great Engineering Management Talks from 2014

General key themes:

  • Hiring is really hard. You’re not just hiring a “Rails Engineer” or a “Python Programmer” you’re hiring someone who can help you change the world. Tell them why! Talk about the hard problems you’re solving. 2/3 of these talks give ideas and insight into hiring from sourcing to actual interview processes.

  • Rewriting systems is hard. People think they are going to replace their broken down horse and buggie with a bullet train and this often ends up in disaster. Successful rewrites require an incremental approach that takes months/years and often runs way over schedule. 2/3 of these talks go over how to handle rewrites not only from a high level technical perspective but a cultural/management perspective as well.

Two Developers, Many Lines of Code, and A Campaign that Made History

Harper Reed (CTO of Obama for America, now CEO of Modest) and Dylan Richard (Director of Eng of Obama for America, now CTO of Modest)

interface Disposable {
dispose(): void
}
interface Observable<T> {
subscribe(observer: Observer<T>) : Disposable
// OR
forEach(observer: Observer<T>) : Disposable
}
-- Only works with Elm 0.15
import Html
import Task
import Port
import Debug
import Dict
import Time
-- MODEL
@coreyhaines
coreyhaines / abstract
Last active August 29, 2015 14:18
Craft Conf Abstract
# abstract for my talk at Craft Conf 2015 (http://craft-conf.com/2015)
You've probably heard about the lambda calculus, building up our computing structures from just the treasured lambda. But how much have you played with it?
In this talk, armed only with Vim and the CLI, we'll explore some interesting topics in building up our world with just the lambda and the thought process while doing it. While you probably don't want to program day-to-day at this level, it definitely can help with how you think about your regular programming.
This talk consists almost entirely of live coding. FUN TIMES!
@cgrand
cgrand / transmogrify.clj
Last active August 29, 2015 14:18
transmogrify->> rewrites last-threaded forms to use transducers.
(defmulti transmogrify
"Rewrites the last form of a thread-last to use transducer (if possible)."
(fn [f xform src & args] f))
(defmacro transmogrify->>
"Like ->> but uses transducers"
([x] x)
([src & xs]
(let [end (last xs)
xforms (butlast xs)
@sgrove
sgrove / learn_gamma_09.cljs
Last active August 29, 2015 14:21
Compare "Learn WebGL 09" with "Learn Gamma 09"
(ns gampg.learn-gamma.lesson-09
(:require [clojure.string :as s]
[gamma.api :as g]
[gamma.program :as p]
[gamma.tools :as gt]
[gamma-driver.drivers.basic :as driver]
[gamma-driver.protocols :as dp]
[goog.webgl :as ggl]
[thi.ng.geom.core :as geom]
[thi.ng.geom.core.matrix :as mat :refer [M44]]