Skip to content

Instantly share code, notes, and snippets.


Oli Evans olizilla

View GitHub Profile
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
olizilla / queryify.js
Created Dec 21, 2016
Minimal object to query string function
View queryify.js
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 /
Last active Nov 19, 2015
Meteor News 2015-11-19
olizilla / bundle-name.js
Created Nov 16, 2015
Make better bundle names
View bundle-name.js
> name()
> name()
> name()
function name () {
return faker.helpers.slugify(faker.fake('{{name.firstName}}-{{commerce.color}}-{{hacker.noun}}')).toLowerCase()
View aws-cor.xml
olizilla / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
olizilla /
Last active Jan 10, 2016
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

View things.html
<h1>Welcome to Meteor!</h1>
{{> hello}}
olizilla / meteor-account-verify.js
Created Aug 19, 2014
Only allow users on a given email domain to log in to your meteor app.
View meteor-account-verify.js
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: ['', ''] }
...and meteor-developer accounts, but other login mechanisms (email, twitter) would work too.