This is a brief and bare-bones guide to getting GHC 7.2 and the cabal-install
tool (the two basic things you'll need to do Haskell development) up and running
on a new Mac OS X 10.7 install.
The instructions given here worked for me, but YMMV.
// from : http://www.componentix.com/blog/9/file-uploads-using-nodejs-now-for-real | |
var http = require("http"); | |
var url = require("url"); | |
var multipart = require("multipart"); | |
var sys = require("sys"); | |
var events = require("events"); | |
var posix = require("posix"); | |
var server = http.createServer(function(req, res) { |
proxy_cache_path /var/www/cache levels=1:2 keys_zone=my-test-cache:8m max_size=5000m inactive=300m; | |
server { | |
location / { | |
proxy_pass http://127.0.0.1:3000; | |
proxy_cache my-test-cache; | |
proxy_cache_valid 200 302 60m; | |
proxy_cache_valid 404 1m; | |
} | |
} |
This Gist shows how to set up a Rails project to practice BDD with CoffeeScript, Guard and Jasmine. You can see this setup in action on Vimeo
bundle install
mate Guardfile
bundle exec jasmine init
mate spec/support/yasmine.ym
bundle exec guard
mapHeavy([1,2,3,4,5,6], function(e){setTimeout(function(){console.log(e);}, 1000);}); | |
mapHeavy([10,20,30,40,50,60], function(e){setTimeout(function(){console.log(e);}, 500);}); |
~/magellano/current$ bundle exec rake db:migrate --trace | |
Invalid gemspec in [/usr/local/lib/ruby/gems/1.9.1/specifications/json-1.6.1.gemspec]: invalid date format in specification: "2011-09-18 00:00:00.000000000Z" | |
Importer needs env to startup | |
** Invoke db:migrate (first_time) | |
** Invoke environment (first_time) | |
** Execute environment | |
rake aborted! | |
undefined method `each' for nil:NilClass | |
/home/vagrant/magellano/shared/bundle/ruby/1.9.1/gems/actionpack-3.2.0/lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb:68:in `register_javascript_expansion' | |
/home/vagrant/magellano/shared/bundle/ruby/1.9.1/gems/actionpack-3.2.0/lib/action_view/railtie.rb:21:in `block (2 levels) in <class:Railtie>' |
console.log("Oh hai") | |
function not_retarded_fib(n){ | |
if(n < 3){ | |
return 1; | |
} | |
var learn_dynamic_programming = [1,1]; | |
for (var i = 2; i <= n; i++){ | |
learn_dynamic_programming[i] = learn_dynamic_programming[i - 1] + learn_dynamic_programming[i - 2]; |
#!/usr/bin/env node | |
var email = process.argv[2]; | |
var crypto = require('crypto'); | |
function trim (str) { | |
var str = str.replace(/^\s\s*/, ''), | |
ws = /\s/, | |
i = str.length; | |
while (ws.test(str.charAt(--i))); |
var request = require('request'), default_headers, site_root = 'http://localhost:3000';; | |
default_headers = { | |
'User-Agent': 'Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1', | |
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', | |
'Accept-Language': 'en-us,en;q=0.5', | |
'Accept-Encoding': 'gzip, deflate', | |
'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', | |
// 'Connection': 'keep-alive', | |
'Cache-Control': 'max-age=0' |
var site_url = 'http://www.pudelek.pl/'; | |
var default_headers = { | |
'User-Agent': 'Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1', | |
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', | |
'Accept-Language': 'en-us,en;q=0.5', | |
'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', | |
'Cache-Control': 'max-age=0' | |
}; |