Skip to content

Instantly share code, notes, and snippets.

View tmountain's full-sized avatar

Travis Whitton tmountain

View GitHub Profile
@michaellihs
michaellihs / tmux-cheat-sheet.md
Last active July 1, 2024 12:59
tmux Cheat Sheet
A few other small pieces of advice that I'll be applying to any project I ever start from scratch again.
1) Think about how the service will scale from day-1, and don't box yourself in with any vertical architectural decisions (think about keys and things like that early).
2) Design your service so that any node can fail without consequence to the overall operation of the system.
3) Host it somewhere sane ;-).
4) Leverage as much existing technology as humanly possible (orchestration, monitoring, deployment, etc... are all "solved" problems).
@jronallo
jronallo / common_crawl_hostname_count.rb
Last active September 29, 2017 23:12
Ruby scripts for parsing the output from the Common Crawl URL index: https://github.com/trivio/common_crawl_index/blob/master/bin/remote_read
#!/usr/bin/env ruby
# a quick, simple script to partially parse output from https://github.com/trivio/common_crawl_index/blob/master/bin/remote_read
# and output subdomains in order of count
url_counts = {}
total_urls = 0
File.readlines(ARGV[0]).each do |line|
url = line.split(' ').first
reverse_hostname = url.split('/').first
;; chouser's solution to Read Roman numerals
;; https://4clojure.com/problem/92
(fn [r]
(->>
(reverse r)
(map {\M 1000 \D 500 \C 100 \L 50 \X 10 \V 5 \I 1})
(cons 0)
(partition 2 1)
(reduce