Skip to content

Instantly share code, notes, and snippets.

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@typesend
typesend / gist:25552
Created November 16, 2008 21:17
data_objects_adapter.rb ArgumentError
If you get this disgusting error just:
gem uninstall addressable --version 2.0
~/merbtest ben$ merb
Loading init file from /Users/ben/merbtest/config/init.rb
Loading /Users/ben/merbtest/config/environments/development.rb
@typesend
typesend / gist:2520726
Created April 28, 2012 17:42 — forked from starflyer59/gist:2505474
Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id
Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id
######### _stars.html.erb ###################
<div id="starRating">
<%= form_for(rating_ballot, :html => { :class => 'rating_ballot' }) do |f| %>
<%= f.label("value_1", content_tag(:span, '1'), {:class=>"rating", :id=>"1"}) %>
<%= radio_button_tag("rating[value]", 1, current_user_rating == 1, :class => 'rating_button') %>
<%= f.label("value_2", content_tag(:span, '2'), {:class=>"rating", :id=>"2"}) %>
<%= radio_button_tag("rating[value]", 2, current_user_rating == 2, :class => 'rating_button') %>

To the members of the MIT community:

This past weekend, a distressing event disrupted the life of our campus community. I am writing now to share details about the incident and important information that affects us all.

The incident itself On Saturday, February 23 at 7:28 AM, the dispatch center at the Cambridge Police Department (CPD) received an electronic communication reporting an emergency at 77 Massachusetts Avenue. The communication came through a Sprint relay message service designed for people with hearing or speech impediments. The communication went on for more than 18 minutes, with a Sprint relay operator interacting with the caller and in turn communicating with a CPD dispatcher.

One minute into the communication, the caller reported someone with a “really big gun,” and “armor” who was “getting out of control.” The CPD dispatcher immediately sent CPD units and State Police to the site, and notified MIT Police.

Within two minutes of being notified, the first MIT Police units entered Buildi

def self.import(file)
CSV.foreach(file.path, headers: true) do |row|
house = find_or_initialize_by(id: row['business_id']) # needed to specify what column to use when finding it
# Explicit mappings is important for maintainability and so it's clear what columns you expect.
house.attributes = {
address: row['address'],
whatever: row['what_ever'],
blah: row['blah_column']
}
# this overwrites all data of any pre-existing records, too, which is probably a bad idea
### Keybase proof
I hereby claim:
* I am typesend on github.
* I am typesend (https://keybase.io/typesend) on keybase.
* I have a public key whose fingerprint is 38B6 37EC 2568 54C4 2AD5 FCF1 0A5D DBE0 F1D9 C113
To claim this, I am signing this object:
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsupport.hp.com%2Fus-en%2Fdrivers%2Fselfservice%2Fswdetails%2Fhp-l7014t-14-inch-retail-touch-monitor%2F10691869%2FswItemId%2Fvc-170706-1&data=02%7C01%7Cben.damman%40state.ca.gov%7C5ce2c3e2a8564bbddd3108d4d45f5d72%7C52b26be47f5d4e1cbaed8cf75b7570d5%7C1%7C0%7C636366953441362889&sdata=rWJ1t6HVIjYMLCmANBuXb67LMrtr9otQyF11ViYtl5E%3D&reserved=0
@typesend
typesend / TRPA Rules of Procedure.md
Last active September 25, 2017 02:10
Manually converted the TRPA Rules of Procedure PDF into Markdown.

TRPA Code of Ordinances

Rules of Procedure

Adopted November 15, 2011 Effective March 1, 2012

ARTICLE 1: GENERAL

1.1. PURPOSE OF RULES

@typesend
typesend / index.js
Created September 28, 2017 16:06
Initial Oscar Schema
var express = require('express');
var graphqlHTTP = require('express-graphql');
// var GraphQLJSON = require('graphql-type-json');
var { buildSchema } = require('graphql');
var schema = buildSchema(`
# Temporary placeholder type for development.
scalar TBD
# A JSON Web Token string.