Skip to content

Instantly share code, notes, and snippets.

Sean Fulmer defulmere

  • Opalstack
Block or report user

Report or block defulmere

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@defulmere
defulmere / gist:8b9695e415a44271061cc8e272f3c300
Last active Feb 24, 2020
How to override an old sqlite3 module with pysqlite3 in django settings.py
View gist:8b9695e415a44271061cc8e272f3c300
# first: pip install pysqlite3-binary
# then in settings.py:
# these three lines swap the stdlib sqlite3 lib with the pysqlite3 package
__import__('pysqlite3')
import sys
sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')
DATABASES = {
'default': {
View keybase.md

Keybase proof

I hereby claim:

  • I am defulmere on github.
  • I am defulmere (https://keybase.io/defulmere) on keybase.
  • I have a public key ASBZZcxbuMCre_b7oVVQdOToz5KHlPd_bdHCFK-QKHRa_Ao

To claim this, I am signing this object:

@defulmere
defulmere / gist:2180969
Created Mar 24, 2012
default ACLs on a new account home directory
View gist:2180969
# file: .
# owner: newusername
# group: newusername
user::rwx
user:nginx:r-x
user:apache:r-x
group::--x
mask::r-x
other::---
@defulmere
defulmere / wf_php53_pear.txt
Created Dec 3, 2011
Set up pear for PHP 5.3 on WebFaction and install Mail and Mail_mime
View wf_php53_pear.txt
cd ~
pear53 config-create $HOME $HOME/.pearrc
pear53 install -o PEAR
export PATH=$HOME/pear:$PATH
pear install --alldeps Mail
pear install --alldeps Mail_mime
@defulmere
defulmere / lfs_webaction.txt
Created Nov 29, 2011
Commands to configure LFS on WebFaction mod_wsgi/Django
View lfs_webaction.txt
cd ~/webapps/app_name/
./apache2/bin/stop
rm -rf lib/python2.7/{D,d}jango* myproject*
PYTHONPATH=$PWD/lib/python2.7 easy_install-2.7 -s $PWD/bin -d $PWD/lib/python2.7 zc.buildout
wget http://pypi.python.org/packages/source/d/django-lfs/django-lfs-installer-0.6.0b5.tar.gz
tar zxf django-lfs-installer-0.6.0b5.tar.gz
cd lfs-installer/
python2.7 bootstrap.py
./bin/buildout -v # this will take a while to run and produce a lot of output, so be patient
sed -i "s/'ENGINE': 'django.db.backends.'/'ENGINE': 'django.db.backends.postgresql_psycopg2'/g" lfs_project/settings.py
@defulmere
defulmere / mailbox2script.py
Last active Feb 22, 2020
replacement for WebFaction's built-in mail2script
View mailbox2script.py
#!/bin/env python
"""
mailbox2script.py
This is a replacement for WebFaction's built-in mail2script (which cannot
parse large messages > 5MB).
To use it:
You can’t perform that action at this time.