Skip to content

Instantly share code, notes, and snippets.

View hubrix's full-sized avatar

Mark Friedgan hubrix

  • Hubrix Ventures
  • Chicago, IL
View GitHub Profile
@hubrix
hubrix / ipython_notebook_in_git.md
Created August 17, 2018 18:55 — forked from pbugnion/ ipython_notebook_in_git.md
Keeping IPython notebooks under Git version control

This gist lets you keep IPython notebooks in git repositories. It tells git to ignore prompt numbers and program outputs when checking that a file has changed.

To use the script, follow the instructions given in the script's docstring.

For further details, read this blogpost.

The procedure outlined here is inspired by this answer on Stack Overflow.

@hubrix
hubrix / gnucashsqlite2ledger.rb
Created August 4, 2016 06:15 — forked from TomK32/gnucashsqlite2ledger.rb
Convert from GnuCash Sqlite format to ledger/hledger format
#!/bin/env ruby
# (C) 2015 Thomas R. Koll, <info@ananasblau.com>
# Licensed under WTFPL
# In GnuCash save your file as sqlite3 and pass the filename as argument to this script
# The script only requires active_record to be installed
require 'active_record'
ActiveRecord::Base.establish_connection(
@hubrix
hubrix / gist:e07df086fe24372e7272
Created August 15, 2014 03:30
PSQL OSX 32-bit for Excel
CFLAGS=-m32
CPPFLAGS=-m32
postgresql-9.3.5$ ./configure --prefix=/usr/local --with-openssl --with-libxml --with-libxslt
unixODBC-2.3.2$ ./configure
psqlodbc-09.03.0300$ ./configure --with-unixodbc=/usr/local/bin/odbc_config --with-libpq
task :workers => :environment do
module Delayed
class Worker
def name_with_thread_id(*a, &b)
name_without_thread_id(*a, &b) + " thread:#{Thread.current.object_id}"
end
alias_method_chain :name, :thread_id
end
end
Rails.logger.info "Running threaded worker env."