- library for working with command line arguments
- A manipulable, pluggable, memoization framework for Clojure
- A Clojure interface to Sentry
#!/usr/bin/env ruby | |
require 'webrick' | |
class Servlet < WEBrick::HTTPServlet::FileHandler | |
PORT = 4200 | |
INDEX_FILE = 'index.html' | |
ROOT_PATH = File.expand_path(__dir__) # Folder of current file | |
def do_GET(request, response) |
docker images | tail -n+2 | awk '{print $3}' | xargs -L1 docker rmi |
#!/usr/bin/env ruby | |
class GraphGenerator | |
# Returns list of edges for n-vertex complete graph | |
# | |
# Example: | |
# GraphGenerator.generate(4) | |
# [1, 2], [1, 3], [1, 4], [2, 3], [2, 4], [3, 4] | |
def self.generate(count) | |
if count == 1 |
# From http://meinit.nl/using-tar-and-ssh-to-efficiently-copy-files-preserving-permissions | |
ssh user@machine-where-precious-data-is "tar czpf - /some/important/data" | tar xzpf - -C /new/root/directory |
def flatten(input, output=[]) | |
input.each do |e| | |
if e.is_a? Array | |
output += flatten(e) | |
else | |
output.push e | |
end | |
end | |
output | |
end |
def build_tree(root_id:) | |
root_row = db_find(id: root_id) | |
root_node = | |
{ | |
id: root_id, | |
text: root_row[:text] | |
} | |
add_children(root_node, db_find_children(parent_id: root_id)) | |
root_node | |
end |
require 'thwait' | |
$LOAD_PATH << '/Users/madisnoemme/code/etventure/rbn-be-api' | |
threads = 10000.times.map { | |
print "." | |
Thread.new { | |
require_relative './rbn/service/xml/mapping' | |
require_relative './rbn/service/xml/mappings' | |
} | |
} |
Settings |
"\M-d": backward-kill-word
"\e[1;5C": forward-word
"\e[1;5D": backward-word