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
kixxauth / match-making.coffee
Last active Aug 29, 2015
Match Making Psuedo Code
View match-making.coffee
# Overview
# --------
# The Match Making Service is called via a persisted socket connection
# from the Xbox (if possible). It works on an event driven system (event loop)
# rather than a threaded approach. This means we don't have to worry about locks,
# mutexes, and related bad things, but we do need to make sure we keep the
# execution time of the execution stacks in each event loop to a minimum.
#
# Approach
# --------
@kixxauth
kixxauth / models.coffee
Created Sep 9, 2014
model.save() with promise
View models.coffee
save: (data, options = {}) ->
entity = @
isNew = @isNew()
success = _.bind(@saveSuccess, @, isNew, options.collection, options.callback)
error = _.bind(@saveError, @)
promise = new Promise (resolve, reject) ->
_.defaults options,
wait: true
@kixxauth
kixxauth / application.js
Created Dec 17, 2014
Code examples from Backbone and Marionette on the Xbox One
View application.js
// ## Setup the application:
//
// application.js
var BackboneApp, BA;
BackboneApp = BA = (function (Backbone, Marionette) {
var Application = Marionette.Application.extend({
View hvp-parallel.js
/**
* A simple parallel program in JavaScript for the Rhino JavaScript engine.
*/
// Set up the globals.
//
// While JavaScript allows all values and references in the global scope to be
// dynamic, only objects (JavaScript arrays and object natives) are mutable "in
// place". It is up to the programmer to keep the global namespace clear in a
// multithreaded environment. Because this is a simple program, I didn't do
View hvp-parallel-0.2.js
/**
* A simple parallel program in JavaScript for the Rhino JavaScript engine.
*/
// Set up the globals.
//
// While JavaScript allows all values and references in the global scope to be
// dynamic, only objects (JavaScript arrays and object natives) are mutable "in
// place". It is up to the programmer to keep the global namespace clear in a
// multithreaded environment. Because this is a simple program, I didn't do
View object-to-url.js
/**
* URL encode an object.
*/
exports.encode = function encode(data) {
var postData = [], value, property;
for(property in data) {
if (Object.prototype.hasOwnProperty.call(data, property)) {
value = ((typeof data[property] === "undefined") && "undefined" ||
View jkp.erl
%%
%% jkp.erl Was created for The Hudson Valley Programmers' Meetup
%% homework assignment #13. The requirement is to build a
%% rock -- paper -- scissors game between parallel processes.
%% http://hvprogrammers.org/homework-13.html
%%
%% It's also my first experiment with Erlang.
%%
%% kixxauth@gmail.com
%%
View comma-first-var.js
// See comments below.
// This code sample and justification brought to you by
// Isaac Z. Schlueter, aka isaacs
// standard style
var a = "ape",
b = "bat",
c = "cat",
d = "dog",
@kixxauth
kixxauth / insult_handler.py
Created Oct 22, 2010
Insult server tutorial.
View insult_handler.py
import logging
import time
import base_handler
class InsultServer(base_handler.BaseHandler):
def get(self):
# Log the user agent just for fun.
logging.info(self.user_agent_repr)
response = base_handler.Response(
@kixxauth
kixxauth / README
Created Oct 22, 2010
FWP copyright and license
View README
Copyright and License
---------------------
copyright: (c) 2010 by Fireworks Technology Projects Inc.
Unless otherwise indicated, all source code is licensed under the MIT license.
See MIT-LICENSE for details.
And, unless otherwise indicated, all content, including written copy and images
but not including source code, is licensed under a Creative Commons
Attribution-ShareAlike 3.0 Unported license. All derivatives of this content
You can’t perform that action at this time.