This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(t/defprotocol Applicative | |
(pure* [f-val val]) | |
(fapply* [f-fun f-vals])) | |
(t/ann-protocol [domain] | |
Applicative | |
pure* [(Applicative domain) domain -> (Applicative domain)] | |
fapply* (t/All [x ...] | |
[(Applicative [x ... x -> domain]) | |
(Applicative x) ... (Applicative x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Complete thor tasks script for bash | |
# Save it somewhere and then add | |
# complete -C path/to/script -o default thor | |
# to your ~/.bashrc | |
require 'fileutils' | |
THORFILES = ['thorfile', 'Thorfile', 'thorfile.rb', 'Thorfile.rb', '*.thor'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install java and make sure JAVA_HOME is properly set. | |
# Make sure those dependencies are present: | |
sudo apt-get install g++ uuid-dev libtool autoconf automake | |
cd ~ | |
# install zeromq | |
wget http://download.zeromq.org/zeromq-2.1.7.tar.gz | |
tar -xzf zeromq-2.1.7.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
nimbus.host: "192.168.1.106" | |
storm.zookeeper.servers: | |
- "192.168.1.106" | |
storm.local.dir: "/mnt/storm" | |
worker.childopts: "-Xmx128m" | |
supervisor.childopts: "-Xmx128m" | |
supervisor.slots.ports: | |
- 6700 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
at_exit do | |
ActiveRecord::Base.clear_all_connections! | |
java.lang.Thread.all_stack_traces.key_set.each do |t| | |
t.synchronized do | |
if t.name.include?("Abandoned connection cleanup thread") | |
t.class.shutdown | |
end | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TorqueBox = "Ruby" + "JBoss" | |
{"TL;DR" => "TorqueBox ROCKS! But..."} | |
JBoss = "JVM Application Server" | |
WHY = "WE NEED MOAR STUFF!" and we != "SysAdmins" | |
pros = [ | |
:clustering, | |
:background_jobs, # \o/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def game-results {:rock {:rock :tie, :paper :lose, :scissor :win} | |
:paper {:rock :win, :paper :tie, :scissor :lose} | |
:scissor {:rock :lose, :paper :win, :scissor :tie}}) | |
(defn create-game-command | |
[{:keys [aggregate-id player move]} state] | |
[{:event :game-created | |
:game-id aggregate-id | |
:creator player | |
:state-change {:state :started :creator player}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watch( '^(test.*)\.m$' ) { |md| | |
system("matlab -nodisplay -nodesktop -nojvm -r '#{md[1]}; quit'") | |
} | |
watch( '^(?!test)(.*)\.m$' ) { |md| | |
system("matlab -nodisplay -nodesktop -nojvm -r 'test#{md[1]}; quit'") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RVM 1.13.0 | |
Ruby 1.9.3-p194 | |
Rails 3.2.3 | |
Bundler 1.1.3 | |
Rake 0.9.2.2 | |
Gem 1.8.24 | |
Ubuntu 12.04 |
NewerOlder