Skip to content

Instantly share code, notes, and snippets.

Kris Walker kixxauth

Block or report user

Report or block kixxauth

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
kixxauth / backbone-one.js
Created Nov 19, 2012
Backbone.js Single Event Listener Registration
View backbone-one.js = function (events, callback, context) {
var self = this;
function wrapper() {, wrapper, context);
callback.apply(this, arguments);
this.on(events, wrapper, context);
kixxauth / broken.html
Created Oct 11, 2012
Good Modal Dialogs
View broken.html
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>Sane Modal</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="positioned.css">
<div id="base-layer">
View sane-modal.html
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>Sane Modal</title>
<meta name="viewport" content="width=device-width">
<!-- All "normal" content goes in the base layer -->
<div id="base-layer">
kixxauth / better-javascript.js
Created Mar 31, 2012
JavaScript Objects and Promises
View better-javascript.js
// Typical Prototype composure in JS; This is the classical way of creating and
// using objects in JS.
// "Super" or "Parent" object prototype
function Cat(color) {
this.color = color;
this.saying = 'meowwww';
kixxauth / base.html
Created Jun 27, 2011
Conditional HTML root tag based on browser
View base.html
<!doctype html>
{# <!-- --> #}
<!--[if lt IE 7 ]> <html class="no-js ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]> <html class="no-js ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]> <html class="no-js ie8" lang="en"> <![endif]-->
<!--[if IE 9 ]> <html class="no-js ie9" lang="en"> <![endif]-->
<!--[if !(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<style>/* This works just as well in a stylesheet, of course */
kixxauth / test_request.js
Created Jun 26, 2011
Make a request to an http server
View test_request.js
// Call this script with a http URL as the single argument:
// node test_request.js
var http = require('http');
var url = require('url');
parsed = url.parse(process.argv[2]);
var opts = {
port: 80,
kixxauth /
Created Jun 25, 2011
Hanging responses from Node-static
# This is a factory function which creates a middleware handler
# for serving static files.
# We have to use staticServer.serveFile() instead of .serve() because
# we are dynamically rewriting the file path based on the name of the
# application asking for the file.
resourceHandler = (opts) ->
staticServer = new static.Server(STATIC_PATH)
kixxauth /
Created May 30, 2011
Namespaced and "stateful" event emitter.
# Kris Walker <>
# Copyright 2011 Licensed under the MIT License
# Namespaced and Stateful events
# * Event names are namespaced
# * Event name specificity is separated by a dot "."
# * Event names get more specific from left to right.
kixxauth / struct.js
Created May 6, 2011
Data structure for Royal Node
View struct.js
* DAG node
* --------
var tabbar =
{ name: "tabname",
title: "Title",
thumbnail: "Icon",
resource_type: "list, movie, image, ...",
kixxauth / long-polling.html
Created Apr 11, 2011
A Node.js http long polling server for HTTP streaming.
View long-polling.html
<!DOCTYPE html>
<style type="text/css">
body {
font-size: 18px;
background: #000;
color: #fff;
#container {
width: 600px;
You can’t perform that action at this time.