21 ms·
When devops makes a clock
- mmcallister 9y agoOh god this physically pains me. I love it.
- deleted 9y ago[deleted]
- smaslennikov 9y agoI can hear the teeth grinding from here
- TeMPOraL 9y agoTL;DR of the implementation: every minute, the script updates the HTML page with sed, and then commits it into git and pushes it into Github... What can one say. At least they didn't use Kubernetes for that.
- tehlike 9y agoor store the value in a mongo instance.
- medokin 9y ago*cluster
- chronid 9y agoReplication is for pussies, and we have no money anyway for infrastructure. YOLO.
- smaslennikov 9y agoi think you mean [mangodb](https://github.com/dcramer/mangodb https://github.com/dcramer/mangodb)
- thinkMOAR 9y agoThe minutes of the hour aren't in sync with ntp though? Seems users of the clock will always be 1 minute late
- smaslennikov 9y agoyou can thank gh pages for that
- thinkMOAR 9y agoAh okay, i'm not a GH user. Though does spark my curiosity, do you notice timing/time diff issues on GH on other parts of their system?
- smaslennikov 9y agoNot at all, there's just a delay for when it builds the page. For regular use cases, this isn't an issue.
- captn3m0 9y agoDon't give them ideas
- hssys 9y ago"Let's dockerize it and it deploy it to kubernetes in a replica set for high availability."
- smaslennikov 9y agoit's never too late
- bostand 9y agoWhy didn't he use left-pad.io? An opportunity lost if you ask me.
- skytreader 9y agoJS isn't a very dev-ops tool if you ask me.
- Cthulhu_ 9y agoCould use JS to generate and orchestrate dockerfiles I guess.
- deleted 9y ago[deleted]
- smaslennikov 9y agoIt's beautiful!
- david90 9y agoI remember that time when using text files as my database when I did web programming 15+ years ago. btw can I send a PR to your repo?
- Gys 9y agoI use json files on s3 to store data for some projects. Far cheaper then having a database.
- Cthulhu_ 9y agoThat's how I'd do it for simple CMSes to be honest, just work in .md files instead of bothering with a CMS.
- smaslennikov 9y agoPlease do! I already see an entire day of managing that repo, apparently.
- Gys 9y agoAutomatically going for 'most commits ever' as well, I guess: https://github.com/smaslennikov/whattimeisitrightmeow/commits/master https://github.com/smaslennikov/whattimeisitrightmeow/commit...
- jacobush 9y agoSo, it's immutable. Sounds like a blockchain right there!
- orjan 9y agoclockchain? :p
- subroutine 9y agoNaturally the clockchain provides proof of work.
- dredmorbius 9y agoWork expands to fill all available time.
- edvinasbartkus 9y agoHow much time will it take to reach the limit of GitHub repository size (~1GB)?
- rcfox 9y agoEventually, they'll have a version of the file for each minute in the day. After that, the hash should ensure that no additional space is used to store the content. (I think, I don't know much about git internals.) After that, if you assume 128 bytes per commit (timestamp, and maybe a hash or two saved?) then probably around 14 years.
- 9y ago
- Tepix 9y agoWell, it shows the wrong time (by 9 hours). Must be American... Non surprisingly, someone already opened an issue on github.
- pasta 9y agoThe fix is easy: add the letters 'UTC' after the time.
- robocat 9y agoFor backwards compat, open up v2.0.0 with the UTC added and backfill the data to the start of time.
- johnlbevan2 9y agoWhich start of time? -https://en.wikipedia.org/wiki/Epoch_(reference_date)#Notable_epoch_dates_in_computing -https://en.wikipedia.org/wiki/Chronology_of_the_universe#Planck_epoch
- yjftsjthsd-h 9y agoAt 0, of course;)
- vlasev 9y agoI propose opening a new repo for each time zone.
- pjc50 9y agoReminds me of http://www.hexmaster.com/goonscripts/what_time_is_it.html http://www.hexmaster.com/goonscripts/what_time_is_it.html
- smaslennikov 9y agoEntirely relephant!
- retor 9y agoThis is genius! SSCG: Static site clock generator. * Fast (no server side scripts running on get requests) * Safe (no server side scripts running on get requests) * Version controlled (every version of the time is stored in version control in case of time warp)
- smaslennikov 9y agoLost it at > Version controlled (every version of the time is stored in version control in case of time warp)
- noonespecial 9y agoIt's like... watching someone dig a swimming pool with a spoon. Magnificent.
- Ygg2 9y agoI'd say disgusting. Like someone digging a swimming pool with a spoon, inside a sewer tunnel.
- johnlbevan2 9y agoReminds me of "Here's two ducks, they're digging a hole". https://www.youtube.com/watch?v=wfvEgWINUFc https://www.youtube.com/watch?v=wfvEgWINUFc
- smaslennikov 9y agoohhhhhh shit i love it!
- yjftsjthsd-h 9y agoI think it's like seeing someone build a spoon that excavates pools automatically. It's amazing, even as it hurts to watch.
- alanbernstein 9y agoMore like eating a bowl of soup with an excavator.
- ejolto 9y agoI looked at the github repo, and the readme has this sentence > I woke up one morning after seeing the traeish of Bojack Horseman and thought What does traeish mean? I tried to google but that didn't help much.
- randac 9y agoTrailer, possibly.
- smaslennikov 9y agoTraeish is how us cool people at grindr pronounce the word 'trash'. Here's a vague example: https://www.youtube.com/watch?v=x9d5csMFAfE https://www.youtube.com/watch?v=x9d5csMFAfE
- MetalMatze 9y agoI just want to leave my version of this here: https://time.kitchen https://time.kitchen If you write Go every now and then you might get it.
- smaslennikov 9y agoAwwww yusssssss high five! Where's the sauce though? While everyone around me is a gofan, I haven't touched it yet.
- gargravarr 9y agoLooks pretty benign on first glance. It's only when you look on Github that the true horror reveals itself. I'm laughing a lot more than I should at this.
- smaslennikov 9y agoyayyyy the deception is real
- hussfelt 9y agoThis is fantastic. I could not help myself, fixed issue #3. Pain is real!
- smaslennikov 9y agoThank you! Bring on the pain
- nathankunicki 9y agoWell, if individual people raised a PR to update the time every minute, they would have essentially made a distributed time mechanism. Need some kind of quorum/consensus algorithm in order to handle duplicate PR's though.
- jpatokal 9y agoSee also, when Wikipedia editors make a clock: http://pageoftext.com/wikiclock http://pageoftext.com/wikiclock And they're up to >13,000 revisions already... http://pageoftext.com/PH_page_revisions&nm_page=wikiclock http://pageoftext.com/PH_page_revisions&nm_page=wikiclock