Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Shaun Hannah hooptie45

🎯
Focusing
Block or report user

Report or block hooptie45

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View console_helpers.rb
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
View gist:37f8a2f66e3862a6f1e5
$ 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",
View setup-misc.el
;; Enable paredit for a couple for non lisp modes; tweak
;; paredit-space-for-delimiter-predicates to avoid inserting spaces
;; before open parens.
(dolist (mode '(ruby espresso))
(add-hook (intern (format "%s-mode-hook" mode))
'(lambda ()
(add-to-list (make-local-variable 'paredit-space-for-delimiter-predicates)
(lambda (_ _) nil))
(enable-paredit-mode))))
View laurahipsteressay.txt
Lomo PBR yr, freegan VHS butcher you probably haven't heard of them thundercats cardigan terry richardson. Aesthetic craft beer marfa chambray Austin, biodiesel freegan wolf jean shorts single-origin coffee cred viral gentrify williamsburg. Sartorial VHS iphone, before they sold out gluten-free +1 farm-to-table raw denim. Etsy tofu craft beer, organic hoodie aesthetic lomo 8-bit photo booth viral you probably haven't heard of them chambray carles. Twee american apparel marfa terry richardson, wes anderson lomo messenger bag VHS. Messenger bag 8-bit twee, biodiesel etsy readymade trust fund mustache wayfarers organic artisan. Terry richardson etsy wes anderson, vinyl fanny pack pitchfork viral mcsweeney's.
+1 put a bird on it photo booth, mixtape vinyl letterpress scenester. Carles quinoa beard banh mi, squid locavore trust fund shoreditch before they sold out PBR salvia raw denim stumptown biodiesel photo booth. Wolf vegan Austin sartorial. Next level banh mi banksy terry richardson, seitan lo-fi mustache. T
View index.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="http://underscorejs.org/underscore.js"></script>
<script src="http://backbonejs.org/backbone.js"></script>
<script src="http://coffeescript.org/extras/coffee-script.js"></script>
View gist:2493539
class ActionDispatch::Routing::Mapper
def draw(routes_name)
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb")))
end
end
BCX::Application.routes.draw do
draw :api
draw :account
draw :session
@hooptie45
hooptie45 / rails31init.md
Created Oct 14, 2011 — forked from jraines/rails31init.md
Rails 3.1 with Rspec, Cucumber, Factory Girl, Haml, and Simple Form
View rails31init.md

Install Rails 3.1 RC

gem install rails --pre

generate new app, skipping Test::Unit file generation

rails new my_app -T

Set up Gemfile

View example_note_keeping_app.rb
require 'rubygems'
require 'sinatra'
require 'redis'
# To use, simply start your Redis server and boot this
# example app with:
# ruby example_note_keeping_app.rb
#
# Point your browser to http://localhost:4567 and enjoy!
#
@hooptie45
hooptie45 / LICENSE.txt
Created Jun 6, 2011 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
View LICENSE.txt
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
View mini-irb.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") }
You can’t perform that action at this time.