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
Warning: Your Xcode (4.2.1) is outdated | |
Please install Xcode 4.5. | |
Warning: It appears you have MacPorts or Fink installed. | |
Software installed with other package managers causes known problems for | |
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again. | |
Error: undefined method `version' for nil:NilClass | |
Please report this bug: | |
https://github.com/mxcl/homebrew/wiki/bug-fixing-checklist | |
/usr/local/Library/Homebrew/formula.rb:51:in `initialize' | |
/usr/local/Library/Homebrew/formula.rb:403:in `new' |
This file has been truncated, but you can view the full file.
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
require 'formula' | |
class Php52 <Formula | |
@url='http://www.php.net/get/php-5.2.17.tar.bz2/from/www.php.net/mirror' | |
@version='5.2.17' | |
@homepage='http://php.net/' | |
@md5='b27947f3045220faf16e4d9158cbfe13' | |
depends_on 'jpeg' | |
depends_on 'freetype' |
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
var _ = require('underscore'); | |
function serialize(arr, object) { | |
if (_(arr).contains(object)) | |
{ | |
throw "cycle detected"; | |
} | |
var szfn = _(serialize).bind(null, arr); | |
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
var http = require('http'); | |
var client = http.createClient(1337, 'localhost'); // to access this url i need to put basic auth. | |
for (var j=0; j<=100000; j++) { | |
var request = client.request('GET', '/', | |
{'host': 'www.example.com'}); | |
request.end(); | |
} |
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
{-# LANGUAGE BangPatterns #-} | |
module Main where | |
import System.IO | |
import System.Environment (getArgs) | |
import Control.Arrow (first) | |
main = do | |
handle <- openFile "IntegerArray.txt" ReadMode | |
numbers <- fmap (map read . lines) $ hGetContents handle | |
print (countInversions numbers) |
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
module Main where | |
import System.IO | |
import System.Environment (getArgs) | |
main = do | |
handle <- openFile "IntegerArray.txt" ReadMode | |
numbers <- fmap (map read . lines) $ hGetContents handle | |
print (countInversions numbers) | |
hClose handle | |
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
var http = require('http'); | |
zlib = require('zlib') | |
var request = http.get({ host: 'www.desilva.biz', | |
path: '/php/zlib.html', | |
port: 80, | |
headers: { 'accept-encoding': 'gzip,deflate' } }); | |
request.on('response', function(resp){ | |
var headers = resp.headers['content-encoding'] |
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
> require('compress') | |
Error: Cannot find module 'compress' | |
at Function._resolveFilename (module.js:334:11) | |
at Function._load (module.js:279:25) | |
at Module.require (module.js:357:17) | |
at require (module.js:368:17) | |
at repl:1:2 | |
at REPLServer.eval (repl.js:80:21) | |
at Interface.<anonymous> (repl.js:182:12) | |
at Interface.emit (events.js:67:17) |
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
request: function(options, cb) { | |
var cache; | |
if (options.cache) cache = './data/cache/' + options.cache; | |
var http_req = function() { | |
req(options, function(error, response, body){ | |
if (!error && options.cache) { | |
if (response.headers['content-encoding'].search('gzip') != -1) { | |
// UHOH | |
} |
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/ruby | |
require 'rubygems' | |
require 'syslog_logger' | |
require 'net/http' | |
require 'logger' | |
COOKIE_FILE = File.expand_path('../cookies.yml', __FILE__) | |
def log | |
@log ||= SyslogLogger.new('keep_logged_in') |