Skip to content

Instantly share code, notes, and snippets.

@thoughtpolice
thoughtpolice / ICE40.hs
Last active December 30, 2017 21:26
CLaSH for the iCE40-HX8K Breakout Board helper module
-- |
-- Module : CLaSH.Lattice.ICE40
-- Copyright : (c) Austin Seipp 2016
-- License : MIT
--
-- Maintainer : aseipp@pobox.com
-- Stability : experimental
-- Portability : portable
--
-- This module provides Phase Lock Loop (PLL) @'ClockSource'@s for the Lattice
@tgecho
tgecho / Directional React Animations.markdown
Last active April 16, 2018 12:40
Directional React Animations

Directional React Animations

This is a demo of dynamic directional transitions using React's CSSTransitionGroup.

A Pen by tgecho on CodePen.

License.

@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
@mattmcd
mattmcd / Hello.g4
Last active April 19, 2024 08:04
Simple ANTLR4 grammar example
// define a grammar called Hello
grammar Hello;
r : 'hello' ID;
ID : [a-z]+ ;
WS : [ \t\r\n]+ -> skip ;
@joaoneto
joaoneto / login.test.js
Created March 13, 2013 13:49
Login session test with mocha
var request = require('supertest'),
should = require('should'),
app = require('../server');
var Cookies;
describe('Functional Test <Sessions>:', function () {
it('should create user session for valid user', function (done) {
request(app)
.post('/v1/sessions')
@jrolfs
jrolfs / proxycookie.js
Created April 25, 2012 15:43
Express Node.js web server that forwards proxied cookies
var express = require('express'),
proxy = require('http-proxy'),
app = express.createServer();
var routingProxy = new proxy.RoutingProxy();
var apiHost = process.argv[2] ? process.argv[2] : 'my.api.com';
var apiPort = process.argv[3] ? process.argv[3] : '8080';
var apiPrefix = process.argv[4] ? process.argv[4] : '1.1';
function onApiProxyEnd(req, res, proxyHeaders) {