Skip to content

Instantly share code, notes, and snippets.

@reecer
reecer / Preferences.sublime-settings
Created December 4, 2014 04:43
Sublime text editor config
{
"theme": "Piatto Light.sublime-theme",
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night.tmTheme",
"font_size": 10,
"highlight_line": true,
"detect_indentation": false,
"hot_exit": false,
"remember_open_files": false,
"tab_size": 2,
"translate_tabs_to_spaces": true,
@reecer
reecer / server.js
Created October 8, 2014 22:26
PassportJS Usage
var passport = require('passport'),
FacebookStrategy = require('passport-facebook').Strategy,
TwitterStrategy = require('passport-twitter').Strategy,
GithubStrategy = require('passport-github').Strategy,
GoogleStrategy = require('passport-google-oauth').OAuth2Strategy;
/* ...server setup... */
// Setup passport auth
app.use(passport.initialize());

Lesson 1: Affordances and Signifiers

Don't solve the problem given (as it's stated), figure out what the real underlying problem is.

To understand design, you have to be a good observer and question things. Travel with a camera and take photos. Don't use flash, use natural lighting when possible.

Affordances are the relationships (read: possible actions) between an object and an entity (most often a person). For example, a chair affords sitting for a human. Affordances enable interactions between entities and objects (similarly, anti-affordances prevent or reduce interactions). The presence of an affordance is determined by the properties of the object and of the abilities of the entity who's interacting with the object.

Signifiers are signals, communication devices. These signs tell you about the possible actions; what to do, and where to do it. Signifiers are often visible, but invisible (secret) signifiers do exist, like clicking a YT video to play

@reecer
reecer / sineWave.js
Created August 22, 2014 06:42
Sine wave using canvas.
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
var points = {};
var x = 0;
var len = 500;
animate();
var util = require('util'),
EventEmitter = require('events').EventEmitter;
var Server = function() {
var self = this;
this.on('custom_event', function() {
self.logSomething('custom_event');
});
import websocket
import thread
import time
import sys
from urllib import *
class SocketIO:
def __init__(self):
self.PORT = 5000
self.HOSTNAME = '127.0.0.1'
@reecer
reecer / CodeMirror.dart
Created July 17, 2014 07:26
Simple js-interop with dart to wrap an instance of CodeMirror.
import 'dart:html';
import 'dart:js';
class CodeMirror{
var cm;
CodeMirror(Element el){
cm = context.callMethod("CodeMirror", [el]);
}
}
@reecer
reecer / General Makefile
Last active August 22, 2024 04:19
A general makefile for general-purpose C projects.
CC=gcc
CCFLAGS=-Wall
LDFLAGS=
SOURCES=$(wildcard *.c)
OBJECTS=$(SOURCES:.c=.o)
TARGET=des
all: $(TARGET)
$(TARGET): $(OBJECTS)
@reecer
reecer / install.sh
Created April 14, 2014 19:10
Installing emscripten
# Note: The last two instructions are Ubuntu-specific. Most distros carry these packages, though.
# 1. Get source
git clone git://github.com/kripken/emscripten.git
# 2. Get LLVM-CLANG -- probably available in apt-get
wget http://llvm.org/releases/3.2/clang+llvm-3.2-x86-linux-ubuntu-12.04.tar.gz
tar -zxvf clang...
var util = require('util'),
EventEmitter = require('events').EventEmitter;
var Server = function() {
var self = this;
this.on('custom_event', function() {
self.logSomething('custom_event');
});