Skip to content

Instantly share code, notes, and snippets.

lulz = %W{http://www.benchmark.com/sv/ http://www.benchmark.com/team/
http://www.benchmark.com/sv/general_partners/balkanski.shtml http://www.benchmark.com/people/general-partner/alex-balkanski/
http://www.benchmark.com/sv/general_partners/cohler.shtml http://www.benchmark.com/people/general-partner/matt-cohler/
http://www.benchmark.com/sv/general_partners/dunlevie.shtml http://www.benchmark.com/people/general-partner/bruce-dunlevie/
http://www.benchmark.com/sv/general_partners/fenton.shtml http://www.benchmark.com/people/general-partner/peter-fenton/
http://www.benchmark.com/sv/general_partners/gurley.shtml http://www.benchmark.com/people/general-partner/bill-gurley/
http://www.benchmark.com/sv/general_partners/harvey.shtml http://www.benchmark.com/people/general-partner/kevin-harvey
http://www.benchmark.com/sv/general_partners/kagle.shtml http://www.benchmark.com/people/general-partner/bob-kagle/
http://www.benchmark.com/sv/general_partners/lasky.shtml http://www.benchmark.com/people/general-partner/mitch-l
You are confident that then man will cease from INTENTIONAL error and will, so to say, be compelled not to want to set his will against his normal interests. That is not all; then, you say, science itself will teach man (though to my mind it's a superfluous luxury) that he never has really had any caprice or will of his own, and that he himself is something of the nature of a piano-key or the stop of an organ, and that there are, besides, things called the laws of nature; so that everything he does is not done by his willing it, but is done of itself, by the laws of nature. Consequently we have only to discover these laws of nature, and man will no longer have to answer for his actions and life will become exceedingly easy for him. All human actions will then, of course, be tabulated according to these laws, mathematically, like tables of logarithms up to 108,000, and entered in an index; or, better still, there would be published certain edifying works of the nature of encyclopaedic lexicons, in which everyt
We couldn’t find that file to show.
Requires
========
require.paths.unshift(__dirname + '/vendor/express/support/connect/lib');
require.paths.unshift(__dirname + '/vendor/express/support/ejs/lib');
require.paths.unshift(__dirname + '/vendor/express/lib');
require.paths.unshift(__dirname + '/vendor/node-mongodb-native/lib');
require.paths.unshift(__dirname + '/models');
var sys = require('sys'),
ctrl-z
bg
touch /tmp/stdout
touch /tmp/stderr
gdb -p $!
# In GDB
p dup2(open("/tmp/stdout", 1), 1)
p dup2(open("/tmp/stderr", 1), 2)
# I cannot credit the original author
class Haversine
#EARTH_RADIUS = 3963.19 # miles
EARTH_RADIUS = 6371 # kilometers
RADIAN_PER_DEGREE = Math::PI / 180.0
def self.distance(lat1, lng1, lat2, lng2)
lat1_radians = lat1 * RADIAN_PER_DEGREE
lat2_radians = lat2 * RADIAN_PER_DEGREE
require "socket"
server = TCPServer.new('0.0.0.0', 6969)
loop do
socket = server.accept
Thread.start do
s = socket
@melito
melito / Initial setup
Created March 6, 2011 22:14
Don't use this verbatim. Just showcases the idea behind HOW to get everything setup
# Add a git user
adduser git
# Add your ssh key
sudo -u git mkdir ~git/.ssh/
sudo cp id_rsa.pub ~git/.ssh/authorized_keys
sudo chown -R git.git ~git/.ssh
# Make a repo
sudo -u git mkdir ~git/MyRepo.git
We couldn’t find that file to show.
run "rm Gemfile"
file 'Gemfile', <<-FILE
source 'http://rubygems.org'
gem 'rails', '3.0.3'
gem 'rake', '~> 0.8.7'
gem 'devise', '~> 1.2.0'
gem 'cancan'
gem 'will_paginate', '~> 3.0.pre2'
gem 'tzinfo'