Skip to content

Instantly share code, notes, and snippets.

View rybesh's full-sized avatar

Ryan Shaw rybesh

View GitHub Profile
@rybesh
rybesh / batch convert and resize JSTOR page images
Created May 26, 2009 15:24
batch convert and resize JSTOR page images
(for f in $(find . -name "*.tif"); do if [ ! -f "${f/%tif/gif}" ]; then convert "$f" -resize 800 "${f/%tif/gif}"; fi; done && echo "Finished converting `pwd`" | mail -s "Finished `pwd`" ryanshaw@ischool.berkeley.edu) &
@rybesh
rybesh / batch convert and resize Internet Archive page images
Created May 27, 2009 03:07
batch convert and resize Internet Archive page images
(for f in $(find . -name "*.jp2"); do convert "$f" -resize 800 -colorspace Gray "${f/%jp2/jpg}"; done && echo "Finished converting `pwd`" | mail -s "Finished `pwd`" ryanshaw@ischool.berkeley.edu) &
@rybesh
rybesh / ipy_user_conf.py
Created November 17, 2009 17:54 — forked from jacobian/ipy_user_conf.py
IPython user config
import os
import sys
import StringIO
import ipy_defaults
import ipy_stock_completers
import IPython.ipapi
ip = IPython.ipapi.get()
o = ip.options
@rybesh
rybesh / mailpage
Created November 19, 2009 15:39
download and mail a web page
#!/usr/bin/perl -w
use strict;
use WWW::Mechanize;
use MIME::Lite;
my $from = shift;
my $to = shift;
my $url = shift;
my $title = shift;
ffmpeg -vn -acodec copy -i file.mp4 file.mov
./manage.py migrate appname --fake zero
rm -r appname/migrations/
./manage.py startmigration --initial appname
./manage.py migrate
@rybesh
rybesh / FLAC to MP3
Last active September 23, 2015 23:07
Convert FLAC to 320 MP3
find . -iname *.flac -exec sh -c "flac -sdc \"{}\" | lame --preset insane - \"{}.mp3\" " \;
@rybesh
rybesh / gist:1147045
Created August 15, 2011 15:51
brew install -v couchdb
/usr/local/Library/Homebrew/install.rb:38:in `dump': no marshal_dump is defined for class StringIO (TypeError)
from /usr/local/Library/Homebrew/install.rb:38
from /usr/local/Library/Formula/couchdb.rb:41
==> Downloading http://www.apache.org/dyn/closer.cgi?path=couchdb/1.1.0/apache-couchdb-1.1.0.tar.gz
Error: undefined class/module OpenURI::
Please report this bug: https://github.com/mxcl/homebrew/wiki/Checklist-before-filing-a-new-issue
/usr/local/Library/Homebrew/formula_installer.rb:92:in `load'
/usr/local/Library/Homebrew/formula_installer.rb:92:in `install_formula'
/usr/local/Library/Homebrew/utils.rb:207:in `ignore_interrupts'
/usr/local/Library/Homebrew/formula_installer.rb:88:in `install_formula'
@rybesh
rybesh / gist:1147046
Created August 15, 2011 15:52
brew doctor
Some "config" scripts were found in your path, but not in system or Homebrew folders.
`./configure` scripts often look for *-config scripts to determine if software packages
are installed, and what additional flags to use when compiling and linking.
Having additional scripts in your path can confuse software installed via Homebrew if
the config script overrides a system or Homebrew provided script of the same name.
/usr/X11R6/bin
freetype-config libpng-config libpng15-config
@rybesh
rybesh / gist:1147077
Created August 15, 2011 16:11
brew config
HOMEBREW_VERSION: 0.8
HEAD: e8554bf51c02532bb16332acb1eb78346c24a3f3
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: 8-core 64-bit sandybridge
OS X: 10.7
Kernel Architecture: x86_64
Ruby: 1.8.7-249