Skip to content

Instantly share code, notes, and snippets.

microservice party

Daniel Pritchett ⚡ dpritchett

microservice party
View GitHub Profile
dpritchett /
Last active Jan 11, 2022
Programming as Theory Building

Programming as Theory Building

Peter Naur, 1985

(copied from,+Ehn,+Musashi%22)


The present discussion is a contribution to the understanding of what programming is. It suggests that programming properly should be regarded as an activity by which the programmers form or achieve a certain kind of insight, a theory, of the matters at hand. This suggestion is in contrast to what appears to be a more common notion, that programming should be regarded as a production of a program and certain other texts.


Rich Hickey on becoming a better developer

Rich Hickey • 3 years ago

Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following:

namuol /
Last active Jun 25, 2021
rage-quit support for bash

rage-quit support for bash


Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

tlowrimore / assets_gz.conf
Last active Dec 14, 2015
Apache config directives for serving Rails's precompiled .gz files, created by the asset pipeline during precompile.
View assets_gz.conf
<LocationMatch "^/assets/.*$">
Header unset ETag
FileETag None
# RFC says only cache for 1 year
ExpiresActive On
ExpiresDefault "access plus 1 year"
RewriteEngine On
RewriteCond %{HTTP:Accept-Encoding} gzip
bradmontgomery /
Created Oct 31, 2011
A stab at running remote Django management commands via fabric.
def manage(management_command, args=None):
cmd = "source /path/to/virtualenv/bin/activate && "
cmd += "python %s %s" % (management_command, args or '')
dpritchett /
Created Jul 24, 2011
Sending a text message via Twilio using Python or Ruby
#!/usr/bin/env python
* A Twilio account
* Python with the twilio library (`pip install twilio`)
* A purchased phone number on twilio to serve as your "from" number ($1/mo)
* Some twilio credits to pay for the $.01/msg SMS fees
The python-twilio library uses OS-level environment variables
Janiczek /
Created May 31, 2011
First few Project Euler problems solved in CoffeeScript. Comments on how to make it more beautiful (in terms of CoffeeScript, not algorithm) highly appreciated!
@_1 = ->
# sum of multiples of 3 or 5 (not both) under 1K
answer = 0
for n in [1...1000]
if n % 3 == 0 or n % 5 == 0
answer += n
bradmontgomery /
Created May 9, 2011
Short python script to show that if you could fold a piece of paper in half 50 times, its thickness will be 3/4 the distance from the Earth to the Sun (71 million miles). Discovered on a very interesting Quora question.
Folding paper in half 50 times is 3/4 of the distance from earth to sun
Thickness of a sheet of paper: 0.1 mm (~0.004 inches)
dpritchett /
Created Nov 17, 2010
Use this as a cron job maybe?
import feedparser, re #feedparser available at
def search_fatwallet(keyword):
fw = feedparser.parse(r'')
for entry in fw.entries:
if, entry['title']):
print entry['title'], '\n', entry['feedburner_origlink']
print ''
>>> search_fatwallet('car')
nruth / tests_spec.rb
Created Jul 30, 2010
how not to loop/nest rspec example groups (where you want to iterate diferent let/before variable values)
View tests_spec.rb
class Tests
SUBTESTS = %w(Abstract Decision Quantitative Verbal)
describe Tests do
describe "before assigning @ - " do
describe "this doesn't work because the loops are all at the same describe level (the befores override one another)" do
Tests::SUBTESTS.each do |test|
before(:each) do