935MB nginx log (dpx)
MB/sec in both charts means:
orig. size - compressed size
____________________________
real time
class Array | |
# Returns the index number of a matching element. | |
# The returned element is not guaranteed. | |
# target must implement #<=> | |
# example: | |
# arr = [2,3,5,7,11,13,17,19,23,29] | |
# arr.bsearch_index(2) => 0 | |
# arr.bsearch_index(23) => 8 | |
# arr.bsearch_index(10) => nil | |
# nil always is nil: |
CREATE TABLE test ( | |
a_smallint SMALLINT, | |
a_integer INTEGER, | |
a_bigint BIGINT, | |
a_decimal DECIMAL(10,3), | |
a_numeric NUMERIC(10,3), | |
a_real REAL, | |
a_double_precision DOUBLE PRECISION, | |
a_serial SERIAL, | |
a_bigserial BIGSERIAL, |
Joshuas-MacBook-Pro:postgresql-node joshua$ npm publish | |
npm ERR! need auth auth and email required for publishing | |
npm ERR! need auth You need to authorize this machine using `npm adduser` | |
npm ERR! System Darwin 12.4.0 | |
npm ERR! command "node" "/usr/local/bin/npm" "publish" | |
npm ERR! cwd /Users/joshua/dev/postgresql-node | |
npm ERR! node -v v0.10.9 | |
npm ERR! npm -v 1.2.24 | |
npm ERR! code ENEEDAUTH |
module RSpec | |
module Mocks | |
module AnyInstance | |
class Recorder | |
def should_recieve(*args) | |
raise NoMethodError.new "should_recieve: Did you mean 'should_receive' ?" | |
end | |
def should_not_recieve(*args) | |
raise NoMethodError.new "should_not_receive: Did you mean 'should_not_receive' ?" | |
end |
defmodule Math do | |
def sqrt(x) do | |
refine x, x / 2.0, 1.0 | |
end | |
def refine(target, _, attempt) when attempt * attempt == target do | |
attempt | |
end |
defmodule Prime do | |
def known_primes, do: [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199] | |
def is_prime(n) when n > 9409, do: :cannot_calculate | |
def is_prime(n) when n < 2, do: false | |
def is_prime(2), do: true | |
def is_prime(n), do: check_primes(n, known_primes) | |
def check_primes(_,[]), do: true | |
def check_primes(n, [head|_tail]) when head*head > n, do: true | |
def check_primes(n, [head|tail]), do: rem(n, head) != 0 and check_primes(n, tail) |
-- Sets KEY to VALUE, preserving any existing TTL | |
-- Call with EVAL "..." 1 KEY VALUE | |
-- or | |
-- LOAD SCRIPT "..." | |
-- => <SHA1> | |
-- EVALSHA <SHA1> 1 KEY VALUE | |
local ttl = redis.pcall('ttl', KEYS[1]) | |
if ttl == -1 then | |
return redis.pcall('set', KEYS[1], ARGV[1]) |
jscott=# \d t1 | |
Table "public.t1" | |
Column | Type | Modifiers | |
--------+------------------------+----------- | |
id | integer | | |
name | character varying(255) | | |
Indexes: | |
"id_idx" btree (id) | |
"idx_name" btree (name) |
var http = require('http'); | |
if (process.argv.length <= 3) { | |
console.error('USAGE: node curlsocket.js /path/to/unix.sock /request/path'); | |
process.exit(); | |
} | |
var options = { | |
method: 'GET', | |
hostname: 'localhost', | |
socketPath: process.argv[2], |