Skip to content

Instantly share code, notes, and snippets.

@willurd
willurd / web-servers.md
Last active June 17, 2024 09:38
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000

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

@termie
termie / gist:2210833
Created March 26, 2012 23:57
Always Say No

Always Say No

Add a new feature? No. Add a column to the database? No. Add another way to lookup a data item? No. Add a new query param to the API? No. No no no no. A quick rule to follow when you want your project to keep a tight scope, to remain scalable and easy to maintain, is to say no to everything.

Feature creep can be subtle, the simple change of making an attribute required in your data model leads to a slew of other new "expected" behaviors.

@paydro
paydro / gist:1140999
Created August 11, 2011 22:48
Allows #context calls in Rails 3 tests like rspec/minitest spec
# Create a context block like rspec.
#
# Inspired by:
# - MiniTest::Spec
# - Chris Wanstrath's https://gist.github.com/25455
#
# Examples:
#
# class UserTest < ActiveSupport::TestCase
# context "Auth" do
@vangberg
vangberg / DWM-ON-OS-X.md
Created February 22, 2010 19:24
dwm on os x [work in progress!]

Installing and configuring dwm on OS X

  1. Install XQuartz (http://xquartz.macosforge.org) which is the development version of the X11.app that ships with OS X, which means it is way more up to date. I have had some weird issues with X11.app v. 2.3-something. XQuartz 2.5.0 fixed that.

  2. Install dwm from Homebrew, brew install dwm. This makes a bunch of necessary tweaks to the DWM configuration.

  3. Add the following script to $PATH, name it dwm-launch and chmod 755:

    cd ~
    

while true