Skip to content

Instantly share code, notes, and snippets.

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;
View uh-oh.js
alert('uh oh!');
@duncan-bayne
duncan-bayne / jsbin.log
Created Nov 16, 2016
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
duncan-bayne / sp
Last active Dec 27, 2019 — 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
#!/bin/bash
#
# 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
duncan-bayne / nmcli-bounce.sh
Created Apr 18, 2016
Bounce NetworkManager connections on timeouts
View nmcli-bounce.sh
#!/bin/bash
SSID=$1
if [ -z "$SSID" ]; then
echo "usage: nmcli-bounce SSID"
exit -1
fi
HOST=cogent.co
View No More Giphy™.user.js
// ==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 / xlsx-snippet.xml
Created Sep 3, 2015
Rounding issue in XLSX date cells
View xlsx-snippet.xml
<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>
View gist:cfb0bb727111373f69eb
➜ uhoh tree
.
├── foo
│   └── bar
│   └── baz
│   └── qux
└── -rf
3 directories, 2 files
➜ uhoh rm *
@duncan-bayne
duncan-bayne / gist:9daa251ab5a507b3099d
Created Apr 21, 2015
Open letter to Spotify re. Accessibility
View gist:9daa251ab5a507b3099d
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.:
View gist:25c1e1721f507ef0136e
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
You can’t perform that action at this time.