Skip to content

Instantly share code, notes, and snippets.

@brosner
brosner / setup.md
Last active April 26, 2020 11:32
My development environment setup

Prepare by switching out of bash from Homebrew:

chsh -s /bin/zsh

To clean my system and reinstall Homebrew:

rm -rf ~/.local && mkdir ~/.local
rm -rf ~/Library/Caches/pip
rm -rf ~/.pyenv

rm -rf ~/.yarn

======================================================
Setting up Django using Apache/mod_wsgi on Ubuntu 8.10
======================================================
This article will cover setting up Django using Apache/mod_wsgi on Ubuntu
8.10. The article is targeted at a production environment, but keep in mind
this is a more generalized environment. You may have different requirements,
but this article should at least provide the stepping stones.
The article will use distribution packages where nesscary. As of 8.10 the
@brosner
brosner / gist:dbc092e3024f6a80149b
Last active October 18, 2017 11:00
trusty ACI image build without actool
# create ACI with trusty without actool due to bug https://github.com/coreos/rocket/issues/198
mkdir sleeper ; cd sleeper
debootstrap --verbose --variant=minbase --include=iproute,iputils-ping --arch=amd64 trusty rootfs
cat > app <<EOF
{
"acVersion": "1.0.0",
"acKind": "AppManifest",
"name": "sleeper",
"version": "1.0.0",
"os": "linux",
@brosner
brosner / check.py
Last active July 21, 2016 19:49
Pinax distribution release check
import functools
import sys
import github3
import semver
distro_repos = set([
"django-user-accounts",
"pinax-announcements",
from itertools import chain
empty = object()
def lookup_merge_strategy(tv, path):
pass
@brosner
brosner / gist:3539266
Created August 30, 2012 19:54
Linkin Park

Going to the Honda Civic Tour tonight with my girlfriend to see my most favorite band live! This will be my first time seeing them live. In honor of this night, here's a list of my top Linkin Park albums:

  • A Thousand Suns
  • Meteora
  • Hybrid Theory
  • Reanimation
  • Minutes to Midnight
  • Living Things
@brosner
brosner / gist:2899595
Created June 9, 2012 05:15
S3 eventlet backend for django-ajax-uploader
"""
This file provides an eventlet based S3 uploader for django-ajax-uploader. It
supports chunk retry and chunk parallelism for efficient uploads.
This backend will only work with the forked django-ajax-uploader from my
multipart-post branch which adds some efficiencies to file upload.
django-ajax-uploader: https://github.com/brosner/django-ajax-uploader/tree/multipart-post
Author: Brian Rosner <brosner@gmail.com>
@brosner
brosner / base.py
Created April 28, 2012 18:17
Gondor settings with os.environ and local_settings = off
# based on a modified Django 1.4 project settings (you will most likely need
# to heavily customize this for your project).
# Assumed to be in <repo root>/myproject/conf/base.py
import os
PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
PACKAGE_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
# original: https://github.com/simonw/mytweets
# modified by Brian Rosner
# This script does not fetch all tweets. It is limited by what Twitter's API
# returns. Somewhere around 3200 tweets.
#
# Tweak the API keys around line 40 for your Twitter app
import json
import httplib
@brosner
brosner / gist:1107302
Created July 26, 2011 17:35
OS X Setup

My OS X Setup

I recently bought a Macbook Air 1.8 GHz i7 with OS X 10.7. I decided to document the exact apps I've installed for my personal use and for others to see what I use.

This list is never complete. It will continue to evolve as I installed stuff for myself and find stuff over time. Recommendations welcome :-)

MAS