Table of Contents
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
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). |
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
#!/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 |
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
;; 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 |