Skip to content

Instantly share code, notes, and snippets.

View kencochrane's full-sized avatar

Ken Cochrane kencochrane

View GitHub Profile
@kencochrane
kencochrane / Dockerfile.docs
Created April 1, 2017 19:46
building the moviepy docs with Docker
FROM python:3
ENV LC_ALL C.UTF-8
ADD . /code/
WORKDIR /code
RUN python setup.py install
@kencochrane
kencochrane / celery_worker_logs.log
Created December 24, 2014 13:49
Celery Worker Redis Disconnect issue, debug logs
celery debug:
# celery report
software -> celery:3.1.17 (Cipater) kombu:3.0.24 py:2.7.3
billiard:3.3.0.19 py-amqp:1.4.6
platform -> system:Linux arch:64bit, ELF imp:CPython
loader -> celery.loaders.default.Loader
settings -> transport:amqp results:disabled
Verifying that +kencochrane is my openname (Bitcoin username). https://onename.io/kencochrane

Keybase proof

I hereby claim:

  • I am kencochrane on github.
  • I am kencochrane (https://keybase.io/kencochrane) on keybase.
  • I have a public key whose fingerprint is 9CF4 C417 A398 CECB 10A0 0E76 A635 9D63 1EC0 A7F4

To claim this, I am signing this object:

sudo add-apt-repository ppa:pitti/postgresql
sudo apt-get update
sudo apt-get install postgresql-9.2 postgresql-server-dev-9.2 postgresql-contrib-9.2
sudo su -l postgres
psql -d template1 -p 5433
CREATE EXTENSION IF NOT EXISTS hstore;
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
service postgresql stop
/usr/lib/postgresql/9.2/bin/pg_upgrade -b /usr/lib/postgresql/9.1/bin -B /usr/lib/postgresql/9.2/bin -d /var/lib/postgresql/9.1/main/ -D /var/lib/postgresql/9.2/main/ -O "-c config_file=/etc/postgresql/9.2/main/postgresql.conf" -o "-c config_file=/etc/postgresql/9.1/main/postgresql.conf"
@kencochrane
kencochrane / sentry.conf.py
Created June 11, 2013 15:59
Docker's Sentry Config
import os.path
CONF_ROOT = os.path.dirname(__file__)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'sentry', # Or path to database file if using sqlite3.
'USER': 'sentry', # Not used with sqlite3.
'PASSWORD': 'sentry', # Not used with sqlite3.
@kencochrane
kencochrane / helloworld.go
Created January 28, 2013 20:48
Hello World written in Go/
package main
import "fmt"
func main() {
fmt.Println("Hello, World")
}
@kencochrane
kencochrane / dotcloud.yml
Created September 24, 2012 16:32
Example dotcloud.yml for Node.js service
www:
type: nodejs
approot: hellonode
config:
node_version: v0.6.x
@kencochrane
kencochrane / dotcloud.yml
Created September 24, 2012 16:31
Example dotcloud.yml for Python service with NewRelic
www:
type: python
environment:
NEW_RELIC_LICENSE_KEY: zbc1234sjnfnsdnFAKE0KEYk3232kjnknfksdnfkw23
NEW_RELIC_APP_NAME: dotCloud Python App
NEW_RELIC_LOG: /var/log/supervisor/newrelic.log
NEW_RELIC_LOG_LEVEL: info
NEW_RELIC_CONFIG_FILE: /home/dotcloud/current/newrelic.ini
config:
enable_newrelic: true
@kencochrane
kencochrane / dotcloud.yml
Created September 24, 2012 16:29
Example dotcloud.yml for Python service
www:
type: python
config:
python_version: v2.7