Skip to content

Instantly share code, notes, and snippets.

View SinisterMinister's full-sized avatar

Codey Whitt SinisterMinister

  • VisualGuruz
  • Remote
View GitHub Profile
Kumo.AppsNewApplicationRoute = Ember.Route.extend({
setupController: function (controller) {
// Doesn't work
controller.set({
model: controller.get('controllers.appsNewIndex.model'),
projects: controller.get('controllers.appsNewIndex.projects')
});
// Works fine
controller.set('model', controller.get('controllers.appsNewIndex.model')).set('projects', controller.get('controllers.appsNewIndex.projects'));
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the branch/status of the current git repository
# * the branch of the current subversion repository
# * the return value of the previous command
#
# USAGE:
var Intaglio = require('intaglio'),
repository = new Intaglio.repositories.mysql({
host: 'localhost',
database: 'database',
user: 'username',
password: 'password'
});
Intaglio.ORM.create(repository).then(function (ORM) {
ORM.factory('user').create({
@SinisterMinister
SinisterMinister / backpack.md
Last active August 29, 2015 14:24
My Backpacking List

My Backpacking Item List

  • Backpack
  • Day bag
  • Water Reservior
  • Compass
  • Map
  • Sunscreen
  • Rain jacket
  • Head lamp - $60
{
init: function(elevators, floors) {
var queue = [],
self = this;
for (var i = floors.length - 1; i >= 0; i--) {
floors[i].on("up_button_pressed", self.api.handlers.onUpButton);
floors[i].on("down_button_pressed", self.api.handlers.onDownButton);
floors[i].api = self.api;
{
init: function (elevators, floors) {
var DS = this.api.instances.DispatchServiceInstance = new this.api.services.DispatchService(this.api, floors),
ES = this.api.instances.ElevatorServiceInstance = new this.api.services.ElevatorService(this.api, elevators);
DS.on("new_task", function () {
console.info("New task", this);
// if (ES.idleElevatorsAvailable())
// ES.processTask(DS.nextTask());
});
@SinisterMinister
SinisterMinister / redesign.md
Created December 5, 2015 23:57
Redesign notes for Intalgio

Intaglio Redesign

Concepts

Make Fewer Assumptions on Data

One mistake we made with the prior veri

@SinisterMinister
SinisterMinister / dev.conf
Last active December 11, 2015 18:58
dnsmasq setup for osx
# put in /usr/local/etc/dnsmasq.d/
address=/dev/10.1.1.10
@SinisterMinister
SinisterMinister / .bash_profile
Created January 27, 2013 00:27
OSX Terminal color support
# Color Support
export TERM="xterm-color"
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
# Setup SVN's editor
export SVN_EDITOR=nano
@SinisterMinister
SinisterMinister / _test.md
Last active December 14, 2015 00:29
Programming Test
Programming Test

Write a view class that can fetch data in multiple ways (file, web, etc) in different formats (JSON, CSV, etc) and render them in multiple ways (table, unordered lists). Bonus points if you use the following interfaces:

<?php

/**
 * Describes a data interface for use with a renderer to render an output
 */