Skip to content

Instantly share code, notes, and snippets.

View paulbjensen's full-sized avatar

Paul Jensen paulbjensen

View GitHub Profile
<html>
<head>
<title>Football</title>
</head>
<body>
<svg viewBox="0 0 1100 600" xmlns="http://www.w3.org/2000/svg">
<rect id="pitch" x="0" y="0" width="1100" height="600" fill="green"></rect>
<g id="lines">
<rect x="50" y="50" width="1000" height="500" fill="none" stroke="white" stroke-width="1"></rect>
<g id="left-end">

Keybase proof

I hereby claim:

  • I am paulbjensen on github.
  • I am paulbjensen (https://keybase.io/paulbjensen) on keybase.
  • I have a public key whose fingerprint is 8C46 0711 5D70 9A48 C6F1 E0EE 324C 82FB 9C31 8431

To claim this, I am signing this object:

Verifying that +paulbjensen is my blockchain ID. https://onename.com/paulbjensen
@paulbjensen
paulbjensen / handover.md
Created September 27, 2015 10:56
Handing over SocketStream to Henrik

Hi everyone,

I'm pleased to announce that SocketStream has a new project leader, Henrik Vendelbo.

A while ago I asked if Henrik would like to consider taking over from me - he had managed to do more for SocketStream in 12 months than I had managed to do in a couple of years, and given that I was in the middle of writing a book for Manning publications and looking to move countries, it felt right to hand over the project to someone with more time.

I still have a lot of love for the project, but my time has been stretched, and so I found myself in a similar position to the one that Owen was in 2 years ago when he handed the project over to me. Running an open source software project can be a huge undertaking, and if you have the time its great, but if not then it becomes a struggle. I've discovered that for myself, and I knew I'd need to step back from my commitments rather than try and do all the things.

I'm happy to have made a dent in getting SocketStream to a more certain place - dealing with the 0.3/0.

@paulbjensen
paulbjensen / example_dashku.js
Created July 13, 2014 05:59
Example usage of Dashku's node module to send data to Dashku
var dashku = require('dashku');
var payload = {
"bigNumber": 200,
"_id": "53c21e50c24b67fb166beed4",
"apiKey": "a4f368ba-0a46-4e3f-a2fd-f1b68ffe64af"
};
dashku.setApiKey(payload.apiKey, function () {
@paulbjensen
paulbjensen / streamWrite.js
Created October 7, 2013 17:41
A script to replicate an issue with stream writing.
'use strict';
// Dependencies
//
var fs = require('fs'),
oldFilePath = 'oldFile.txt',
read = fs.createReadStream(oldFilePath),
write = fs.createWriteStream('./.newFile.txt');
@paulbjensen
paulbjensen / tweet_list.coffee
Created August 20, 2013 14:24
The world map and tweet list widgets from the Dashku demo
module.exports =
css: "ul {\n list-style-type: none;\n margin-left: 0px;\n margin-top: 10px;\n}\n\nli {\n padding: 5px;\n background: rgba(255,255,255,0.03);\n margin: 5px;\n border-radius: 5px;\n color:#f1f1f1;\n cursor: pointer;\n}\n\n* content ul {\n overflow: clip; \n}"
height: 608
html: "<ul id=\"tweets\">\n <li></li>\n</ul>"
json: "{\n \"text\": \"I just finished a 8.02 mi run with Nike+ Running. #nikeplus\",\n \"location\": {\n \"latitude\": \"51\",\n \"longitude\": \"0\"\n },\n \"sentiment\": 1,\n \"tweet_id\": \"24324324234\",\n \"screen_name\": \"jeese\",\n \"_id\": \"4fe772d77c249dc40e0004d7\",\n \"apiKey\": \"c19cabb2-85d6-4be0-b1d6-d85a19b8245e\"\n}"
name: "on Twitter"
script: "// You can use 3rd-party libraries with your widget. For more information, \n// check out the Docs section titled 'Using 3rd-party JS libraries'.\n\n// The widget's html as a jQuery object\nvar widget = this.widget;\n\n// This runs when the
@paulbjensen
paulbjensen / world.coffee
Created May 20, 2013 10:09
This is the world.coffee file used at Axisto Media for an application in current development. It demonstrates how to boot a selenium server just once, make it available to your step definitions, and kill it once all of your cucumber.js feature have finished running.
# Selenium launcher is a great npm module for booting
# selenium server via a Node.js process.
selenium = require 'selenium-launcher'
soda = require 'soda'
process.env.NODE_ENV = "cucumber"
# This is our app's file.
server = require '../../server'
# We add some empty variables to store the web browser
@paulbjensen
paulbjensen / ec2.js
Created October 2, 2012 14:19
A wrapper around the aws2js npm module to provide some API calls specific to Amazon EC2
// Amazon AWS EC2 API wrapper
//
var aws2js = require('aws2js');
var ec2;
var ec2Api = {
// A helper function to supply API access credentials to Amazon
//
init: function(accessKeyId, secretAccessKey) {
@paulbjensen
paulbjensen / script.coffee
Created July 9, 2012 21:42
A script used to transmit geo-located tweets about Nike to Dashku
# The script that I use to broadcast tweets about
# Nike to Dashku's demo account, in CoffeeScript.
# require some npm libraries
Twit = require 'twit'
analyze = require('Sentimental').analyze
Placefinder = require 'placefinder'
dashku = require 'dashku'
# Set your API Key