Skip to content

Instantly share code, notes, and snippets.

View lloydwatkin's full-sized avatar

Lloyd Watkin lloydwatkin

View GitHub Profile
@lloydwatkin
lloydwatkin / gist:c4f4c8ac1f50c262a20b
Created March 10, 2016 10:22
InnoDB: Operating system error number 13 in a file operation.
$ sudo docker run -it mysql:latest /bin/bash
Unable to find image 'mysql:latest' locally
latest: Pulling from mysql
25270607d748: Pull complete
d118ad716ef1: Pull complete
0985a1ea7675: Pull complete
15959bd10e3d: Pull complete
57c832a5f583: Pull complete
92ba15de5dba: Pull complete
0df34f74edfd: Pull complete
@lloydwatkin
lloydwatkin / babel-issue.js
Created November 30, 2015 15:04
Babel-ified code works in Chrome but not Chromium (37)
_getItemIdStrs() {
const result = []
const itemIdStrings = Object.keys(this.state)
for (const itemIdStr of itemIdStrings) {
if (itemIdStr !== 'groups') {
result.push(itemIdStr)
}
}
return result
}
server {
listen 80;
server_name ~^buddycloud\.(?<domain>.+)$;
rewrite ^ https://http.#BC_DOMAIN#?h=$domain permanent;
}
server {
listen 80;
server_name hosting.#BC_DOMAIN#;
rewrite ^ https://$server_name$request_uri? permanent;
@lloydwatkin
lloydwatkin / gist:9e1dd2495f78efc92646
Created November 26, 2014 13:55
XMPP-FTW diagram
+---------+ HTML/IMG/JS/CSS +-------------------+
| User / | <---------------+ | xmpp-ftw + primus |
| Browser | websocket | server |
+---------+ <---------------> +-------------------+
^
| socket
|
v
+--------+ component +------------+
| XMPP | connection | buddycloud |
@lloydwatkin
lloydwatkin / splitter.sh
Last active August 29, 2015 14:07
Split arguments up for vhost substitution
#! /bin/bash
#
# - For example:
#
# VHOSTS="xmpp.surevine.com|locahost:3000|websocket;stats.surevine.com|localhost:8080" ./splitter.sh
#
VHOST_SEPARATOR=";"
PARAM_SEPARATOR="|"
@lloydwatkin
lloydwatkin / gist:5b61dc6a02b4e0b75d75
Created October 16, 2014 15:49
Buddycloud channel server docker image
Lloyds-MacBook-Pro:buddycloud-server-java lloyd$ docker run -it -e DATABASE="jdbc:postgresql://some.domain:5432/buddycloud_server?user=buddycloudserver&password=tellnoone" buddycloud/channel-server /bin/bash
Unable to find image 'buddycloud/channel-server' locally
Pulling repository buddycloud/channel-server
f1cd5f674e46: Download complete
511136ea3c5a: Download complete
97fd97495e49: Download complete
2dcbbf65536c: Download complete
6a459d727ebb: Download complete
8f321fc43180: Download complete
03db2b23cf03: Download complete
@lloydwatkin
lloydwatkin / gist:065be91bd9cbce9a1ff2
Last active August 29, 2015 14:07
Supplying 'accountsjids' as 'accountjid' results in no response from Prosody + error in logs
Sep 29 08:39:34 mod_c2s error Traceback[c2s]: /usr/lib/prosody/modules/mod_admin_adhoc.lua:174: bad argument #1 to 'ipairs' (table expected, got nil)
stack traceback:
[C]: in function 'ipairs'
/usr/lib/prosody/modules/mod_admin_adhoc.lua:174: in function </usr/lib/prosody/modules/mod_admin_adhoc.lua:168>
(tail call): ?
/usr/lib/prosody/modules/adhoc/adhoc.lib.lua:35: in function </usr/lib/prosody/modules/adhoc/adhoc.lib.lua:27>
(tail call): ?
/usr/lib/prosody/util/events.lua:67: in function </usr/lib/prosody/util/events.lua:63>
(tail call): ?
/usr/lib/prosody/modules/mod_iq.lua:70: in function '?'
@lloydwatkin
lloydwatkin / keybase.md
Created August 22, 2014 14:22
keybase.md

Keybase proof

I hereby claim:

  • I am lloydwatkin on github.
  • I am lloydwatkin (https://keybase.io/lloydwatkin) on keybase.
  • I have a public key whose fingerprint is 7456 980E 637A EFA2 F495 FD13 17A0 4D71 EB69 5DBE

To claim this, I am signing this object:

debugger listening on port 5858
- Welcome to Massah
Found a .massah.js config file
User Author page
Should show presence buttons
- Given an authenticated user
@lloydwatkin
lloydwatkin / gist:d7a20b2bd4f75dc2eb0d
Created August 20, 2014 12:22
nodejs v0.10.31-debug segfault 11
lloyd$ node -v
v0.10.31
lloyd$ which npm
/Users/lloyd/.nvm/v0.10.31/bin/npm
lloyd$ lldb -- node
Current executable set to 'node' (x86_64).
(lldb) run /Users/lloyd/.nvm/v0.10.31/bin/npm test
Process 86648 launched: '/Users/lloyd/.nvm/v0.10.31/bin/node' (x86_64)
> project@0.5.0 test /Users/lloyd/code/project