Skip to content

Instantly share code, notes, and snippets.

View olizilla's full-sized avatar

Oli Evans olizilla

View GitHub Profile

Meteor London News

Some new news & some old news that we just learnt about the hard way

  • Meteor UI

  • Meteor Roadmap to 1.0

  • Meteor dependency updates:

  • Node release 0.10

#include <Servo.h>
Servo servo;
int servoPin = 9;
int rotationSpeed = 1250;
// Oi! Jamie! You may need to noodle the value of `rotationSpeed`
// As far as I can tell, it means:
@olizilla
olizilla / README.md
Last active January 10, 2016 19:52
Notes from SquatConf 2014. Typed quickly, all concepts may be corrupted, but the gist is there.

Notes From SquatConf 2014

@dhigit9 - UDT: an application leyer TCP you can tune.

Replace TCP, application layer comm framework.

instantwebp2p - node fork that supports UDT. congestion control - optimal usage of bandwidth flow control - avoid overwhelming the receiver. window based - no packets in flight

@olizilla
olizilla / meteor-dump.sh
Last active May 29, 2016 02:18
Dump a mongo db from a live meteor app to a local dump dir.
#!/bin/bash
# __
# _____ ____ _/ |_ ____ ____ _______
# / \ _/ __ \ \ __\_/ __ \ / _ \ \_ __ \
# | Y Y \\ ___/ | | \ ___/ ( <_> ) | | \/
# |__|_| / \___ > |__| \___ > \____/ |__|
# \/ \/ \/
#
# .___
# __| _/ __ __ _____ ______
@olizilla
olizilla / meteor-account-verify.js
Created August 19, 2014 10:41
Only allow users on a given email domain to log in to your meteor app.
/*
Only allow users with a verified email address on a pre-verified domain to log in.
We're getting people to authenticate and only authorising those that have an email we recognise.
Assumes a Meteor.settings like:
{ adminDomains: ['tableflip.io', 'meteor.com'] }
...and meteor-developer accounts, but other login mechanisms (email, twitter) would work too.
*/
@olizilla
olizilla / queryify.js
Created December 21, 2016 11:29
Minimal object to query string function
function queryify (obj) {
const pairs = Object.keys(obj).map((k) => {
const key = encodeURIComponent(k)
const val = encodeURIComponent(obj[k])
return key + '=' + val
})
return '?' + pairs.join('&')
}
@olizilla
olizilla / traffic-light-disco.js
Created July 22, 2013 19:14
A johnny-five, event based, traffic light disco for your Arduino. An array of lights flash in majestic sequence for your gyratory pleasure. Each light's shining heralds it's own destruction, each extinction seeds a new. Just like the traffic light eyeball cannons of your friendly neighbourhood mobile DJ
/*
======================================================================================================================================
= ==================== ===== =================== =================== ================ ===========================
==== ====================== == === == ================== =================== ================ ==== ==========================
==== ====================== ======= ====================== =================== ====== ======== ==== ==========================
==== ===== = ==== === ===== ===== === ======== ======== === === ===== ======= ==== == === ==== ==== ==
==== ===== = == = === ======= ========== = ======= ============ = == ==== ======== ==== ====== = == = == =
==== ===== ========== === ======= ====== == ========== ======== === == = === ======== ==== == === ==== ===== = =
==== ===== ======== === ======= ====== == ========== ======== ==
@olizilla
olizilla / index.html
Created December 8, 2012 13:25
SVG sine wave
<html>
<head>
<meta charset="utf-8">
<style>
body{
margin:0;
background: #222;
}
</style>
</head>
#!/bin/bash
cd /home/cotech/sites
git stash
git pull
rm -rf web/wp
composer update
cd web/app/themes/coop-tech-oowp-theme
composer update
npm install
/**
* Convert cols and rows into an array of objects.
* Will return array of objects mapping cols to row values.
*
* Repeated cols are mapped to array values.
*
* @param {Array} cols The keys
* @param {Array} rows the array of arrays of values
* @return {Array} The rows as objects
* @example