This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(window){ | |
window.tmpl = function(str, c) { | |
var c = c || "it"; | |
return new Function(c, | |
"var p=[];p.push('" + | |
str.replace(/[\r\t\n]/g, " ") | |
.replace(/'(?=[^<]*%>)/g,"\t") | |
.replace(/'/g, "\\'") | |
.replace(/\t/g, "'") | |
.replace(/<%=(.+?)%>/g, "',$1,'") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
bf.py | |
Brainfuck interpreter written in python. | |
Does not handle input :( | |
""" | |
import sys | |
def run(src): | |
c = [0] * 30000 | |
p = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby | |
# - a browser with WebSocket support | |
# | |
# Usage: | |
# ruby redis_pubsub_demo.rb | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'highline' | |
require 'optparse' | |
require 'etc' | |
current_user = Etc.getpwuid | |
OPTIONS = { |
NewerOlder