Better HN
topnewbestaskshowjobs
Log inSign up

dr4g0n

142 karma · joined Jul 27, 2013 (13y ago) · 27 submissions

Submissions

comment 1y ago · link · parent

No need for `xargs` in this case, `find` has been able to take care of this for quite some time now, using `+` instead of `;`:

    find . -type f -exec perl -p -i -e 's#foo#bar#g' {} +

comment 4y ago · link · parent

It doesn't correspond to how _you_ say dates; I would write 11/03 for the date, and say "the eleventh of March", so it's internally consistent.

Not trying to argue one way or the other, just adding some extra context.

comment 8y ago · link · parent

I have a similar problem due to the whole "gmail.com" vs. "googlemail.com" thing that came about in Europe in the earlier days of Gmail.

When I got my gmail account, Google gave me a "googlemail.com" address, due to a pre-existing trademark in Europe. These days the "gmail.com" suffix works for my account, but I've already set everything up with the "googlemail.com" form and saw no reason to switch. Sometime in 2016, someone started using the "gmail.com" version to sign up for stuff, and I repeatedly nearly fell for this exact problem... It's made more difficult by the fact that Google clearly _want_ me to use the "gmail.com" form, and refer to it by that address in many places, despite me opting to use the long form in settings.

I don't think the person using my email address is being malicious, I think it's by mistake, but I have no means to contact him to fix the problem.

comment 9y ago · link · parent

Only for some banks, e.g. Barclays. HSBC's version[1] does not require a card to use.

[1]: https://www.hsbc.co.uk/1/2/contact-and-support/security-cent...

comment 11y ago · link · parent

Do be aware though that this only works if HISTCONTROL is set to 'ignorespace' or 'ignoreboth' (for bash anyway).

For zsh, you need to have HIST_IGNORE_SPACE set.

comment 11y ago · link · parent

Looks good, I had previously used Dropbox for personal repositories, but now I might try using them for shared ones.

It seems from a quick read of the design document [1] that the important thing here is the updating of refs using a compare-and-swap, ensuring that the synchronisation issues that typically occur with using Dropbox as a remote cannot occur. Objects are always* safe from this since the file names are SHA1 hashes.

Edit: The only downside I can see with this is that the remote will never have garbage collection take place, so unreachable objects will continue to take up space indefinitely.

[1]: https://github.com/anishathalye/git-remote-dropbox/blob/mast...

comment 11y ago · link · parent

It's not exactly hard to do by hand:

    git add ...
    git commit --fixup $SHA
    git stash
    git rebase -i --autosquash $SHA~
    git stash pop

comment 11y ago · link · parent

I was really thrown by the ligatures in some of the command snippets (diff and lostfiles).

Why do things manually have to be marked as dependencies? Is that because they were manually installed at one point, or does Arch's package manager not properly track dependencies?

comment 11y ago · link · parent

This has reminded me of my old MP3 player, I think it was made by Archos, that had two shuffle modes: "shuffle" & "random".

The "random" mode would happily play songs from the playlist multiple times, even directly after one another; "shuffle" on the other hand would never play a song more than once per playlist. When I first got it I was fascinated by this difference – I still wonder why they included both modes.

comment 11y ago · link · parent

Not for long, unfortunately[1]:

    On April 30, 2014, we announced the deprecation of the XMPP Chat API as part of
    the release of Platform API v2.0. The service and API this document covers will
    no longer be available after April 30, 2015.
[1]: https://developers.facebook.com/docs/chat

comment 11y ago · link · parent

You can just pull from someone's local copy, a git checkout is just like a remote (bare) repository that happens to have a tree.

comment 11y ago · link · parent

A version control system with the feature set git has is necessarily complicated, this is not a bad thing. Forcing the complexity on the user is a bad thing, but git does not do this except when it is necessary to. Using git at a basic level is not hard.

This essay is not attempting to explain how to use git, it is explaining how git itself works and how changes are physically tracked. There's no need for a basic user to know this information, but if someone wants to dig into git and understand how it works, this essay is a nice guide. Explaining how SVN or any other version control system works at this level of detail would also be complicated.

comment 11y ago · link · parent

> If you spot a USB flash drive cemented into a wall or kerb, you may have stumbled across a Dead Drop, part of a global art project borrowing tricks from the world of espionage

Or, you might have stumbled across 240VAC wired to a USB connector.

comment 11y ago · link · parent

So this seems like an automatic version of flattr[1], except you get the perk of no adverts in return.

What I wonder though is: what happens if I visit a site that I don't want to support? Can I say no? Otherwise this just invites clickbait even more.

[1]: https://flattr.com/howflattrworks

comment 11y ago · link · parent

> The so-called “ow zone” is a zone that is hard to reach with your thumb, like corners of the screen.

The image that goes along with this point demonstrates the areas that are hard to reach for right-handed users, ignoring that ~10% of people are left-handed and have trouble reaching the opposite corners. Your design shouldn't assume that two particular corners are bad and the other two are fine, all four corners should be used for uncommon options only.

comment 11y ago · link · parent

The site reports that it charges wirelessly, but the video lists the battery as optional - does this mean that on the non-battery version if I move my Mouse Box off the mat it'll shut down? Both the USB ports shown are host ports, so it's not going to be receiving power that way.

comment 12y ago · link · parent

I have 127MB of Location History, trying to use this takes out my browser.

It's a shame really, I bet that much data would make for some good visuals.

18.

Making things open, making things better(gds.blog.gov.uk ↗)

4 points · by dr4g0n · 12y ago · discuss

comment 12y ago · link · parent

They missed a trick calling it 'funcgo' instead of 'gofunc'; just think of the tag line:

    gofunc yourself

comment 12y ago · link · parent

You can create a new branch containing the pull request fairly easily.[1]

It's just: git fetch origin pull/ID/head:BRANCHNAME git checkout BRANCHNAME

Edit: I see that MaikuMori[2] posted the same information just before me; ah well.

[1]: https://help.github.com/articles/checking-out-pull-requests-...

[2]: https://news.ycombinator.com/item?id=7949107

comment 12y ago · link · parent

I've had some good experience with iodine in the past, it's been useful at airports and on trains to bypass captive portals.

It's extremely variable in performance, and can sometimes require a bit of tuning on the client side to work reliably; however, for the most part the auto-detection works well, and will upgrade to raw UDP on port 53 if it is possible.

comment 12y ago · link · parent

Sent! Sorry for the delay.

I'm all out of invites now.

comment 12y ago · link · parent

Thank you yarinb! Invite received.

I now have two invites, who wants them?

Edit: Sent one to lbr, I now have one left.

comment 13y ago · link · parent

I may have to steal that alias, good tip.

Ctrl-a/Ctrl-e are equivalent to Home/End (unless you're inside a screen session, which was a terrible choice of binding on their part).

comment 13y ago · link · parent

!! is not at all pointless, "sudo !!" is much easier that Up, Ctrl-a, "sudo ".

comment 13y ago · link · parent

I will look into it, seems promising.

Thanks!

comment 13y ago · link · parent

As a smoker currently trying to quit, this is particularly relevant to me at the moment. The problem with nicotine patches is that they only deal with the actual "physical" addiction, not the "psychological" addiction to the experience of smoking. I've been using nicotine patches for a while now, yet I still find myself holding things between my fingers, or chewing pens.

This is the huge advantage of an electronic cigarettte, it deals with both aspects; it does so a lot better than those nicotine "inhalers" that they have because of the look & feel of them and the appearance of the vapour they produce.

The downside to all nicotine replacement therapies is that nicotine is a pretty bad irritant; you can't wear a patch in the same place two days in a row and the gum can cause really sore throats and even mess with your digestive system. This is also an issue that most people overlook with the e-cigarettes, the nicotine in an e-cigarette concentrated enough to cause irritation of the throat and lungs, much like smoking. Obviously e-cigarettes are not dangerous in the way that cigarettes are, but if people think they're safe and decide to use them in the longer term there may be unexpected issues ahead.