Better HN
topnewbestaskshowjobs
Log inSign up

phpnode

7,416 karma · joined Oct 23, 2009 (17y ago) · 1,582 submissions

Founder of https://codemix.com/ - authoritative product context which makes sure coding agents build the right thing and humans stay in control.

Email: charles@codemix.com

Submissions

comment 14y ago · link · parent

Can you imagine how much more difficult that would be to program for? Instead of (relatively) easy to parse timezone rules you have some kind of awful, locale specific agreement that that event you scheduled for 9am monday every week would actually occur at 8am half of the year?

comment 14y ago · link · parent

the server doesn't want to read the content! Otherwise they would just store it in the clear. If the server can read the content then they are liable if that content infringes copyright. The theory is that if the server cannot read it, they're not liable. I would not like to be the first one to test this strategy out in court however

comment 14y ago · link · parent

no, the fragment is never sent to the server by the browser.

comment 14y ago · link · parent

This isn't about keeping the content private for the users. This is all about removing the server's ability to read the content, to attempt to absolve the server owner of liability for that content. Therefore the server has no incentive to lie about the encryption algorithm used.

comment 14y ago · link · parent

there's a non trivial lag when typing for me on chrome, makes it pretty hard to use

comment 14y ago · link · parent

> The MacBook likely has more than 25% market share already

Perhaps where you're sitting, but in my experience, it's more like 5%

comment 14y ago · link · parent

accurate for sabu but not the rest it seems

comment 14y ago · link · parent

I'm glad someone has said this, I was looking at LoseThos's long, long list of dead posts on HN a few days ago, it is deeply tragic, a clearly talented guy that has lost his grip on reality. It would be interesting to hear from him the steps that led to his current situation. From some of his comments he seems like he is aware of his condition, yet his self awareness doesn't lead to self control, to me this is fascinating. Of course, if he replies to this his comment will be dead, so here's a question - are the HN mods right to silence an account from a clearly very talented technical guy because of his mental illness?

comment 14y ago · link · parent

Just looking at Gmail now, there actually isn't a Gmail logo anymore. There is a Google logo that I can't click on and there's a Gmail link underneath it, but clicking the Gmail link opens a popup menu. I have to then click "Gmail" on the popup menu to get to my Inbox. (Or I could just click "Inbox" of course, but that sometimes gets hidden when i have a lot of labels open, and it's a smaller, fiddly link). I'd bet more people will have noticed this change in behavior than those who've noticed the change from a Gmail logo to a Google logo.

My point is, all this requires me to think. But before I could just swing my mouse into the top left corner, click "Gmail" and always end up at my inbox, no matter where I was in the application. This consistency has gone.

I should have phrased my question: "What possible advantage does this offer, to the user?"

comment 14y ago · link · parent

this is not a change for the better, what possible advantage does it offer?

comment 14y ago · link · parent

supported in IE8+ too

comment 14y ago · link · parent

probably not without serious security implications. I don't think there's a distributed java compiler available so you'd also have to write that first

1393.

"White hat" Facebook hacker gets 8 months in jail(bbc.co.uk ↗)

158 points · by phpnode · 14y ago · 118 comments

comment 14y ago · link · parent

Actually in jetbrains IDEs you preview your automated refactoring, before it happens. It will show you which files will be affected and how, and then you can choose whether to exclude specific instances or not.

Code review happens anyway, automated refactor or not

comment 14y ago · link · parent

+1 for effort, but this is really very unethical. Literally all those cameras are broadcasting without their owner's permission

comment 14y ago · link · parent

of course it works! no one would expend the significant time and resources that are required to spam effectively these days if there wasn't any reward. It's a numbers game, they just blast their ads (which are generally for high profit margin things that appeal to people in a desperate/impulsive mental state: penis pills, forex, get rich quick schemes etc) to as many people as possible, if you hit 100 million email addresses, and 1% of them get through spam filters, i'd bet you'd get more than one conversion.

comment 14y ago · link · parent

I've had success with wkhtmltoimage for this, it's part of wkhtmltopdf: http://code.google.com/p/wkhtmltopdf/

comment 14y ago · link · parent

Upgrade the links with jQuery. Here's a simplified version of what I use:

    $("a").bind("mousedown", function(e) { 
        $(this).data("href", $(this).attr("href"));
        $(this).attr("href","http://example.com/redirect?url=" + $(this).attr("href"));
    });
    $("a").bind("mouseup",function(e) {
        var el = $(this);
        setTimeout(function() {
            el.attr("href", el.data("href"));
        },10);
    });

This works by switching the url when a user clicks a link to your redirect url, then switching it back a fraction of a second after they mouse up. This means that your redirect works even if the user right clicks and opens in a new window / tab and when a user hovers over a link, they still see the normal URL in the status bar.

On the /redirect url just log any data you need and send a 301 or 302 redirect. The destination site will see your original page as a referrer, not your redirect url.

comment 14y ago · link · parent

Have a look at the about us page, Kaseem Dean aka Swizz Beatz is listed as CEO.

http://www.megaupload.com/?c=about

comment 14y ago · link · parent

I find foundation great for rapid prototyping, I can build a mockup in foundation in a few minutes and then iteratively improve on the design until it becomes a real product, as the name implies it's really a foundation to build on, it doesn't give you everything but it gives you 90% of what you need in a way that isn't restrictive.

Bootstrap gives you a lot more than foundation does, but I find it very restrictive, it's hard to make a bootstrap site not look like bootstrap (if anyone can point me to some counter examples I'd be interested). This is unsurprising since bootstrap was designed by twitter for a consistent look across their internal tools.

So my verdict is, for internal tools / quick hacks, use bootstrap. For mockups and real products, use foundation.

comment 14y ago · link · parent

looks great, thanks for the suggestion

comment 14y ago · link · parent

nice and all, but what i really want from github is the ability to pull request from the command line. (i know it's scriptable, but I've not got round to it yet)

comment 14y ago · link · parent

those charts don't say whether APC is enabled, which leads me to suspect that it isn't. APC is an opcode cache that greatly enhances php performance, no one runs a high traffic website without using APC

comment 14y ago · link · parent

I too wish php had a widely supported compiler, but in reality it's not something that most projects require. The overhead of interpreting php is a lot lower than e.g. making a single db call. Also, in the most common usage scenarios, PHP processes only live for the time it takes to deal with each request, so how do you approach that if you're compiling your code? Keep spinning up new processes or rewrite your application code?

Regarding MVC frameworks, try Yii - http://www.yiiframework.com

comment 14y ago · link · parent

well they can do a best guess based on the location of your IP, even if you only sign into facebook once while you're travelling. The really interesting question is: can they do this even if you have not signed into facebook at all on your travels, or for totally new accounts with no location history at all.

If they can, then they must be doing image recognition in some way. Perhaps someone who has more time / energy than me could try this by creating a new account and uploading some photos of recognisable objects (but without exif geo data).

comment 14y ago · link · parent

Also, does the location info purely say "Christchurch, New Zealand" or is it more granular? I'm guessing that when facebook only has sparse information about your location, as in your case, it "zooms out" to the city, state, country etc, but the more information it can collate, the more accurate the suggestion it gives is.

comment 14y ago · link · parent

right, but assuming the timestamp is on the photos, facebook still knows where you were at the time they were taken. The time you upload them is immaterial

comment 14y ago · link · parent

but did you use facebook at all when you were in new zealand?

comment 14y ago · link · parent

Here's my guess at how it's done:

Redditor has facebook app installed on their smartphone (or just uses the website), sets status to "OMG wife is going into labour, at the hospital now". Facebook now knows roughly where redditor was at the specified time based on the ip, they can narrow this down further by looking at keywords in the status message and check it against a list of addresses in the local area and select the best match.

When the redditor comes to upload their photos days or weeks later, facebook just checks the photo timestamp against the user's location +/- X hours and makes a guess at where the photos were taken.

comment 14y ago · link · parent

yeah this port relies heavily on php.js, it's part of the reason it's abandoned, with all the libs it just becomes too big for client side apps, and it sits in some kind of uncanny valley that is really nearly the same as the equivalent php but not quite.
1
464748
53