Skip to content

Instantly share code, notes, and snippets.

View epicserve's full-sized avatar

Brent O'Connor epicserve

View GitHub Profile

Git Notes

Good Basic Global Git Config Settings

[color]
    diff = auto
    status = auto
    branch = auto
[user]

name = Your Name

@epicserve
epicserve / postgres-notes.mdown
Created October 9, 2010 22:04
Postgres Notes

Postgres Notes

Controlling Postgres

Start Postgres

$ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start

Stop Postgres

@timtrueman
timtrueman / django_cached_count_proxy.py
Created November 18, 2010 00:15
Django cached .count() proxy for querysets that is generic and works with pagination in object_list (which clones and overrides any monkeypatched count method so you have to override the clone method first).
class CachedCountCloneProxy(object):
''' This allows us to monkey-patch count() on QuerySets so we can cache it and speed things up.
._clone is called so we have to monkey-patch that first...
'''
def __init__(self, queryset):
self._queryset = queryset
self._queryset._clone_original = self._queryset._clone
def __call__(self):
@kennethreitz
kennethreitz / 0_urllib2.py
Created May 16, 2011 00:17
urllib2 vs requests
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
gh_url = 'https://api.github.com'
req = urllib2.Request(gh_url)
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
@epicserve
epicserve / sublime_text_2_notes.md
Created July 27, 2011 15:40
Notes on My Sublime Text 2 Setup

User File Settings

{
    "draw_indent_guides": false,
    "fold_buttons": true,
    "font_face": "Meslo LG S",
    "font_size": 13,
    "highlight_line": true,
    "ignored_packages": [],

"open_files_in_new_window": false,

"""
Author: Jeff Triplett
Based off: https://code.djangoproject.com/wiki/PaginatorTag
Thanks to Brent O'Connor for pointing it out.
"""
from django import template
register = template.Library()
@epicserve
epicserve / ubuntu-server-django-guide.rst
Last active June 9, 2023 00:38
Ubuntu Server Setup Guide for Django Websites
@epicserve
epicserve / checkpid_test.py
Created February 23, 2012 09:00
Pidcheck is a python decorator to check and see if a process with the same PID is still running.
#!/usr/bin/env python
from checkpid import pidcheck
from time import sleep
import logging
log = logging.getLogger("checkpid")
log.setLevel(logging.INFO)
log.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
@jefftriplett
jefftriplett / output.txt
Last active October 9, 2015 18:18
uses pip + pypi to see what is upgradeable
$ ./pip.sh outdated
Fabric (1.4.3 != 1.5.1)
gunicorn (0.17.0 != 0.17.2)
$ ./pip.sh install -U gunicorn
Downloading/unpacking gunicorn==0.17.2
Using download cache from /Users/jefftriplett/.pip/download_cache/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fg%2Fgunicorn%2Fgunicorn-0.17.2.tar.gz
Running setup.py egg_info for package gunicorn
Installing collected packages: gunicorn

A Simple Plan of Salvation

Question Scripture
What is sin? [1 John 3:4][1]
Can one sin by doing nothing? [James 4:17][2]
From where does sin come? [Mark 7:20-23][3]
What is the result of sin? [Romans 8:5-8][4]
What has been done about sin? [Romans 5:6-11][5]