Skip to content

Instantly share code, notes, and snippets.

View video-error.js
vid.addEventListener('error', function(evt) {
}, false);
function logEvent(evt, color) {
switch (evt.type) {
case 'error':
var error = document.querySelector('video').error;
switch (error.code) {
layout title date comments sharing footer
2013-08-30 12:07


nifl /
Last active Aug 29, 2015
Some bike polo content lifted from the Axles of Evil, the origin of "Little Beirut" bike polo. Note this was taken from a 2004 snapshot from and as such the days and times are no longer valid AFAIK.

bike polo is dead. long live bike polo!

in our attempts to free ourselves from the harrassment and persecution we have endured from the city of Portland, we have fallen into their trap. Without paying excrutiating sums to the corrupt city department of parks and recreation, and the profiteering insurance companies, the city has told us, we can no longer play our beloved game on city property. FIE! FIE! to this challenge we say that we will never give up! we will never give in! Back to the underground. a change of venues, and and a adaption of strategy, and we're back on our feet. This means that in order find out about bike polo, you must SHOW UP to bike polo. There will be no more advertisement. We will be yr. sole source of information for all things in the bike polo revolution! VIVE LA RESISTANCE! RIDE BIKES THROW BRICKS!!!

until we are physically removed, we continue to play at the following places and times:

  • Wednesday 6:30pm -> Colonel Summers Park : SE 20th & Belmont
  • ~~Sunday 2pm -> Alberta
nifl / paths
Created Jun 26, 2014
Order /etc/paths to give user-installed binaries precedence
View paths
# New
# Default
View config_bootstrap.php
* Custom configuration bootstrap file for ExpressionEngine
* Place config.php in your site root
* Add require(realpath(dirname(__FILE__) . '/../../config_bootstrap.php')); to the bottom of system/expressionengine/config/config.php
* Add require(realpath(dirname(__FILE__) . '/../../config_bootstrap.php')); to the bottom of system/expressionengine/config/database.php
* If you have moved your site root you'll need to update the require_once path
nifl /
Last active Oct 10, 2019
JS Objects


Object properties can refer to numbers, strings, arrays, functions, and other objects. Properties will also accept variables.

Creating objects

Literal notation - "Object Literal"

Literal objects can have properties and methods added to them on the fly, which we cannot do with a constructor. To add a method to a constructor we must extend its prototype chain.


Hoisting - Concept of program load order

First, memory is set aside for all necessary variables and declared functions.

// How a function is built by humans
function sumOfSquares (a, b) {
  var x = add(a*a, b*b);
  return x;


A closure is a function returned from a function complete with external variables.

The entire contents of an inner function will still be available outside the outermost function.

function simpleClosure () {
	var x = 4;
	function closeX (){
nifl /
Last active Aug 20, 2017
JS Functions


Functions are first–class citizens in JS, meaning that they can be passed around like any other type of data, eg, variables.

Declared function

Declared functions build in memory immediately when the program loads.

Basic syntax



alert() Sends message to user in small pop-up window

confirm() Asks for consent to move forward. Cancel returns false, OK returns true

prompt() Sends a message and retrieves an entry.

typeof() Useful for checking a variable's contents