This server is an example framework to test against and is not the final product. It is designed so that the id lookup is replaceable.
Run the server by using
node server.js
var app = require("express")(); | |
var swig = require('swig'); | |
app.engine('swig.html', swig.renderFile); | |
app.set('view engine', 'swig.html'); | |
app.set('views', __dirname); | |
app.get("/loggedin", function (req, res) { | |
res.render("default", {loggedin: true}); | |
}); |
# -*- coding: UTF-8 -*- | |
a = u"£" | |
print a |
mkdir gubbins | |
touch gubbin{0..9}.file | |
ls gubbins/ # responds as you would expect | |
ls gubbins/* # responds as you would expect | |
ls gubbins/*.file # responds as you would expect | |
ls "gubbins/*.file" # no such file or directory | |
ls 'gubbins/*.file' # no such file or directory | |
ls "gubbins/"*".file" # works! damnit. |
#!/usr/bin/env python | |
import time | |
import struct | |
import socket | |
import hashlib | |
import base64 | |
import sys | |
from select import select | |
import re |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>HTML5 Message Tests</title> | |
</head> | |
<body> | |
<h1>Set a name and type a message</h1> | |
<form id="name"> | |
<label>Enter your name: |
#!/usr/bin/env python | |
import pyglet | |
mp3 = "test.mp3" | |
source = pyglet.media.load(mp3) | |
player = pyglet.media.Player() | |
player.queue(source) | |
player.play() |
import socket | |
import sys | |
import ssl | |
class Client(object): | |
recv_length=1024 | |
def __init__(self, server="localhost", port=5054): | |
self.server = server | |
self.port = port | |
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
javascript:(function(){var qr_url="http://chart.apis.google.com/chart?cht=qr&chs=300x300&chld=H|0&chl=";window.open(qr_url+encodeURIComponent(location.href));})(); |
from urllib import urlencode | |
from urllib2 import Request, urlopen, HTTPError | |
from json import loads as jsonsload | |
dictionary_of_useful_things = { | |
"client_id": "261777520064-etb9m51k800e6ucrcf767th54uc5nt7i.apps.googleusercontent.com", | |
"client_secret": "{{ it's a secret. SSHHHhhh! }}", | |
"redirect_uri": "urn:ietf:wg:oauth:2.0:oob", | |
"grant_type": "authorization_code" | |
} |