Skip to content

Instantly share code, notes, and snippets.

View duncan-bayne's full-sized avatar

Duncan Bayne duncan-bayne

View GitHub Profile
/dev/mapper/precise64-root on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
@duncan-bayne
duncan-bayne / gist:4752214
Created February 11, 2013 03:16
RVM installation failure in Vagrant
vagrant@atlas-dev-precise64-devmac-1:~/.rvm/archives$ tar -zxvf wayneeseguin-rvm-stable.tgz
... snip a whole bunch of success ...
tar: wayneeseguin-rvm-287a5f6/README.rdoc: Cannot create symlink to `README': Read-only file system
tar: wayneeseguin-rvm-287a5f6/README.txt: Cannot create symlink to `README': Read-only file system
tar: wayneeseguin-rvm-287a5f6/install: Cannot create symlink to `scripts/install': Read-only file system
@duncan-bayne
duncan-bayne / gist:4600539
Created January 23, 2013 00:42
Setting a breakpoint from within the Ruby debugger
$ cat test.rb
class Foo
def bar
'baz'
end
end
debugger
Foo.new.bar
@duncan-bayne
duncan-bayne / No More Giphy™.user.js
Last active December 10, 2015 02:28
No More Giphy™
// ==UserScript==
// @name No More Giphy™
// @namespace duncan@bayne.id.au
// @description Hides all Slack messages from /giphy
// @include /https:\/\/.*\.slack\.com\/messages\/.*/
// @version 2
// @grant GM_log
// @require http://code.jquery.com/jquery-2.1.4.min.js
// @require http://underscorejs.org/underscore-min.js
// ==/UserScript==
@duncan-bayne
duncan-bayne / development.rb
Created September 26, 2012 04:16
Development configuration
Atlas::Application.configure do
config.cache_classes = false
config.whiny_nils = true
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
config.active_support.deprecation = :log
config.action_dispatch.best_standards_support = :builtin
config.active_record.mass_assignment_sanitizer = :strict
config.active_record.auto_explain_threshold_in_seconds = 0.5
config.assets.compress = false
@duncan-bayne
duncan-bayne / xlsx-snippet.xml
Created September 3, 2015 23:25
Rounding issue in XLSX date cells
<sheetData>
<row r="1" customFormat="false" ht="12.8" hidden="false" customHeight="false" outlineLevel="0" collapsed="false">
<c r="A1" s="1" t="n">
<v>41552</v>
</c>
</row>
<row r="2" customFormat="false" ht="12.8" hidden="false" customHeight="false" outlineLevel="0" collapsed="false">
<c r="A2" s="1" t="n">
<v>41551.9999999998</v>
</c>
➜ uhoh tree
.
├── foo
│   └── bar
│   └── baz
│   └── qux
└── -rf
3 directories, 2 files
➜ uhoh rm *
@duncan-bayne
duncan-bayne / gist:9daa251ab5a507b3099d
Created April 21, 2015 00:25
Open letter to Spotify re. Accessibility
Hi,
I'm writing to let you know that the Spotify client for OSX (and possibly
other OSs too) is inaccessible to people who are blind and otherwise disabled.
Several people, myself included, have raised this issue in an attempt to
have it fixed but we've been consistently ignored by Spotify staff.
E.g.:
S: <wait for connection on TCP port 110>
C: <open connection>
S: +OK POP3 server ready <1896.697170952@dbc.mtview.ca.us>
C: APOP mrose c4c9334bac560ecc979e58001b3e22fb
S: +OK mrose's maildrop has 2 messages (320 octets)
C: STAT
S: +OK 2 320
C: LIST
S: +OK 2 messages (320 octets)
S: 1 120
@duncan-bayne
duncan-bayne / gist:772d36c63e9e2638ef87
Created October 30, 2014 04:57
Simultaneous messages from same originator
<messages>
<message>
<datestamp>2014-10-30 15:43:40</datestamp>
<direction>MO</direction>
<originator>61420817082</originator>
<recipient>61419129159</recipient>
<messagetext>A</messagetext>
<campaign></campaign>
<reference></reference>
</message>