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
(@color -> case-eq-default 5 [ 'Green' : 10 ]) | |
initial crumbs [["/"]] | |
locking / | |
-> <@color> = !12[@color] | |
-> <@color> = %a2 | |
-> <@color -> case-eq-default 5 [ 'Green' : 10 ]> = %b3 | |
-> <5> = %b3 | |
-> <5> = (numeric) | |
-> <[ 'Green' : 10 ]> = (list (pair %a2 %b3)) | |
-> <[ 'Green' : 10 ]> = (list %el4) |
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
(ns datomizer.datoms | |
"Datom wrangling." | |
(:require [datomic.api :as d] | |
[datomizer.utility.debug :refer [dbg]])) |
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
(ns datomizer.datomize.encode | |
"Encode entities by datomizing their data-structures." | |
(:require [datomic.api :as d :refer [q]] | |
[datomizer.datoms :refer :all] | |
[datomizer.utility.byte-array :refer [byte-array-class]] | |
[datomizer.utility.debug :refer :all] | |
[datomizer.utility.misc :refer [ref-type]])) |
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
(declare the-map) | |
(defn the-function | |
[whatever] | |
(whatever the-map)) | |
(def the-map {:foo the-function}) |
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
require 'ruby-prof' | |
result = RubyProf.profile do | |
# do something | |
end | |
printer = RubyProf::MultiPrinter.new(result) | |
printer.print(path: ".", profile: "profile") |
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
if curl -s http://169.254.169.254; then # looks like we're running on Amazon. | |
# Install Java | |
apt-get install -y openjdk-7-jre-headless | |
# Install EC2 command-line tools | |
wget https://s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip | |
unzip ec2-api-tools.zip -d /usr/local/ec2 | |
# Set up EC2 environment variables |
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
(alter-var-root #'*out* (constantly *out*)) | |
(alter-var-root #'*err* (constantly *err*)) |
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
defaults write com.apple.Dock autohide-delay -float 10.0 && killall Dock |
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
require "net/http" | |
# Example Usage: | |
# | |
# use Rack::Proxy do |req| | |
# if req.path =~ %r{^/remote/service.php$} | |
# URI.parse("http://remote-service-provider.com/service-end-point.php?#{req.query}") | |
# 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
class ThingsController < ApplicationController | |
# GET /things | |
def index | |
@things = Thing.all | |
end | |
# GET /things/1 | |
def show | |
@thing = Thing.find(params[:id]) | |
end |
OlderNewer