HNHacker News
TopNewBestAskShowJobs

saulr

300 karma · joined March 18, 2013

submissionscomments
saulr··on Backslash must die
Continuing to read the exceptions:

> The Windows API has many functions that also have Unicode versions to permit an extended-length path for a maximum total path length of 32,767 characters. This type of path is composed of components separated by backslashes, each up to the value returned in the lpMaximumComponentLength parameter of the GetVolumeInformation function (this value is commonly 255 characters). To specify an extended-length path, use the "\\?\" prefix. For example, "\\?\D:\very long path".

saulr··on Microsoft and Canonical partner to bring Ubuntu to Windows 10
I don't think bash itself has been ported, it's simply running under a Linux subsystem. I imagine it's similar to the discontinued POSIX and UNIX[2] subsystems. In this case, bash probably believes that it's running in on Linux, not that it's been ported over to compile in Windows.

[1] https://www.wikiwand.com/en/Microsoft_POSIX_subsystem

[2] https://www.wikiwand.com/en/Windows_Services_for_UNIX

saulr··on CSS Variables landing in Chrome 49
It looks like this can be changed with `setProperty`. There's a demo[1] that works on Firefox 31+ and Chrome 49+

[1] https://www.broken-links.com/2014/08/28/css-variables-updati...

saulr··on The password hash Argon2, winner of PHC
On your `User` table you have a column such as `hashing_scheme`. If you don't have one of these columns already, create it with the default value of your current scheme (e.g., `bcrypt`)

When a user attempts to log in, you hash the password they submitted with whatever's in that user's `hashing_scheme`. If the password was incorrect, fail early.

If the password was correct, and this user's `hashing_scheme` value is different to the application's `current_hashing_scheme`, you rehash the user's password (that you got via the POST request or otherwise) with the new scheme, update the `password_hash` and `hashing_scheme` value in the database.

This is just one way to do it, which is how Django performs hashing scheme migrations IIRC.

saulr··on Ask HN: A simple, low-tech way to reduce the package theft problem from homes?
Always found this problem quite interesting. In the UK, parcels are rarely if ever left on the porch. If you aren't in there's a few options: a) they deliver it to a neighbour and post a card through your door saying "it's been left at number X"; b) they leave it in a safe space (typically throw it over your garden fence); or c) return it to the delivery office for you to specify when to redeliver or pick it up yourself.

Can anyone shed any light as to why (a) doesn't seem to be used in the US?

saulr··on CSRF in Doorkeeper OAuth2 gem
Chrome added the concept of different user profiles recently, there's more info here: https://support.google.com/chrome/answer/2364824?hl=en-GB
saulr··on Are You A Typing Hacker? Prove It
It's funny you should say that, as The Typing of The Dead: Overkill was released a couple of days ago on PC (see http://store.steampowered.com/app/246580/)
saulr··on Prism: Create and explore personalized infographics of your SMS history
Great app, however a big bug that breaks visualisation for me in the UK is that messages from 07123123123 and +447123123123 appear as separate contacts (i.e., one number has the contact name, the other shows as the number with the country code prefix), even though iOS treats them as the same.
saulr··on Show HN: Bootstro.js - intro.js for Bootstrap
Flicking between steps results in the window scroll animations queueing. You may wish to replace

$('html,body').animate({

in bootstro.go_to, with:

$('html,body').stop(true).animate({

This clears the animation queue and stops the current animation between animating.

← PreviousPage 2 of 2