Skip to content

Instantly share code, notes, and snippets.

@BaseCase
BaseCase / dc_2017_biblio.md
Last active January 23, 2020 05:13
List of resources recommended or mentioned by the speakers at Deconstruct 2017
View dc_2017_biblio.md

Deconstruct 2017 Bibliography

Here are all of the resources mentioned by Deconstruct 2017 speakers, along with who recommended what. Please post a comment if I missed something or have an error!

DC 2017 Speakers' Choice Gold Medalist

  • Seeing Like a State by James Scott

Books

  • Public Opinion by Walter Lippmann (Evan Czaplicki)
  • A Pattern Language by Christopher Alexander (Brian Marick)
  • Domain Driven Design by Eric Evans (Brian Marick)
View types.markdown

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@dannguyen
dannguyen / wget-snapshotpage.md
Last active December 25, 2023 20:57
Use wget to snapshot a page and its necessary visual dependencies
View wget-snapshotpage.md

Use wget to mirror a single page and its visible dependencies (images, styles)

Money graphic via State of Florida CFO Vendor Payment Search

Graphic via State of Florida CFO Vendor Payment Search (flair.myfloridacfo.com)

This is a quick command I use to snapshot webpages that have a fun image I want to keep for my own collection of WTFViz. Why not just right-click and save the image? Oftentimes, the webpage in which the image is embedded contains necessary context, such as captions and links to important documentation just incase you forget what exactly that fun graphic was trying to explain.

@whylom
whylom / README.md
Last active August 29, 2015 13:57
Superhash!
View README.md

Superhash!

A wrapper for Hash that lets you access keys via dynamic methods (like Ruby's OpenStruct) but also:

  • works recursively
  • also lets you use Hash methods like [] and keys

Example

View gist:8838957
BEFORE:
sam@ubuntu discourse % rm -fr tmp/cache
sam@ubuntu discourse % rm -fr public/assets
sam@ubuntu discourse % time RAILS_ENV=production bin/rake assets:precompile
58.55s user 1.79s system 100% cpu 1:00.02 total
AFTER:
@JoshCheek
JoshCheek / notes.rb
Created January 27, 2014 16:04
Code chautauqua - Maintainable Code on a Large Project (omg, needs a better name)
View notes.rb
# MAINTAINABLE CODE ON A LARGE PROJECT!!
# you shouldn't be able to use an object wrongly
# avoid mutability, especially to the outside world and to inputs. work with values
def accrue_interest(loan, start_date, end_date)
loan.accrued_interest = (loan.daily_interest_rate * loan.principal) * (start_date - end_date)
end
# becomes
@jarredkenny
jarredkenny / irc.go
Created January 21, 2014 14:10
A simple IRC bot written in Go.
View irc.go
package main
import (
"fmt"
"net/textproto"
"regexp"
)
var (
conn *textproto.Conn
@indirect
indirect / tmux-named
Last active December 23, 2015 15:19
tmux configuration
View tmux-named
#!/bin/bash
# I alias this script to `mux`:
# $ alias mux=tmux-named
# Then I tell terminal to automatically attach new windows to my session named "main",
# by setting the preference named "Shells open with" to this command:
# /path/to/tmux-named main
#
# When working on a particular project, I can jump a session for that project
# by running "mux project-name".