Skip to content

Instantly share code, notes, and snippets.

View brantfaircloth's full-sized avatar

Brant Faircloth brantfaircloth

View GitHub Profile
defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool NO
@brantfaircloth
brantfaircloth / rotate.R
Last active September 4, 2015 13:44
Rotate labels in ggplot (older versions)
q = qplot(chr_only$target_chromo, chr_only$count, geom="bar")
q + opts(axis.text.x=theme_text(angle=-45, hjust=0))
@brantfaircloth
brantfaircloth / gist:331137
Last active September 4, 2015 13:44
SQL Histograms
SELECT val, COUNT(val) AS frequency,
repeat('.',COUNT(val)) AS histogram
FROM data GROUP BY val ORDER BY val;
# Install MacPorts or make sure it's squared away with:
sudo port selfupdate
# Install libao
sudo port install libao
# Install faad2
@brantfaircloth
brantfaircloth / gist:331171
Created March 13, 2010 06:58
climm-nameser_compat.patch
--- src/io/io_dns.c 2009-05-17 16:06:46.000000000 -0700
+++ ../climm-0.7-patched/src/io/io_dns.c 2010-01-31 16:11:18.000000000 -0800
@@ -37,7 +37,7 @@
#include <netinet/in.h>
#endif
#if HAVE_ARPA_NAMESER_H
-#include <arpa/nameser.h>
+#include <arpa/nameser_compat.h>
#endif
#if HAVE_RESOLV_H
@brantfaircloth
brantfaircloth / gist:331172
Created March 13, 2010 06:59
climm-r2826.patch
--- configure.ac 2009-05-17 16:06:50.000000000 -0700
+++ ../climm-0.7-patched/configure.ac 2010-01-31 15:32:59.000000000 -0800
@@ -97,7 +97,10 @@
if test "x$ac_arg_use_ssl" != "xno"; then
ac_use_ssl=no
if test "x$ac_arg_use_ssl" != "xopenssl"; then
- AM_PATH_LIBGNUTLS(0.8.8, ac_use_ssl=gnutls)
+ PKG_CHECK_MODULES(LIBGNUTLS, gnutls > 2, ac_use_ssl=gnutls)
+ if test "x$ac_use_ssl" = xno; then
+ AM_PATH_LIBGNUTLS(0.8.8, ac_use_ssl=gnutls)
@brantfaircloth
brantfaircloth / py2app.bash
Created June 14, 2010 17:10
Steps to get a working py2app
## Roll your own python from source:
wget http://www.python.org/ftp/python/2.6.5/Python-2.6.5.tgz
tar -xzvf Python-2.6.5.tgz && cd Python-2.6.*
./configure --enable-framework=/Library/Frameworks --with-universal-archs=intel --enable-universalsdk=/
make
sudo make install
# Update the symlink for `python` (and check others)
--- matplotlib-0.99.3.orig/Makefile 2009-08-22 19:14:55.000000000 -0700
+++ matplotlib-0.99.3.update/Makefile 2010-06-14 09:42:37.000000000 -0700
@@ -29,7 +29,7 @@
_build_osx105:
- CFLAGS="-Os -arch i386 -arch ppc" LDFLAGS="-Os -arch i386 -arch ppc" python setup.py build
+ CFLAGS="-Os -arch x86_64 -arch i386" LDFLAGS="-Os -arch i386 -arch x86_64" python setup.py build
build_osx105:
################################################################################################
# see http://stackoverflow.com/questions/1477144/compile-matplotlib-for-python-on-snow-leopard #
################################################################################################
PREFIX=/usr/local
PYTHON=python
ZLIBVERSION=1.2.3
PNGVERSION=1.4.2
FREETYPEVERSION=2.3.12
@brantfaircloth
brantfaircloth / gist:607966
Created October 2, 2010 20:38
py2app hell, the first