Skip to content

Instantly share code, notes, and snippets.

Gernot Bartels nifl

Block or report user

Report or block nifl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

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

Overview

@nifl
nifl / axlesofevil.md
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 archive.org and as such the days and times are no longer valid AFAIK.
View axlesofevil.md

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
nifl / paths
Created Jun 26, 2014
Order /etc/paths to give user-installed binaries precedence
View paths
# New
/usr/local/bin
/usr/bin
/bin
/usr/local/sbin
/usr/sbin
/sbin
# Default
View config_bootstrap.php
<?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
nifl / js-objects.md
Last active Oct 10, 2019
JS Objects
View js-objects.md

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.

View js-hoisting.md

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;
View js-closures.md

Closures

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
nifl / js-functions.md
Last active Aug 20, 2017
JS Functions
View js-functions.md

Functions

Functions are first–class citizens in JS, meaning that they can be passed around like any other type of data, eg, variables. http://en.wikipedia.org/wiki/First-class_function

Declared function

Declared functions build in memory immediately when the program loads.

Basic syntax

View js-builtins.md

Built–Ins

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

You can’t perform that action at this time.