Skip to content

Instantly share code, notes, and snippets.

View stungeye's full-sized avatar

Kyle Geske stungeye

View GitHub Profile
@raganwald
raganwald / binary-encoded.js
Last active April 1, 2017 13:35
Compiler that translates a program for a Turing Machine with arbitrary marks, into a program for a Turing Machine that only uses ones and zeroes
// binary encode a possibly unflattened instruction set with
// marks beyond 0 and 1
function binaryEncoded ({ description: descriptionWithMarks, tape: tapeWithMarks = [], LEFT, RIGHT, HALT, Write, Move }) {
const recognizeStates = new Set();
const marks = new PseudoSet();
for (const [currentState, currentMark, nextState, ...instructions] of descriptionWithMarks) {
recognizeStates.add(currentState);
@chrisjacob
chrisjacob / README.md
Created February 18, 2011 03:44
Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Intro

Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Author: Chris Jacob @_chrisjacob

Tutorial (Gist): https://gist.github.com/833223

The Result

@cowboy
cowboy / pubsub-demo.js
Created December 16, 2010 20:04 — forked from rmurphey/pubsub-demo.js
Two approaches: "Traditional" vs Pub/Sub (via rmurphey)
// Note that this uses my Pub/Sub implementation, which is slightly different than
// phiggins' in that jQuery custom events are used, and as such the first event handler
// argument passed is the event object.
//
// jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery
// https://gist.github.com/661855
// The "traditional" way.
@ahoward
ahoward / net-http-debug.rb
Created December 10, 2010 20:06
a simple way to debug tons of libs that use ruby's net/http
BEGIN {
require 'net/http'
Net::HTTP.module_eval do
alias_method '__initialize__', 'initialize'
def initialize(*args,&block)
__initialize__(*args, &block)