Skip to content

Instantly share code, notes, and snippets.

@jacobh
jacobh / gist:1370732
Created November 16, 2011 17:25
Film Photography 101

Film Photography 101

After seeing so many repetitive questions in the film photography thread on facepunch I've decided to write a bit of a crash course into film photography. I've been using film for about a year now, and I'm loving it; most of what I'm going to say is based off either what I've discovered, or what far more experienced friends have taught me.

Some parts such as reccomendations are going to be, by nature, biased, as I'm inclined to reccomend stuff that I've used and can trust. Don't think that because I haven't listed something that means it's instantly terrible.

Cameras

The first question when looking at getting into film photography is which camera should I buy? This answer will vary from person to person, situation to situation, so I'm going to try to give a bit of a rundown of the various different types of cameras, and situations where they are best used.

@jacobh
jacobh / photos.models.py
Created November 6, 2011 10:17
django-imagekit
from django.db import models
from django.contrib.auth.models import User
from imagekit.models import ImageSpec
from imagekit.processors import resize, Adjust
from django.db.models.signals import post_save
from django.dispatch import receiver
from celery.task import task
from celery.execute import send_task
@jacobh
jacobh / gist:1316265
Created October 26, 2011 12:57
Tumblr Theme
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<!-- ----------------------------------
Theme Urban by Max Davis, 2011.
http://themes.themaxdavis.com
---------------------------------- -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import *
base= declarative_base()
class Item_information(base):
__tablename__= 'cpanel_item_information'
id= Column(Integer, primary_key= True)
name= Column(String(255))
description= Column(Text)
@jacobh
jacobh / gist:1302166
Created October 20, 2011 20:01
"Pseudocode"
# set prices
adult_prices = {
1: 46,
2: 84,
3: 120,
4: 150,
5: 175
}
child_prices = {
@jacobh
jacobh / gist:1293202
Created October 17, 2011 17:35
regex master~
>>> string = "GM.SetupCar(VEHICLE_SPEEDO, 'Speedo', 'speedo', 'models/sickness/speedodr.mdl', 'Make: Ford, Model: Speedo', 50000, 3750, 1.29);"
>>> re.search(r"GM.SetupCar\(.*?, '(?P<name>.*?)',.*'Make: (?P<make>.*), Model: (?P<model>.*)'", string).groupdict()
{'model': 'Speedo', 'make': 'Ford', 'name': 'Speedo'}
@jacobh
jacobh / error
Created October 9, 2011 17:42
bottle includes
Traceback (most recent call last):
File "main.py", line 24, in <module>
app.mount('/static/', default_views)
File "/usr/local/lib/python2.6/dist-packages/bottle.py", line 430, in mount
raise TypeError('Only Bottle instances are supported for now.')
TypeError: Only Bottle instances are supported for now.
@jacobh
jacobh / error
Created October 9, 2011 14:46
template class
Exception:
NameError("global name 'render' is not defined",)
@jacobh
jacobh / 1 processing server
Created September 19, 2011 15:01
Rackspace Load Balancing
Server Software: nginx/0.7.67
Server Hostname: rackspace.weldr.me
Server Port: 80
Document Path: /profile/jacobh/
Document Length: 12472 bytes
Concurrency Level: 128
Time taken for tests: 67.230 seconds
Complete requests: 2000
@jacobh
jacobh / gist:1223927
Created September 17, 2011 13:20
Gunicorn launch error
root@vps:/var/www/weldr.me/Pyzer# python pyzer.py
Bottle server starting up (using GunicornServer())...
Listening on http://0.0.0.0:9998/
Use Ctrl-C to quit.
2011-09-17 17:20:02 [9695] [INFO] Starting gunicorn 0.13.1
2011-09-17 17:20:02 [9695] [INFO] Listening at: http://127.0.0.1:8000 (9695)
2011-09-17 17:20:02 [9695] [INFO] Using worker: sync
2011-09-17 17:20:02 [9702] [INFO] Booting worker with pid: 9702
2011-09-17 17:20:02 [9702] [ERROR] Exception in worker process: