Skip to content

Instantly share code, notes, and snippets.

View nigelwtf's full-sized avatar
😶‍🌫️
win some lose most

Nigel Sirisomphone nigelwtf

😶‍🌫️
win some lose most
View GitHub Profile
@nigelwtf
nigelwtf / GlobalDispatcher.coffee
Created July 24, 2015 00:27
DeloreanJS Flux Dispatcher Actions
# Author: https://github.com/darcyadams
# Context: https://github.com/deloreanjs/delorean/issues/89#issuecomment-124233890
# Separating dispatcher concerns in DeloreanJS
{Flux} = require 'delorean'
Global = require './stores/global'
System = require './stores/system'
UserStore = require './stores/loggedin_user'
@nigelwtf
nigelwtf / spiral.js
Last active October 14, 2016 04:09
Javascript Spiral Matrix Problem
function spiralMatrix(n) {
var total = n * n,
sides = n,
x = 0,
y = 0,
dx = 1,
dy = 0,
matrix = [],
i = 0,
j = 0;