This file contains 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
Torrentizer Flow | |
======= | |
creator POSTS to /create/#{feed_url} | |
sinatra adds url to Url db if url doesn't exist | |
sinatra 301 redirects creator to /made/#{hash} | |
hasher_loop do | |
feed_urls.all.each do |url| |
This file contains 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
== NGINX HTTP PUSH == | |
Steps to reproduce: | |
Install passenger gem: | |
sudo gem install passenger | |
Download nginx: | |
wget http://sysoev.ru/nginx/nginx-0.7.62.tar.gz | |
tar -zxvf nginx-0.7.62.tar.gz |
This file contains 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
<html> | |
<head> | |
<title>RSpec</title> | |
<style> | |
body { | |
background-color: #333; | |
color: #FFF; | |
font-family: "Lucida Grande", "Helvetica", sans-serif; | |
} |
This file contains 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
require 'erb' | |
require 'spec/runner/formatter/base_text_formatter' | |
require 'spec/runner/formatter/no_op_method_missing' | |
class CukeappFormatter < Spec::Runner::Formatter::BaseTextFormatter | |
include ERB::Util # for the #h method | |
include Spec::Runner::Formatter::NOOPMethodMissing | |
include Spec::Runner::Formatter | |
def initialize(options, output) |
This file contains 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
<html> | |
<head> | |
<title>Mutation</title> | |
<script type="text/javascript"> | |
var canvas; | |
var ctx; | |
// Colors to use for the circles. A larger array means more circles. | |
var colors = ["rgba(171, 207, 43, 0.5)", | |
"rgba(201, 7, 33, 0.5)", |
This file contains 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 macruby | |
# from tomafro.net | |
framework 'Cocoa' | |
framework 'WebKit' | |
class Snapper | |
attr_accessor :options, :view, :window | |
def initialize(options = {}) |
This file contains 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
process.mixin(GLOBAL, require("sys")); | |
var posix = require("posix"); | |
posix.stat("/etc/hsdfsd").addCallback(function(stat) { | |
puts(stat); | |
}).addErrback(function(err) { | |
puts(err); | |
}).wait(); | |
// Error: No such file or directory |
This file contains 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
var fs = require("fs"); | |
fs.readFile("/etc/hosts").addCallback(function (content) { | |
sys.puts(content); | |
}); | |
// TypeError: Cannot call method 'addCallback' of undefined | |
// at Object.<anonymous> (/Users/mnutt/code/feature_service/test.js:2:27) | |
// at Module._loadContent (node.js:929:21) | |
// at node.js:957:20 | |
// at node.js:561:25 |
This file contains 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
// node.js v0.1.91 | |
Error: Parse Error | |
at Stream.ondata (http:524:30) | |
at IOWatcher.callback (net:307:31) | |
at node.js:748:9 |
This file contains 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 | |
# ffcurl | |
# | |
# This curl that automatically uses your firefox cookies. Use it like you would normally | |
# use curl. Report bugs to michael@nuttnet.net. Or better yet, fork it from: | |
# | |
# http://gist.github.com/393140 | |
# | |
# Also for webkit/safari: http://gist.github.com/393141 |