Skip to content

Instantly share code, notes, and snippets.

View sebdeckers's full-sized avatar
🐑
Hacking on Commons Host

Sebastiaan Deckers sebdeckers

🐑
Hacking on Commons Host
View GitHub Profile
Message is stripped of XHTML-IM and other data:
SENT: <message xml:lang="en" from="[email protected]/Pandion" type="groupchat" to="[email protected]"><body>test</body><html xmlns="http://jabber.org/protocol/xhtml-im"><body style="font-style: normal; font-family: calibri; color: #008080; font-size: 22pt; font-weight: normal" xmlns="http://www.w3.org/1999/xhtml">test</body></html><x xmlns="jisp:x:jep-0038"><name>shinyicons</name></x></message>
RECV: <message xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" from="[email protected]/cbas" type="groupchat" to="[email protected]/Pandion"><body>test</body></message>
MUC does not seem to implement reporting of "Allowable Namespaces" as per XEP-0045:
SENT: <iq to="[email protected]" type="get" id="abc"><query xmlns="http://jabber.org/protocol/disco#info" node="http://jabber.org/protocol/muc#traffic"></query></iq>
RECV: <iq xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" from="[email protected]" type="result" t
@sebdeckers
sebdeckers / singleton.js
Created October 11, 2012 01:56
Singleton in Javascript using a closure and the module pattern
// Singleton
var immortal = (function () {
var therecanbeonlyone = {name: ''};
return function () {
return therecanbeonlyone;
};
})();
console.log('First there were none', new immortal());
@sebdeckers
sebdeckers / preflight.md
Last active December 14, 2015 01:19
Thoughts on creating a pre-flight testing tool for web app CI.

Preflight testing

Because "looks good to me" should not be famous last words.

Use Cases

Eyeballing

Check if a page loads without script or network errors.

@sebdeckers
sebdeckers / request.http
Created April 13, 2013 14:50
HTTP request/response exchange
GET / HTTP/1.1
Host: ninja.sg
Connection: keep-alive
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1469.0 Safari/537.36
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Cookie: __utma=85144454.1985279365.1365846625.1365846625.1365862890.2; __utmb=85144454.6.10.1365862890; __utmc=85144454; __utmz=85144454.1365846625.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
@sebdeckers
sebdeckers / syntax.html
Last active December 16, 2015 04:39
Basic building blocks of an HTML document
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Homepage | My Personal Site</title>
<link rel="stylesheet" href="gorgeous.css" />
<script type="text/javascript" src="amazing.js"></script>
</head>
<body>
<article>
@sebdeckers
sebdeckers / design.css
Created April 13, 2013 16:48
Example of CSS syntax
/* universal selector */
* {
color: rgb(50, 50, 50);
}
/* element name */
p {
font-family: "Tahoma";
border-bottom: 2px solid blue;
}
@sebdeckers
sebdeckers / embedding.html
Created April 13, 2013 17:05
Using JavaScript snippets
<!DOCTYPE html>
<html>
<head>
<title>Homepage | My Personal Site</title>
</head>
<body>
<article>
<h1 id="headline">Nunc Vehicula Dapibus</h1>
<p>Proin ornare ligula eu tellus tempus &amp; elementum.</p>
<p>Aenean bibendum iaculis mi,
@sebdeckers
sebdeckers / outline.md
Last active December 16, 2015 04:59
Document content structure example

Sebastiaan's Profile Page

I'm not a mango.

Photo


Navigation Menu

@sebdeckers
sebdeckers / structure.html
Last active December 16, 2015 04:59
Simple HTML structure example
<!DOCTYPE html>
<html>
<head>
<title>My Profile</title>
<link rel="stylesheet" href="styles/app.css" />
<script src="scripts/app.js"></script>
</head>
<body>
<header>
@sebdeckers
sebdeckers / boilerplate.html
Created April 14, 2013 06:13
HTML boilerplate
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" href="styles/app.css" />
<script src="scripts/app.js"></script>
</head>
<body>