Better HN
topnewbestaskshowjobs
Log inSign up

EnigmaticLion

14 karma · joined Jul 18, 2016 (10y ago) · 11 submissions

Submissions

comment 2y ago · link · parent

Source is a lot more complicated than i thought it will be: https://github.com/rails/rails/blob/v6.1.7.7/actionview/lib/...

comment 2y ago · link · parent

We have a rails 6 app, and there's a test that essentially expects time_ago_in_words(1.year.from_now) to return "about 1 year" (as part of a user facing message). The test failed. I thought it's a flaky test but i was able to reproduce it locally. Turns out executing that code on a leap day returns "almost 1 year" instead. Can test it in rails console if you are interested:

  irb(main):001:0> include ActionView::Helpers::DateHelper
  => Object
  irb(main):002:0> distance_of_time_in_words(Date.new(2025, 2, 28), Date.new(2024, 2, 29))
  => "almost 1 year"
  irb(main):003:0> distance_of_time_in_words(Date.new(2025, 3, 1), Date.new(2024, 2, 29))
  => "about 1 year"
  irb(main):004:0> distance_of_time_in_words(Date.new(2025, 2, 28), Date.new(2024, 2, 28))
  => "about 1 year"

comment 7y ago · link · parent

7 hours of observation, one image every 90 seconds: that's 280 images. My phone takes 8 megapixel photos and those are about 2 MB, based on that the 870 megapixel image would be about 200 MB. 200 MB * 280 = 56 GB. Doesn't sound that much.

Did they publish the images? I'm sure many astronomers would be happy to examine them.

comment 9y ago · link · parent

While reading the article i thought if there's no number 6, then the universe can't have more than 5 of anything. So perhaps 5 photons and that's it. There cannot be anything else because then there would be 6 objects in the universe.

comment 9y ago · link · parent

If i use iTerm's autocopy feature (e.g. that the selected text automatically goes to the clipboard) and rarely press CMD+C then i'm safe? Or should i start changing my passwords? Since i usually generate passwords with `pwgen`, then copy with double click.

comment 9y ago · link · parent

Just out of curiosity, how long did it take for you to come up with this PoC? From the initial notice that something might be exploitable until you sent the email to slack?

Your post makes it look so easy, but it would surely take weeks for me to figure out all these things.

comment 9y ago · link · parent

That landing page is a whopping 9MB [1]. Please optimize it for users with slow internet like me. [1] https://www.webpagetest.org/result/170225_RN_1K80/

comment 10y ago · link · parent

Maybe i misunderstand what permission.INTERNET permission means, but i fail to see how Google Play Games is not using the internet.

comment 10y ago · link · parent

> "test".indexOf("st") == "test".length - "st".length

I don't think this is a correct implementation of "endsWith".

"testtest".indexOf("st") =/= "testtest".length - "st".length

comment 10y ago · link · parent

Yes, but it is so annoying and confusing that these symbols are not printed on the actual keyboard. Looking at the keyboard doesn't help much when I try to press a shortcut I just saw in the menu.

comment 10y ago · link · parent

Source? This study says bicycling is way better than cars: http://bikeportland.org/2011/12/12/new-study-compares-bicycl...