Skip to content

Instantly share code, notes, and snippets.

View myrtleTree33's full-sized avatar
🦄

jhtong myrtleTree33

🦄
View GitHub Profile
@hidsh
hidsh / full_adder.vhdl
Created December 4, 2012 07:07
VHDL: half adder and full adder
-- full_adder.vhdl
-- desc: 1bit full adder
entity FULL_ADDER is
port(A, B, CIN: in bit;
SUM, COUT: out bit);
end FULL_ADDER;
architecture STRUCT of FULL_ADDER is
component HALF_ADDER
@tetsuok
tetsuok / fibonacci_closure.go
Created April 2, 2012 08:48
An answer of the exercise: Fibonacci closure on a tour of Go
package main
import "fmt"
// Very naive answer.
// fibonacci is a function that returns
// a function that returns an int.
func fibonacci() func() int {
n := 0
a := 0
@joshbirk
joshbirk / samplerest.js
Created February 3, 2012 19:57
Sample of using passport w/ mult strategies
var fs = require("fs")
var ssl_options = {
key: fs.readFileSync('privatekey.pem'),
cert: fs.readFileSync('certificate.pem')
};
var port = process.env.PORT || 3000;
var express = require('express');
var ejs = require('ejs');
var passport = require('passport')