Skip to content

Instantly share code, notes, and snippets.

@adamgibbons
adamgibbons / article-data-1
Created April 14, 2014 20:42
server response contains articles, articleSizes, and articleCompositions
.factory 'ArticleData', () ->
{
articles: [
{
"id" : "chair",
"name" : "Chair",
"parent" : "article"
},
{
"id" : "sofa",
@adamgibbons
adamgibbons / product-101.md
Created August 11, 2014 22:54
Product 101 points

Roadmap paths

  • your-move
  • your-place
  • your-stuff
  • choose-quote
  • payment-book
  • payment
  • payment-confirmation
  • moving-day
  • feedback
@adamgibbons
adamgibbons / module-pattern.js
Created August 17, 2014 17:14
Module Pattern in JavaScript
// Module Pattern in JS
var FriendsModule = (function(){
// private vars and functions
var friends = ['Adam', 'Brittany', 'Russell', 'Erik', 'Hank'];
var addFriend = function(friend) {
friends.push(friend);
};
@adamgibbons
adamgibbons / go-board-configurations.js
Last active August 29, 2015 14:15
Electrons in universe vs Go board configurations
(function totalElectrons() {
var total = Math.pow(10, 88); // 1.0000000000000001e+88
console.log(total + ' electrons in the universe');
})();
(function totalGoConfigurations() {
// 19 x 19 grid and three possibilities per
// intersection (black stone, white stone, empty)
var total = Math.pow(3, 19 * 19); // 1.740896506590319e+172
console.log(total + ' possible configurations on a Go board');
.wrapper
p Visit <a href="https://equityzen.com/path-to-ipo">EquityZen</a> to see more Paths to IPO.
div
img(src="https://dioguwdgf472v.cloudfront.net/blog/img/etsy.png" width="500px")
@adamgibbons
adamgibbons / upgrade-psql
Last active August 29, 2015 14:22
Upgrade PostgreSQL
`launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist`
`mv /usr/local/var/postgres /usr/local/var/postgres.old`
`initdb -D /usr/local/var/postgres`
`pg_upgrade -b /usr/local/Cellar/postgresql/9.3.5_1/bin -B /usr/local/Cellar/postgresql/9.4.3/bin -d /usr/local/var/postgres.old -D /usr/local/var/postgres`
`./delete_old_cluster.sh`
@adamgibbons
adamgibbons / rename-files
Last active December 25, 2015 05:38
For all files in a directory, replace x with y.
#!/bin/bash
ls | while read -r FILE
do
mv -v "$FILE" `echo $FILE | tr 'x' 'y' `
done
@adamgibbons
adamgibbons / html5-css3-lesson-1
Created November 20, 2013 19:24
HTML5/CSS3 Class - Lesson 1
HTML - hyper text markup language
a set of markup tags that describe the content of a document/web page
doctype - instruction to browser as to what version of html will follow
tag
element
web browsers were created to read html documents and display them as web pages
@adamgibbons
adamgibbons / composition.js
Created January 9, 2016 22:26
javascript composition with ramda
var R = require('ramda');
var people = [
{
name: 'Adam',
age: 30,
gender: 'm',
party: 'd'
},
{

Keybase proof

I hereby claim:

  • I am adamgibbons on github.
  • I am adamgibbons (https://keybase.io/adamgibbons) on keybase.
  • I have a public key whose fingerprint is EF86 38B3 91C3 B077 B4E2 5105 C91C 0097 EAE2 C8F8

To claim this, I am signing this object: