Skip to content

Instantly share code, notes, and snippets.

@passcod
passcod / gist:3170138
Created July 24, 2012 14:14
The 80/20 Rule
I've been saying that to friends, family, and colleagues for a while now, and I think maybe I should just write it down and refer to it instead of rehashing it every time. In the last few dozen explanations, it hasn't actually changed, so I think it's pretty stable. Of course, the community will have something to say, and that's expected!

There are more or less seven states to a new (software) project:

  1. Figment. That's when it's just an idea, and maybe you've written something down on a paper napkin, or discussed it over coffee with a friend.
  2. Planning. You're actually putting more thought into it, doing the initial research, hopefully consolidating the idea into something manageable.
  3. Prototype. Not necessarily code. Sometimes a prototype can just be rectangles of paper under magnets on a whiteboard, and a few arrows here and there to represent dynamics. Also known (in the case of code) as pre-alpha.
  4. Alpha. Finally! Code. You've probably pulled a directory structure o
@passcod
passcod / autreqs.gv
Created June 28, 2012 03:49
AUT reqs for BSc/BMathSc by level: yellow=5, green=6, blue=7, purple=postgrad
digraph autbsc {
715202 [color=yellow];
715204 [color=yellow];
715189 [color=yellow];
715186 [color=yellow];
715187 [color=yellow];
735320 [color=yellow];
735318 [color=yellow];
555301 [color=yellow];
715700 [color=yellow];
@passcod
passcod / graph.gv
Created June 27, 2012 23:21
pippo - Exploring meta structures
digraph pippo {
Node1 -> Relation1;
Relation1 -> Node2;
Relation1 [shape=square];
Relation1 [color=blue];
MetaNode1 -> MetaNode2 [color=grey];
MetaNode2 -> Node1 [color=grey];
MetaNode1 -> Node2 [color=grey];
MetaNode3 -> Relation1 [color=grey];
@passcod
passcod / uoareqs.gv
Created June 25, 2012 06:51
UoA reqs graph
digraph uoareqs {
/* CompSci */
CS101 -> CS105;
CS101 -> CS210;
CS101 -> CS220;
CS101 -> CS225;
CS101 -> CS230;
CS101 -> CS280;
@passcod
passcod / eep.html
Created June 19, 2012 09:19
Akiwiguy's thingie. But with slightly better CSS. Meh. Who am I kidding.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="style.css">
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script>
$(function(){
$("button").click(function(){
$('body').toggleClass('expanded');
@passcod
passcod / file.xml
Created June 18, 2012 02:11
OS X U.S. Keyboard Layout with "PC-like" Shift key
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboard PUBLIC "" "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--Created by Ukelele version 2.2 on 2012-06-18 at 12:06 (NZST)-->
<!--Last edited by Ukelele version 2.2 on 2012-06-18 at 12:08 (NZST)-->
<keyboard group="0" id="1069" name="U.S. with Shift" maxout="1">
<layouts>
<layout first="0" last="17" modifiers="f4" mapSet="16c"/>
<layout first="18" last="18" modifiers="f4" mapSet="984"/>
<layout first="21" last="23" modifiers="f4" mapSet="984"/>
<layout first="30" last="30" modifiers="f4" mapSet="984"/>
@passcod
passcod / dom-loaded-test.html
Created May 26, 2012 08:29
onload, readyState, and DOMContentLoaded
<!DOCTYPE html>
<html>
<head>
<script>
window.onload = function () {
console.log(''+(+new Date)+': Onload fired');
};
document.onreadystatechange = function () {
console.log(''+(+new Date)+': Ready state changed');
@passcod
passcod / parseUri.coffee
Created April 24, 2012 19:13 — forked from mrclay/UFCOE.parseUri.js
Parse a URI using the DOM
parseUri = (uri) ->
result = {}
a = document.createElement 'a'
props = 'protocol hostname host pathname port search hash href'.split ' '
a.href = uri
# Copy relevant properties
result[prop] = a[prop] for prop in props
@passcod
passcod / _arrow_bx.scss
Created April 12, 2012 06:58
SCSS Arrow Please!
/* Coded by @passcod, MIT Licensed: passcod.mit-license.org
Adapted from @shojberg's cssarrowplease.com
*/
@mixin arrow-box( $selector: ".arrow-box",
$position: "top",
$arrow_size: 10px,
$border_width: 2px,
$box_color: #333,
$border_color: #ccc) {
@passcod
passcod / .rvmrc
Created March 22, 2012 15:00
Use either 1.9.3 or 1.9.2 with RVM
#!/usr/bin/env bash
ruby_string="ruby-1.9.3"
ruby_alt_string="ruby-1.9.2"
gemset_name="tavignano"
if (( `rvm list strings | grep -c "${ruby_string}"` ))
then
# Load or create the specified environment
rvm --create use "${ruby_string}@${gemset_name}"