Skip to content

Instantly share code, notes, and snippets.

@bobisme
bobisme / how-i-start.md
Last active February 20, 2016 04:51
New git project using dropbox.

Make a new "bare" repo in dropbox

mkdir ~/Dropbox/git/new-project.git
git init --bare ~/Dropbox/git/new-project.git
cd ~/src
git clone ~/Dropbox/git/new-project.git

This creates the directory ~/src/new-project with dropbox as the "origin" remote.

cd new-project

@bobisme
bobisme / ripmaplist.js
Created February 3, 2015 17:35
1-line rip google map list to csv (jQuery)
$('.list-content').map(function(){return $(this.children).map(function(){return $(this).text()}).toArray().join('|')}).toArray().join('\n')
@bobisme
bobisme / install-qstk
Created September 29, 2014 03:23
Install QSTK in a virtual environment (with IPython).
mkvirtualenv qstk
pip install numpy scipy matplotlib
pip install pandas scikits.statsmodels scikit-learn
pip install QSTK
pip install "ipython[notebook]"
ipython notebook --pylab inline
@bobisme
bobisme / install-openerp-linux.mkd
Created May 15, 2014 07:22
Installing OpenERP in Linux virtualenv (Ubuntu 14.04)

Installing OpenERP on Ubuntu 14.04

Many steps taken from [code.zoia.org][].

Install dependencies

apt-get

@bobisme
bobisme / gist:97af586808674e36bfe6
Created May 13, 2014 12:43
Installing pyzmq on Mac OS X 10.9
brew install libzmq
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
pip install pyzmq --install-option="--zmq=/usr/local/Cellar/zeromq/4.0.4"
@bobisme
bobisme / gist:5261956
Last active December 15, 2015 12:39
Upgrade end-of-lifed Ubuntu installation.

Upgrade end-of-lifed Ubuntu installation.

So, apt-get fails you. What do?

Step 1: Grind through old isos.

Old versions of ubuntu are found here.

@bobisme
bobisme / wakesleep
Created March 28, 2013 09:21
Mac has been acting stupidly since I upgraded to 10.8. My VM has been crashing when it sleeps and I've been told that skype is always switching between "online" and "offline". So... Do this instead of just sleeping.
#!/bin/sh
VM="Ubuntu Server"
function wakefunc {
VBoxManage startvm $VM
osascript -e 'tell application "Skype" to send command "SET USERSTATUS ONLINE" script name "wakescript"'
}
function sleepfunc {
@bobisme
bobisme / bxxcamsync.js
Created April 12, 2012 23:25
BXX Camera Sync Enhancement (http://bxxweb.com)
// I saw the site from a link on Reddit.
// I wished I could easily sync the cameras.
// 3 hours later I had a script to do it.
// Just copy and paste it into your console. (I'm too lazy to make an extension).
//
// Features:
// - Control all cameras simultaneously by using the controls of any camera view.
// (except for volume and crap like that).
// - Have cams playing? Launch another and it should sync up automatically.
//
@bobisme
bobisme / perf.js
Created February 22, 2012 18:37
More julia perf.js benchmark tweaking.
var mt = require('microtime');
// TO BEAT:
// fib 0.168085
// parse_int 0.417948
// mandel 2.943993
// quicksort 0.912189
// pi_sum 47.051191
// rand_mat_stat 14.281034
// rand_mat_mul 192.106009
// printfd 33.056021
@bobisme
bobisme / perf.js
Created February 20, 2012 20:07
Javascript Matrix Multiplication
// ORIGINAL random matrix multiply //
// originally from:
// https://github.com/JuliaLang/julia/blob/master/test/perf/perf.js //
function assert(t) { if (!t) throw new Error("assertion failed"); }
function runTest(func, arg, str) {
var tmin = Number.POSITIVE_INFINITY;
var t = (new Date).getTime();
var C = func(arg);