Skip to content

Instantly share code, notes, and snippets.

View jamesbee's full-sized avatar
😘

James Become jamesbee

😘
View GitHub Profile
@henrik
henrik / deploying_phoenix_on_dokku.md
Last active April 14, 2024 00:32
Deploying Elixir's Phoenix Framework on Dokku.

Deploying Phoenix on Dokku

Worked 2015-09-08 for Phoenix 1.0.1 on Dokku 0.3.25.

These instructions assume you've set up Dokku. If not, go find a tutorial for that part. My notes for setting it up on Digital Ocean.

On your local machine, in the app's repo

Create a Dokku app:

@willurd
willurd / web-servers.md
Last active June 7, 2024 03:53
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
@michilu
michilu / functools_timeit.py
Created October 12, 2012 00:04 — forked from kumagi/lru.py
python lru benchmarks
#!/usr/bin/env python
from functools32 import lru_cache
from time import time
import random
import sys
def benchtime(fn):
oldtime = time()
fn()
return time() - oldtime