Skip to content

Instantly share code, notes, and snippets.

@bkerley
bkerley / repl.zsh
Created July 5, 2013 15:22
riak-admin repl
#!/usr/bin/env zsh
RIAK_ADMIN_PATH='/Users/bkerley/erlang/riak/riak/dev/dev1/bin/riak-admin'
echo -n "riak-admin> "
while read inputline; do
echo `$RIAK_ADMIN_PATH $inputline`
echo -n "riak-admin> "
done
@bkerley
bkerley / a.sql
Last active December 18, 2015 00:09
SELECT
ST_AsText(wkb_geometry),
ST_Distance(wkb_geometry,
ST_PointFromText(
'POINT(-80.20228879999999 25.8012068)',
900914)),
ogc_fid,
globvalue,
units
FROM
2.0.0-p0
@bkerley
bkerley / Gemfile
Last active December 15, 2015 00:29
source :rubygems
gem 'riak-client'
gem 'celluloid'
name "monitoring"
description "Monitoring server"
run_list(
"recipe[nagios::server]"
)
default_attributes(
"nagios" => {
"server_auth_method" => "htauth"
},
bkerley@Dieter ☄ 1 1.9.3-p362 ~/openstack
> nova secgroup-list
+---------+-------------+
| Name | Description |
+---------+-------------+
| default | default |
+---------+-------------+
bkerley@Dieter ★ 1.9.3-p362 ~/openstack
> nova secgroup-list-rules default
+-------------+-----------+---------+--------------+--------------+
| 2013-02-07 16:30:40 | NULL | NULL | 16 | 372ab34a-3ec2-4715-84ee-63abaf77b93f | 5
00 | OSError | [Errno 2] No such file or directory
File "/opt/stack/nova/nova/compute/manager.py", line 690, in _run_instance
injected_files, admin_password)
File "/opt/stack/nova/nova/compute/manager.py", line 962, in _spawn
block_device_info)
File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1059, in spawn
admin_pass=admin_password)
File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1330, in _create_image
project_id=instance['project_id'])
!!! 5
%html
%head
%title rotate
%link(href='http://fonts.googleapis.com/css?family=Electrolize' rel='stylesheet' type='text/css')
%style(type='text/css')
:sass
$rotateDistance: 12.3deg
#content
width: 960px
> otool -tv ./hello
./hello:
(__TEXT,__text) section
start:
0000000100000edc pushq $0x00
0000000100000ede movq %rsp,%rbp
0000000100000ee1 andq $0xf0,%rsp
0000000100000ee5 movq 0x08(%rbp),%rdi
0000000100000ee9 leaq 0x10(%rbp),%rsi
0000000100000eed movl %edi,%edx
Given /^I expect an email$/ do
@mail_expectation = Mail::Message.any_instance.expects(:deliver)
end
Then /^.+ should have a .+ email$/ do
invocation_count = @mail_expectation.instance_variable_get(:@invocation_count)
assert invocation_count > 0, "Expected #{invocation_count} to be greater than zero."
end