This file contains hidden or 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 '[clj-btable.core :as btable]) | |
(def labels ["Login" "View_Cat_Food" "Purchase_Cat_Food"]) | |
(def rows [[5.0 3.0 1.0] [2.0 0.0 0.0] [0.0 0.0 0.0]]) | |
(btable/write "out.btable" labels rows) | |
; => #<File out.btable> | |
(btable/labels "out.btable") | |
; => ["Login" "View_Cat_Food" "Purchase_Cat_Food"] |
This file contains hidden or 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
import Control.Monad | |
import Data.Maybe | |
import Text.Printf | |
import qualified Data.DateTime as DT | |
data Interval = Interval { start :: DT.DateTime | |
, end :: DT.DateTime } | |
deriving (Show) | |
-- TODO: this shouldn't exist |
This file contains hidden or 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
#!/bin/sh | |
# Pre-push hook to prevent pushes to master branch. | |
pushed_branch=`git rev-parse --abbrev-ref HEAD` | |
if [[ "$pushed_branch" == "master" ]] | |
then | |
echo "[Notice] Pre-push hook preventing push to master. Create a feature branch instead." | |
exit 1 |
This file contains hidden or 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
Aug 23 00:46:04 app-3 kernel: [958008.758126] Killed process 3599 (ruby) total-vm:12240780kB, anon-rss:402668kB, file-rss:0kB | |
Aug 23 00:46:04 app-3 kernel: [958008.761313] in:imklog invoked oom-killer: gfp_mask=0x201da, order=0, oom_score_adj=0 | |
Aug 23 00:46:04 app-3 kernel: [958008.761316] in:imklog cpuset=/ mems_allowed=0 | |
Aug 23 00:46:04 app-3 kernel: [958008.761319] CPU: 0 PID: 418 Comm: in:imklog Tainted: GF 3.13.0-24-generic #46-Ubuntu | |
Aug 23 00:46:04 app-3 kernel: [958008.761320] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 | |
Aug 23 00:46:04 app-3 kernel: [958008.761321] 0000000000000000 ffff880079eb9980 ffffffff81715a64 ffff88007f90dfc0 | |
Aug 23 00:46:04 app-3 kernel: [958008.761325] ffff880079eb9a08 ffffffff8171039f ffffffff81067876 ffff880079eb99e0 | |
Aug 23 00:46:04 app-3 kernel: [958008.761327] ffffffff810c74dc 0000000000000000 ffff88007fffae28 0000000000000000 | |
Aug 23 00:46:04 app-3 kernel: [958008.761330] Call Trace: | |
Aug 23 00:46:04 app-3 kernel: [958008.761334] [<ffffffff81715a64>] du |
This file contains hidden or 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
# lib/cache_proxy.rb | |
class CacheProxy | |
class << self | |
attr_accessor :cache | |
end | |
def initialize(obj) | |
@obj = obj | |
end |
This file contains hidden or 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
// Functional Programming in C++ | |
http://www.altdevblogaday.com/2012/04/26/functional-programming-in-c/ |
This file contains hidden or 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 NoSuchElementException < StandardError; end | |
class Option | |
def initialize(val) | |
@val = val | |
end | |
def present? | |
!@val.nil? | |
end |
This file contains hidden or 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 Cassandra | |
alias :old_insert :insert | |
def insert(column_family, key, hash, options = {}) | |
puts "Injected! Send AMQP notification here..." | |
old_insert(column_family, key, hash, options) | |
end | |
end |
This file contains hidden or 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
module A | |
def do_something | |
puts 'A->do_something' | |
super | |
end | |
end | |
module B | |
def do_something | |
puts 'B->do_something' |
This file contains hidden or 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
tracerColors = [ | |
'#1B184F', | |
'#312c91', | |
'#423ac0', | |
'#9c4274' | |
] | |
class Tracer extends Kona.Entity |
NewerOlder