I hereby claim:
- I am z0rk1i on github.
- I am z0rk1 (https://keybase.io/z0rk1) on keybase.
- I have a public key ASDCGXPiAxaE9GZNagmdOu0cTr53pzdF_kjE5QZ_iFbZKgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| <!doctype html> | |
| <title>Site Maintenance</title> | |
| <style> | |
| body { text-align: center; padding: 150px; } | |
| h1 { font-size: 50px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
| a { color: #dc8100; text-decoration: none; } | |
| a:hover { color: #333; text-decoration: none; } | |
| </style> |
| # prerequisites: gem install tzinfo | |
| # run: ruby my_time_server.rb | |
| # visit site: http://localhost:2626 | |
| # stress test: siege -c100 'http://localhost:2626/time?Moscow,New%20York' -b -t10s | |
| require 'socket' | |
| require 'tzinfo' | |
| class Server | |
| def initialize(ip, port) | |
| @server = TCPServer.open(port) |
| ;;; strint.clj -- String interpolation for Clojure | |
| ;; originally proposed/published at http://cemerick.com/2009/12/04/string-interpolation-in-clojure/ | |
| ;; Copyright (c) 2009, 2016 Chas Emerick <[email protected]> | |
| ;; | |
| ;; All rights reserved. | |
| ;; | |
| ;; Redistribution and use in source and binary forms, with or without | |
| ;; modification, are permitted provided that the following conditions are met: | |
| ;; |