Skip to content

Instantly share code, notes, and snippets.

  1. el nino (l) vs xisco (w)
  2. yarko (l) vs nasty ray (w)
  3. scumbag jole (l) vs wing (w)
  4. illz (l) vs cheerito (w)
  5. pocket (l) vs kid colombia (w)
  6. ronnie (l) vs hong 10 (w)
  7. gun (l) vs kareem (w)
  8. ken fury (l) vs gravity (w)
  9. luigi (l) vs menno (w)
  10. robin (l) vs issei (w)
@dillonforrest
dillonforrest / learning-to-code.md
Last active October 6, 2015 01:06
prewriting for a post

What is this?

A concise and tactical guide to learn to code.

Rationale

Learning to code is hard. Many people are trying to learn to code, and many of them are frustrated with their progress not matching their expectations. Developer bootcamps have emerged to monetize this frustration.

Who is this for?

@dillonforrest
dillonforrest / useful-interfaces.md
Last active August 29, 2015 14:20
are command line tools and email-first interfaces generally more useful interfaces?

A thought experiment: CLIs and email the most useful interfaces?

Rationale behind this thought experiment

The GUI is the most common UI by far. However, GUIs are expensive to create and iterate and frequently frustrating for the end user. These shortcomings could be addressed with better engineers and better product sense, but many companies can't afford or can't retain quality engineers, designers, et al. Does the GUI have too much marketshare? Are there other interfaces which are more useful?

The CLI

Reasons why CLI is a great interface:

  • All unix philosophy benefits, especially composibility, which implies network effects since CLIs' collective usefulness is an exponential or factorial function of the number of CLI tools available. You can pipe, grep, tail, curl any of your CLI outputs with any other CLI. (~50% of the benefit)
angular.module('campfire', [
'templates-app',
'templates-common',
'ngBoilerplate.home',
'ngBoilerplate.about',
'ui.state',
'ui.route',
'UserSrvc'
])
/*
* Trying to ensure users are logged in. I don't want unverified users to look
* at any of the pages. So, on either $locationChangeStart or $routeChangeStart,
* I'd like to check if I'm logged in. If I'm not logged in, abort the route
* change and go to login route. If I AM logged in, continue changing the route.
*/
angular.module('myModule', [
'ui.state', // using AngularUI's $stateProvider
'ui.router', // using AngularUI's $urlRouterProvider
[
{
"site": "aaaaa.com",
"status": "live",
"size": "large",
"owner": "some dude",
"guid": 1
},
{
"site": "bbbbb.com",
//////////////////////////////////////////////////
// data generation
//////////////////////////////////////////////////
var _ = require('underscore');
function genStaticData() {
var alphabet = 'abcdefghijklmnopqrstuvqxyz';
return _.range(69).map(function makePublisher() {
@dillonforrest
dillonforrest / broken.cljs
Created January 28, 2014 21:03
why doesn't this compile?
(ns om-tut.coreeee
(:require [om.core :as om :include-macros true]
[om.dom :as dom :include-macros true]))
(enable-console-print!)
(def app-state (atom {:text "Hello world!"}))
(om/root
app-state
@dillonforrest
dillonforrest / om-example.md
Last active January 3, 2016 09:49
figuring out cljs's Om by David Nolen

This is what I used to have:

(defn static-data []
  (for [row (range 10)]
    {:a "some" :b "fake" :c "data"}))

(def app-state (atom {:items (static-data)}))

;;; components
@dillonforrest
dillonforrest / js_tilde.md
Last active December 24, 2015 16:29
Using the super-rare tilde operator in javascript

I just came across this interesting bit of javascript, which I've paraphrased:

var _ = require('underscore');
var coll = require('./some/external/array');

function contains(str, key) {
  return ~str.indexOf(key);
}