If you haven't seen one of these, try it out! Well documented but these are the ones I use consistently.
⇧ = shift, ⌃ = ctrl, ⌥ = option, ⌘ = command (aka master)
What an awesome tool.
adduser 3.113ubuntu2 | |
apt 0.8.16~exp12ubuntu10.2 | |
apt-utils 0.8.16~exp12ubuntu10.2 | |
aspell 0.60.7~20110707-1 | |
aspell-en 6.0-0-6ubuntu2 | |
autoconf 2.68-1ubuntu2 | |
automake 1:1.11.3-1ubuntu2 | |
autotools-dev 20120210.1ubuntu1 | |
base-files 6.5ubuntu6.2 | |
base-passwd 3.5.24 |
iced@iced test % cat test.worker | |
exec 'test.rb' | |
iced@iced test % cat test.rb | |
puts config.inspect | |
puts "YO!" | |
iced@iced test % iron_worker upload test --worker-config test.json | |
------> Creating client | |
Project 'Test' with id='517baf16ed3d7607990013a0' | |
------> Creating code package | |
Found workerfile with path='test.worker' |
brews = [] | |
out = IO.popen("brew list", "r") do |io| | |
brews = io.read.split "\n" | |
end | |
def parse(brew, brew_info) | |
in_options = false | |
print "brew reinstall -v #{brew} " | |
brew_info.split("\n").each do |m| | |
#puts m.inspect |
#!/usr/bin/env ruby | |
require 'net/https' | |
require 'json' | |
# a simple wrapper to do an HTTP GET | |
def fetch_uri(uri) | |
uri = URI(uri) | |
Net::HTTP.start(uri.host, uri.port, :use_ssl => true) do |http| | |
http.verify_mode = OpenSSL::SSL::VERIFY_NONE |
def mode(array) | |
count = Hash.new(0) | |
array.each { |element| count[element] += 1 } #count how many times an element[s] appears the most | |
# element of the array => number of times element occured in an array | |
# ex. {5 => 2, 6 =>2, 7 =>1} | |
max = count.values.max | |
count.keep_if { |key, val| val == max} | |
# count is {5 => 2, 6 =>2} | |
count.keys #return an array of those elements | |
end |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
$stack, $draws = [], {} | |
def method_missing *args | |
return if args[0][/^to_/] | |
$stack << args.map { |a| a or $stack.pop } | |
$draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :< | |
end | |
class Array | |
def +@ |
body { | |
background-color: #7A060C; | |
} | |
#wrapper { | |
width: 90%; | |
margin: 200px auto; | |
} | |
h1 { |