Skip to content

Instantly share code, notes, and snippets.

View lloydwatkin's full-sized avatar

Lloyd Watkin lloydwatkin

View GitHub Profile
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 / 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:

@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 / 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 / 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: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 |
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:3302529
Created August 9, 2012 09:08
Buddycloud server error
e@my-server: channels.my-server
[Wed, 08 Aug 2012 14:31:58 GMT] DEBUG [local/operations] operations.run: { iq:
{ name: 'iq',
parent: null,
attrs:
{ to: 'channels.my-server',
id: 'sHXjv-4',
from: 'twinkle@my-server/BC_TEST_CLIENT',
type: 'set',
xmlns: 'jabber:client',
@lloydwatkin
lloydwatkin / gist:3674670
Created September 8, 2012 12:55
Owner fix
[lloyd@desktop buddycloud-server]$ psql -d buddycloud-server -c "update affiliations set \"user\" = 'memememme' where node = '/user/lloyd@evilprofessor.co.uk/posts' and affiliation = 'owner';"UPDATE 1
[lloyd@desktop buddycloud-server]$ psql -d buddycloud-server -c "select * from affiliations where node IN (select node from node_config where key = 'channelType' and value = 'personal') and affiliation = 'owner';" node | user | affiliation | updated
------------------------------------------+------------------------------+-------------+---------
/user/lloyd@evilprofessor.co.uk/posts | memememme | owner |
/user/ashward@buddycloud.org/posts | ashward@buddycloud.org | owner |
/user/dave@buddycloud.org/posts | dave@buddycloud.org | owner |
/user/schnouki@pouet.im/posts | schnouki@pouet.im | owner |
/user/cookie@evilprofessor.co.uk/posts | cookie@evi
@lloydwatkin
lloydwatkin / gist:3772172
Created September 23, 2012 16:14
Mongo and Meteor, forEach issue
Using a Fedora 15 x86_64 system
[lloyd@desktop leaderboard]$ meteor --version
Meteor version 0.4.0 (8f4045c1b9)
[lloyd@desktop leaderboard]$ mongo --version
MongoDB shell version: 2.0.7
[lloyd@desktop leaderboard]$ nvm ls
current: v0.8.5