Skip to content

Instantly share code, notes, and snippets.

View duncan-bayne's full-sized avatar

Duncan Bayne duncan-bayne

View GitHub Profile
View gist:80c3fe5911a390ede03cda9688956d9f
➜ ~ sudo service bluetooth start ubt0
➜ ~ sudo hccontrol -n ubt0hci remote_name_request 00:18:00:3b:92:34
BD_ADDR: 00:18:00:3b:92:34
Name: FILCO Bluetooth Keyboard
➜ ~ sudo cat /etc/bluetooth/hcsecd.conf
# ... snip ...
device {
bdaddr 00:18:00:3b:92:34;
name "FILCO Bluetooth Keyboard";
key nokey;
duncan-bayne / uh-oh.js
Created January 5, 2017 04:08
Test script
View uh-oh.js
alert('uh oh!');
duncan-bayne / jsbin.log
Created November 16, 2016 22:50
Failure to install jsbin
View jsbin.log
➜ ~ npm -g i jsbin
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN engine sqlite3@2.2.4: wanted: {"node":">= 0.8.0 < 0.13.0"} (current: {"node":"4.6.0","npm":"2.15.9"})
npm WARN deprecated set-immediate@0.1.1: Use `setimmediate` instead
> sqlite3@2.2.4 install /home/duncan/node/lib/node_modules/jsbin/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
(node) child_process: options.customFds option is deprecated. Use options.stdio instead.
make: Entering directory '/home/duncan/node/lib/node_modules/jsbin/node_modules/sqlite3/build'
duncan-bayne / sp
Last active January 16, 2022 09:53 — forked from wandernauta/sp
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
View sp
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
duncan-bayne /
Created April 18, 2016 05:21
Bounce NetworkManager connections on timeouts
if [ -z "$SSID" ]; then
echo "usage: nmcli-bounce SSID"
exit -1
duncan-bayne / No More Giphy™.user.js
Last active December 10, 2015 02:28
No More Giphy™
View No More Giphy™.user.js
// ==UserScript==
// @name No More Giphy™
// @namespace
// @description Hides all Slack messages from /giphy
// @include /https:\/\/.*\.slack\.com\/messages\/.*/
// @version 2
// @grant GM_log
// @require
// @require
// ==/UserScript==
duncan-bayne / xlsx-snippet.xml
Created September 3, 2015 23:25
Rounding issue in XLSX date cells
View xlsx-snippet.xml
<row r="1" customFormat="false" ht="12.8" hidden="false" customHeight="false" outlineLevel="0" collapsed="false">
<c r="A1" s="1" t="n">
<row r="2" customFormat="false" ht="12.8" hidden="false" customHeight="false" outlineLevel="0" collapsed="false">
<c r="A2" s="1" t="n">
View gist:cfb0bb727111373f69eb
➜ uhoh tree
├── foo
│   └── bar
│   └── baz
│   └── qux
└── -rf
3 directories, 2 files
➜ uhoh rm *
duncan-bayne / gist:9daa251ab5a507b3099d
Created April 21, 2015 00:25
Open letter to Spotify re. Accessibility
View gist:9daa251ab5a507b3099d
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.
View gist:25c1e1721f507ef0136e
S: <wait for connection on TCP port 110>
C: <open connection>
S: +OK POP3 server ready <>
C: APOP mrose c4c9334bac560ecc979e58001b3e22fb
S: +OK mrose's maildrop has 2 messages (320 octets)
S: +OK 2 320
S: +OK 2 messages (320 octets)
S: 1 120