Skip to content

Instantly share code, notes, and snippets.

View btoconnor's full-sized avatar

Brian O'Connor btoconnor

View GitHub Profile
@codingjoe
codingjoe / Procfile
Created January 19, 2021 17:29
Sentry Release on Heroku w/ commits, sourmaps & assets
release: bin/release
web: ...
worker: ...
@stonehippo
stonehippo / BLE-programming-Raspberry-Pi.md
Last active April 23, 2025 22:21
Bluetooth LE Programming On Raspberry Pi

Bluetooth LE Programming On Raspberry Pi

I'm looking at building up some Bluetooth LE programming expertise on Linux, specifically for use with Raspberry Pi 3 B+ and Pi Zero W models.

This is a compendium of libraries and tools that I'm looking at to build that skill on.

DON'T FORGET!!!

On the Raspberry Pi Zero W, a user must be a member of the bluetooth group to work with tools like bluetoothctl. Set this up with:

@simonw
simonw / how-to-upgrade-heroku-postgresql.md
Last active May 30, 2025 04:49
How to upgrade a Heroku PostgreSQL database to a new plan

How to upgrade a Heroku PostgreSQL database to a new plan

I started a project on a Hobby Dev plan (free, limit 10,000 rows), and then later needed to upgrade it to Hobby Basic ($9/month, limit 10,000,000 rows).

After assigning the new database, I had two databases attached to the application. They looked something like this:

  • HEROKU_POSTGRESQL_OLIVE (postgresql-dimensional-3321) Old, free-tier (Hobby Dev) database
@postmodern
postmodern / rip_dvd
Last active September 16, 2024 00:09
Script to automate ripping DVDs using Handbrake-CLI and mkvmerge
#!/usr/bin/env bash
#
# Author: postmodern
# Description:
# Rips a DVD to a H.264 MKV file, with chapters and tags. Ignores any
# bad blocks or sectors on the DVD.
# Dependencies:
# * gddrescue
# * handbrake-cli
# * mkvtoolnix
@shazow
shazow / Dockerfile
Created July 3, 2014 20:38
UWSGI Docker
# DOCKER-VERSION 0.6.1
# Borrowed from https://github.com/vvlad/dockerfiles-postgresql-9.3
#
# First run:
# $ docker build -t uwsgi -rm=true .
# $ ID=$(docker run -v "path/to/src:/app/src" -v "path/to/socks:/app/socks" -d uwsgi)
# $ docker wait $ID
# $ docker logs $ID
FROM ubuntu:12.04
@shazow
shazow / Dockerfile
Created July 3, 2014 20:30
PostgreSQL Dockerfile
# DOCKER-VERSION 0.6.1
# Borrowed from https://github.com/vvlad/dockerfiles-postgresql-9.3
#
# First run:
# $ docker build -t postgresql -rm=true .
# $ ID=$(docker run -e "CREATE_DB=foo" -v "path/to/socks:/var/run/postgresql" -d postgresql)
# $ docker wait $ID
# $ docker logs $ID
FROM ubuntu:12.04
@jgeurts
jgeurts / statsd-graphite-install.sh
Last active January 28, 2017 20:23
Install statsd and graphite as a services on Ubuntu 13.10
sudo apt-get install --assume-yes python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install --assume-yes nodejs
sudo apt-get install --assume-yes git
# Install Graphite
sudo apt-get install python-dev ruby-dev bundler build-essential libpcre3-dev graphite-carbon graphite-web
cat >> /tmp/graphite-carbon << EOF
# Change to true, to enable carbon-cache on boot
@shazow
shazow / account.py
Last active December 14, 2015 17:58
My Pyramid class-based view base class.
# A sample view from my upcoming meta-framework.
# You probably won't have things like `request.features` or `api` or `expose_api` etc. Coming soon.
@expose_api('account.create')
def account_create(request):
if request.features.get('invite_required'):
raise APIControllerError("Method not permitted: %s" % account_create.exposed_name)
email, password, password_confirm = get_many(request.params, required=['email'], optional=['password', 'password_confirm'])
@shazow
shazow / v1
Last active June 6, 2017 06:57
post-receive hook to push-deploy with git
#!/bin/bash
# post-receive hook to push-deploy multiple branches using a git repo.
#
# Deploy by pushing $DEPLOY_BRANCH
# Rollback by force-pushing a new reference to $OVERRIDE_TAG
#
# 1. Setup your git repo:
#
# git init --bare
#