Skip to content

Instantly share code, notes, and snippets.

View imaginator's full-sized avatar
🏗️
building

Simon Tennant imaginator

🏗️
building
View GitHub Profile
@imaginator
imaginator / buddycloudchannelAPI.xml
Created December 27, 2010 08:45
buddycloud channel API
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>untitled</title>
<meta name="generator" content="TextMate http://macromates.com/">
<meta name="author" content="Simon Tennant">
<!-- Date: 2010-12-27 -->
@imaginator
imaginator / gist:2866759
Created June 4, 2012 06:52
bc graphing
simon@bunker:~$ sudo /etc/munin/plugins/memory config
graph_args --base 1024 -l 0 --upper-limit 2090217472
graph_vlabel Bytes
graph_title Memory usage
graph_category system
graph_info This graph shows what the machine uses memory for.
graph_order apps page_tables swap_cache slab cached buffers free swap
apps.label apps
apps.draw AREA
apps.info Memory used by user-space applications.
@imaginator
imaginator / gist:7214770
Created October 29, 2013 13:38
Problems setting cloudflare DNS
Trying to set this DNS record in cloudflare.
_buddycloud-api._tcp.EXAMPLE.COM. IN TXT "v=1.0" "host=buddycloud.EXAMPLE.COM" "protocol=https" "path=/api" "port=443" # HTTP API
according to https://buddycloud.org/wiki/Install#buddycloud_DNS
but Cloudflare isn't working with the quotes - it accepts the input then munges the " with a \"
VirtualHost "buddycloud.org"
authentication = "internal_hashed"
allow_registration = true
anonymous_login = false
c2s_require_encryption = true
s2s_require_encryption = true
s2s_secure_auth = true
ssl = {
key = "/etc/prosody/certs/buddycloud.org.pem";
certificate = "/etc/prosody/certs/buddycloud.org.pem";
Dec 13 16:07:01 general info Shutting down...
Dec 13 16:07:01 general info Shutdown status: Cleaning up
Dec 13 16:07:01 general info Shutdown complete
Dec 13 16:07:01 general info Hello and welcome to Prosody version 0.9.1
Dec 13 16:07:01 general info Prosody is using the select backend for connection handling
Dec 13 16:07:01 hostmanager debug Activated host: directory.buddycloud.org
Dec 13 16:07:01 portmanager debug No active service for component, activating...
Dec 13 16:07:01 socket debug server.lua: new server listener on '[127.0.0.1]:5347'
Dec 13 16:07:01 portmanager debug Added listening service component to [127.0.0.1]:5347
Dec 13 16:07:01 portmanager info Activated service 'component' on [127.0.0.1]:5347
Dec 13 16:07:09 s2sinc10ef0 debug Incoming s2s connection
Dec 13 16:07:09 s2sinc10ef0 debug Incoming s2s received <stream:stream xmlns='http://etherx.jabber.org/streams' version='1.0' to='buddycloud.org' from='proxy.eu.jabber.org'>
Dec 13 16:07:09 mod_s2s debug sending: <?xml version='1.0'?>
Dec 13 16:07:09 mod_s2s debug sending: <stream:stream xmlns:db='jabber:server:dialback' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' from='buddycloud.org' id='08c7924a-b6bb-446
a-8cf9-48913c2ff3be' to='proxy.eu.jabber.org' xml:lang='en' xmlns='jabber:server'>
Dec 13 16:07:09 mod_s2s debug Sending stream features: <stream:features><starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'><required/></starttls><dialback xmlns='urn:xmpp:features:dialback'/></s
tream:features>
Dec 13 16:07:09 mod_s2s debug sending: <stream:features>
Dec 13 16:07:09 s2sinc1b140 debug Incoming s2s connection
Dec 13 16:07:09 s2sinc1b140 debug Incoming s2s received <stream:stream version='1.0' from='matthe
Dec 13 16:07:07 mod_s2s debug Best record found, will connect to xmpp-server.l.google.com.:5269
Dec 13 16:07:07 mod_s2s debug matthewwild.co.uk has SRV records, handling...
Dec 13 16:07:07 mod_s2s debug Best record found, will connect to matthewwild.co.uk.:5269
Dec 13 16:07:07 mod_s2s debug gmail.com has SRV records, handling...
Dec 13 16:07:07 mod_s2s debug Best record found, will connect to xmpp-server.l.google.com.:5269
Dec 13 16:07:07 mod_s2s debug DNS reply for xmpp-server.l.google.com. gives us 173.194.70.125
Dec 13 16:07:07 s2soutb14810 info Beginning new connection attempt to imaginator.com ([173.194.70.125]:5269)
Dec 13 16:07:07 s2soutb14810 debug Connection attempt in progress...
Dec 13 16:07:07 mod_s2s debug DNS reply for xmpp-server.l.google.com. gives us 173.194.70.125
Dec 13 16:07:07 s2soutb1f3e0 info Beginning new connection attempt to gmail.com ([173.194.70.125]:5269)
➜ ~ cat /var/log/prosody/prosody.log | grep b1f3e0
Dec 13 16:07:07 s2soutb1f3e0 info Beginning new connection attempt to gmail.com ([173.194.70.125]:5269)
Dec 13 16:07:07 s2soutb1f3e0 debug Connection attempt in progress...
Dec 13 16:07:07 s2soutb1f3e0 debug sending: <?xml version='1.0'?>
Dec 13 16:07:07 s2soutb1f3e0 debug sending: <stream:stream xmlns:db='jabber:server:dialback' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' from='buddycloud.org' to='gmail.com' xml:lang='en' xmlns='jabber:server'>
Dec 13 16:07:07 s2soutb1f3e0 debug sending: <db:result to='gmail.com' from='buddycloud.org'>
Dec 13 16:07:07 s2soutb1f3e0 info sent dialback key on outgoing s2s stream
Dec 13 16:07:08 s2soutb1f3e0 debug going to send stanza to gmail.com from buddycloud.org
Dec 15 21:49:10 buddycloud.com:tls debug jabber.org. is offering TLS, taking up the offer...
Dec 15 21:49:10 s2sout163e6f0 debug sending: <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
Dec 15 21:49:10 s2sout163e6f0 debug Received[s2sout_unauthed]: <proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'>
Dec 15 21:49:10 buddycloud.com:tls debug Proceeding with TLS on s2sout...
Dec 15 21:49:10 socket debug server.lua: attempting to start tls on tcp{client}: 0x14ae6b8
Dec 15 21:49:11 socket debug server.lua: ssl handshake done
Dec 15 21:49:11 s2sout163e6f0 debug Sending stream header...
Dec 15 21:49:11 s2sout163e6f0 debug sending: <?xml version='1.0'?>
Dec 15 21:49:11 s2sout163e6f0 debug sending: <stream:stream xmlns:db='jabber:server:dialback' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' from='buddycloud.com' id='26b925cc2eb06c0a' to='jabber.org.' xml:lang='en' xmlns='jabber:server'>
Dec 15 21:49:11 s2sout163e6f0 debug certificate chain validation resul
==> /var/log/prosody/prosody.err <==
Jan 30 12:18:36 s2sinfb98a0 debug Incoming s2s received <stream:stream xmlns='http://etherx.jabber.org/streams' version='1.0' to='buddycloud.org' from='braintrust.dk'>
Jan 30 12:18:36 mod_s2s debug sending: <?xml version='1.0'?>
Jan 30 12:18:36 mod_s2s debug sending: <stream:stream xmlns:db='jabber:server:dialback' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' from='buddycloud.org' id='86625d1a-b282-4fd
b-b12c-c67b7ddd2f75' to='braintrust.dk' xml:lang='en' xmlns='jabber:server'>
==> /var/log/prosody/prosody.log <==
Jan 30 12:18:36 s2sinfb98a0 debug Incoming s2s received <stream:stream xmlns='http://etherx.jabber.org/streams' version='1.0' to='buddycloud.org' from='braintrust.dk'>
Jan 30 12:18:36 mod_s2s debug sending: <?xml version='1.0'?>
Jan 30 12:18:36 mod_s2s debug sending: <stream:stream xmlns:db='jabber:server:dialback' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' from='buddycloud.org' id='86625d1a-b282-4fd