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
.resolved.marker > .icon { | |
opacity: 1 !important; | |
color: #333; | |
font-size: 1.5em; | |
} |
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
data = [ | |
// ["name","age","state"], | |
["Sam","20","VA"], | |
["Joe","20","VA"], | |
["Sally","18","MD"], | |
["Sam","24","FL"], | |
["Jake","12","CO"], | |
["Sue","49","MA"], | |
["Larry","55","CO"], | |
["Bob","99","WA"], |
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
# Greetings SQL Guru! | |
# | |
# The task is to write code that mimics the computation of a few SQL queries. | |
# Don't worry, you don't have to write a parser! Just read in a comma delimited | |
# flat file 'input.txt' and output the results of the following queries: | |
# | |
# select state,count(*) from table group by state order by count(*) desc | |
# select round(avg(age),1) from table | |
# select state,round(avg(age),0) from table group by state order by avg(age) | |
# select state,round(avg(age),0) from table where age > 15 AND age < 55 group by state order by state |
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
# Welcome to FizzBuzz! | |
# | |
# The task is to print out the numbers 1 through 100. The exception being the following: | |
# | |
# - If the number is divisible by 3, print Fizz | |
# - If the number is divisible by 5, print Buzz | |
# - If the number is divisible by 3 and 5, print FizzBuzz | |
# | |
# You can write the solution in any language provided that any compilation or setup is | |
# done in the 'build' script and the command to run the solution is named 'fizzbuzz'. |
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
# Example usage: | |
# storm-logs nimbus supervisor drpc | |
# storm-logs workers | |
function storm-logs() { | |
cmd="multitail" | |
for log in $@; do | |
case $log in | |
workers) | |
cmd="$cmd -ts -i /var/log/storm/worker-670*.log" | |
;; |
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 | |
require 'irb' | |
foo = 'bar' | |
IRB.setup(nil) | |
irb = IRB::Irb.new(nil) | |
IRB.conf[:MAIN_CONTEXT] = irb.context | |
irb.context.workspace = IRB::WorkSpace.new(binding) |
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
> pwd | |
/Users/dharmel/Library/LaunchAgents | |
> more kafka.plist | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> |
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
--type-add=ruby=.haml,.rake,.rsel,.builder | |
--type-add=html=.html.erb,.html.haml | |
--type-add=js=.js.erb,.coffee | |
--type-add=css=.sass,.scss | |
--type-set=cucumber=.feature | |
--ignore-dir=vendor | |
--ignore-dir=log | |
--ignore-dir=tmp | |
--ignore-dir=doc | |
--ignore-dir=coverage |
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
> time ./script/runner 'puts "So fast"' | |
So fast | |
real 0m0.984s | |
user 0m0.815s | |
sys 0m0.141s |
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 'rubygems' | |
require 'em-synchrony' | |
require 'em-synchrony/fiber_iterator' | |
EM.synchrony do | |
values = (1..16).to_a | |
{a: 2, b: 4, c: 8}.each do |label,concurrency| | |
print "\n #{label}" | |
EM::Synchrony::FiberIterator.new(values, concurrency).each do |val| |
NewerOlder