Skip to content

Instantly share code, notes, and snippets.

Avatar

Adam Spiers aspiers

View GitHub Profile
@aspiers
aspiers / error_spec.rb
Last active Aug 29, 2015
rspec expectations bug?
View error_spec.rb
require_relative 'spec_helper'
# The following fails with output which is not as helpful as it
# could be:
#
# expected RuntimeError, got #<RuntimeError: foo> with backtrace:
#
# It would be much better if it said something like:
#
# expected: #<RuntimeError: bar>
View TODO.org

default port values

bc-template-attributes/
keystone.jsondefault.rb
service_port50005000
api_port500035357
admin_port3535735357

values observed in real deployment and set by recipe

hostportnotes
View *Messages*.txt
CHASE: 3
STARTED: 34
PROJDONE: 4
ONGOING: 1
WAITING: 36
CANCELLED: 23
SOMEDAY: 63
DONE: 66
MAYBE: 80
PROJECT: 153
View TODO.org
default port values
bc-template-attributes/
keystone.jsondefault.rb
service_port50005000
api_port500035357
admin_port3535735357
values observed in real deployment and set by recipe
hostportnotes
@aspiers
aspiers / trace_load.rb
Last active Aug 29, 2015
monkey-patching trick for tracing Kernel#load
View trace_load.rb
module Kernel
alias_method :builtin_load, :load
def load(file)
$stderr.puts "Kernel#load(#{file})"
raise rescue $stderr.puts $!.backtrace
builtin_load(file)
end
end
@aspiers
aspiers / subdivisions.ly
Last active Aug 29, 2015
Common rhythmic subdivisions
View subdivisions.ly
\version "2.18.0"
\include "english.ly"
\paper {
% annotate-spacing = ##t
indent = #0
left-margin = 12\mm
right-margin = 4\mm
ragged-right = ##f
ragged-last = ##f
View keybase.md

Keybase proof

I hereby claim:

  • I am aspiers on github.
  • I am adamspiers (https://keybase.io/adamspiers) on keybase.
  • I have a public key whose fingerprint is 942B 9075 ACCA 04E9 037C 73FE D31B 5563 DAC1 D4FA

To claim this, I am signing this object:

View prjconf
%if "%_repository" == "images"
Type: kiwi
Repotype: none
Patterntype: none
Required: containment-rpm
Macros:
%define containment_image_name SUSE-CLOUD-4-x86_64
%define containment_image_extension iso
%define containment_image_dest_dir /srv/isos
View infinite-read_state-loop2.txt
INFO global: Vagrant version: 1.6.5
INFO global: Ruby version: 2.1.2
INFO global: RubyGems version: 2.2.2
INFO global: VAGRANT_DEFAULT_PROVIDER="libvirt"
INFO global: VAGRANT_DEBUG="yes"
INFO global: VAGRANT_INTERNAL_BUNDLERIZED="1"
INFO global: VAGRANT_LOG="debug"
INFO global: Plugins:
INFO global: - Platform = 0.4.0
INFO global: - builder = 3.2.2
@aspiers
aspiers / MSP-sqlite3.sh
Last active Aug 29, 2015
run SQL on MobileSheetsPro SQLite database
View MSP-sqlite3.sh
#!/bin/bash
#
# Handy script to allow surgery on MobileSheetsPro SQLite database
# from host computer via adb. This means you can use the full history
# and CLI features of a feature-complete modern shell, rather than
# the crippled crap which Android's "adb shell" gives you.
#
# Example:
#
# MSP-sqlite3.sh 'select * from Songs where Title like "%Foo%"'