Skip to content

Instantly share code, notes, and snippets.

@davidmiller
davidmiller / filming_tips_notes.md
Created December 10, 2020 09:00
Filming Notes & Tips: Virtual Band

Tech

The camera in your phone is almost certainly pretty decent - use that. (Don't use a laptop, resolution is unlikely to be high enough)

Set it to the highest resolution and frame rate available. On many phones, the default will shoot in not-quite real-time and result in video that drifts ahead of the song audio.

Shooting

Keybase proof

I hereby claim:

  • I am davidmiller on github.
  • I am davidmiller (https://keybase.io/davidmiller) on keybase.
  • I have a public key whose fingerprint is 5234 F37A 2F0D C8A8 2588 41B5 7BDF 7852 1C7E A5A1

To claim this, I am signing this object:

@davidmiller
davidmiller / notes.md
Last active August 29, 2015 14:08
CKAN notes

Adding a superuser

ubuntu@ip-172-31-25-110:~$ . /usr/lib/ckan/default/bin/activate
(default)ubuntu@ip-172-31-25-110:~$ cd /usr/lib/ckan/default/src/ckan/
(default)ubuntu@ip-172-31-25-110:/usr/lib/ckan/default/src/ckan$ paster sysadmin add david -c /etc/ckan/default/production.ini 
Added david as sysadmin

Undeleting an org

@davidmiller
davidmiller / urls.py
Last active August 29, 2015 14:05
ADFS
from django.conf.urls.defaults import patterns, include, url
from PyADFSLogin.views import hello, secret, do_login, SAML_handler
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'PyADFSLogin.views.home', name='home'),
@davidmiller
davidmiller / guess.gender.R
Created December 17, 2013 11:28
Guestimate gender of artist for chart hits/songs
library(stringr)
library (vcd)
girls <- data.frame(read.table("http://www.census.gov/genealogy/www/data/1990surnames/dist.female.first"))
boys <- data.frame(read.table("http://www.census.gov/genealogy/www/data/1990surnames/dist.male.first"))
artists <- readLines("/home/david/src/scratch/gender/AdditionalFiles/unique_artists.txt")
artists <- gsub("<SEP>", ",", artists)
artists <- read.csv(textConnection(artists))
artists <- data.frame(artists)
@davidmiller
davidmiller / thrift_boiler.py
Created March 19, 2012 21:53
Thrift Boilerplate Client code
from thrift.transport import TTransport
from thrift.transport import TSocket
from thrift.protocol import TBinaryProtocol
import Service
try:
socket = TSocket.TSocket("localhost", 45678)
transport = TTransport.TFramedTransport(socket)
protocol = TBinaryProtocol.TBinaryProtocol(transport)
@davidmiller
davidmiller / chat.py
Created March 14, 2012 22:10
PYDOJO WEB
import collections
import datetime
import json
import time
from bottle import route, run, request, response, redirect
Message = collections.namedtuple('Message',
'ts name msg')
CONVERSATION = []
@davidmiller
davidmiller / core.clj
Created February 29, 2012 09:23
Feburary LDN Clojure Dojo - a Boggle Solver
(ns boggle.core
(:require [clojure.java.io :as io]))
(def letters "qwertyuiopasdfghjklzxcvbnm")
(def height 8)
(def width 8)
(defn random-letter []
(rand-nth letters))
@davidmiller
davidmiller / catorls.sh
Created June 7, 2011 08:42
A Quieter cat
# A frequent source of complaint from cat
# is that I've just asked it to cat a directory.
# If I have, just DWIM and do it happily.
function catorls () {
if [ -d $1 ];
then
ls -l $1
else
cat $1
fi