Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

bryce@bryce-imac ~> cat /mach_kernel | openssl sha1
60b55b9c3daca7018db613e22563b2177906729b
bryce@bryce-imac ~> openssl sha1 /mach_kernel
SHA1(/mach_kernel)= 60b55b9c3daca7018db613e22563b2177906729b
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ft=erlang ts=4 sw=4 et
[
%% Riak Client APIs config
{riak_api, [
%% pb_backlog is the maximum length to which the queue of pending
%% connections may grow. If set, it must be an integer >= 0.
%% By default the value is 5. If you anticipate a huge number of
%% connections being initialised *simultaneously*, set this number
%% higher.

Keybase proof

I hereby claim:

  • I am bkerley on github.
  • I am bryce (https://keybase.io/bryce) on keybase.
  • I have a public key whose fingerprint is B9A4 E903 7664 2F7E 1AC8 83FF 9659 7A59 3C8C 6D37

To claim this, I am signing this object:

# protip: don't run more than one node, tests are sensitive to quorums
nodes:
- {host: 'localhost', pb_port: 17017}
# authentication:
# user: 'user'
# password: 'password'
# ca_file: /Users/bkerley/Documents/riak-ruby-client/spec/support/certs/ca.crt
@bkerley
bkerley / boxes.rs
Last active August 29, 2015 14:01
i'm learning rust lol
use std::mem::size_of;
struct Foo {
a: u32,
b: u32,
c: u32,
d: u32
}
struct Bar {
var fs = require('fs');
var pg = require('pg').native;
global.Grailbird = {};
global.Grailbird.data = {};
var tweetFiles = fs.readdirSync("./data/js/tweets");
for (var f in tweetFiles) {
eval('global.'+fs.readFileSync('./data/js/tweets/'+ tweetFiles[f]));
#python or ruby - turns out it doesn't matter
inc = random(0,2*pi)
az = random(0,2*pi)
dist = random(5,80)
cx = dist * cos(az)
cy = dist * sin(az)
sh = (cy/80)*0.6
x = 350 + (250+cx)*cos(inc)
y = 350 + (250+cx)*sin(inc)
z = cy
require 'openssl'
class String
def to_bin
[self].pack('H*')
end
def to_hex
unpack('H*').first
end
end
vectors = [
require 'pp'
require 'openssl'
crl_data = File.read './revoked.crl'
pp crl_data
crl = OpenSSL::X509::CRL.new crl_data
pp crl.revoked
#!/bin/sh
gcc -o idunno idunno.c