Skip to content

Instantly share code, notes, and snippets.

View hooptie45's full-sized avatar
:shipit:
Focusing

Shaun Hannah hooptie45

:shipit:
Focusing
  • Bloomberg
  • Washington, DC
View GitHub Profile
def rows(hash, counts, stack, depth)
r = Array(hash[:rows])
counts[stack[depth]] = r.length
counts[stack[depth + 1]] = r.reduce(0) {|m,r| m += rows(r, counts, stack, depth + 1) }
Array(r).length
end
dffajfdfajdskfadjkjasdkfjadl
@hooptie45
hooptie45 / README.md
Created June 28, 2014 06:32
bgov transactions_search (3)

README is empty

$ bin/shell
Datomic Java Shell
Type Shell.help(); for help.
datomic % uri = "datomic:dev://localhost:4334/heh";
<datomic:dev://localhost:4334/heh>
datomic % Peer.createDatabase(uri);
<true>
datomic % conn = Peer.connect(uri);
<{:db-id "heh-5193abce-9c7a-459f-9ace-7e8d666f1776", :unsent-updates-queue 0, :pending-txes 0, :next-t 1000, :basis-t 62, :index-rev 0, :index-root {:rev 0, :key "5193abed-2868-4e58-9138-c17710ed331c"}, :log-root {:rev 0, :key "5193abed-2160-48d3-81b3-3c3635a67df5"}}>
datomic % datom = Util.list("db/add",
require 'rblineprof'
module Rblineprof
module ConsoleHelpers
include Rblineprof::Helpers
def lineprof_block(options = {}, &block)
profile = lineprof(rblineprof_profiler_regex(options[:lineprofiler])) do
ret = yield
end
require 'thor'
require 'active_support/inflector'
require 'thor/group'
module Update
module My
class Tasks < Thor
include Thor::Actions
desc "task", "Generate Base App"
def task
thor :update, "make.thor", "http://gist.github.com/623258"
load 'config/deploy/settings.rb'
load 'config/deploy/symlinks.rb'
load 'config/deploy/passenger.rb'
load 'config/deploy/callbacks.rb'
load 'config/deploy/maintenance.rb'
load 'config/deploy/git.rb'
%w{readline rubygems bond}.each {|e| require e }
Bond.start
history_file = File.join(ENV["HOME"], '.mini_irb_history')
IO.readlines(history_file).each {|e| Readline::HISTORY << e.chomp } if File.exists?(history_file)
while (input = Readline.readline('>> ', true)) != 'exit'
begin puts "=> #{eval(input).inspect}"; rescue Exception; puts "Error: #{$!}" end
end
File.open(history_file, 'w') {|f| f.write Readline::HISTORY.to_a.join("\n") }
@hooptie45
hooptie45 / LICENSE.txt
Created June 6, 2011 07:01 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE