Better HN
topnewbestaskshowjobs
Log inSign up

nmjohn

1,490 karma · joined Feb 18, 2014 (12y ago) · 369 submissions

[ my public key: https://keybase.io/njohnson; my proof: https://keybase.io/njohnson/sigs/PEJkqcblsXsrSziMB_Icwhdl9BHXHsj3pODPfhhTxvY ]
Submissions

comment 10y ago · link · parent

Heads up this happened a few days ago, not currently hijacked.

Handy tool though, bookmarked it - using the event graph to display route changes as detected over time is a great visualization - would be really cool if there was the same event graph covering the entire internet (though I suspect without some cleverness in both design and implementation, the quantity of data would be prohibitively large for building a useful visualization).

comment 10y ago · link · parent

There is _absolutley_ no value for a language to provide handy built-in functions that are trivially made available by a library.

If we were talking about language constructs/semantics or flow-control abilities, I'd have a very different opinion - but not having a json decoder builtin, is no reason to use or not use a language.

comment 10y ago · link · parent

> Let's Encrypt requires individual certificates

That's not accurate - you can have up to n[0] domains on a single certificate

[0]: I don't remember the exact number, but it's more than 2 at least.

comment 10y ago · link · parent

Are there any trade-offs to this approach? This seems so obvious to me I'm confused why it is more widely used.

comment 10y ago · link · parent

> Imagine you live in a hypothetical world where all things you consider moral, just and socially acceptable were legal and societally acceptable and where everything else was illegal and societally reprehensible. What role would privacy play in such a society? What benefits would it provide?

Sure, that hypothetical would be great for _you_ (you being the decider of morality) - but what about everyone else living in the world? It is fundamentally impossible for a world to exist where your hypothetical can be true for everyone.

Consider this - the hypothetical you describe is currently true for some set of people. And yet it ruins lives and causes misery for millions of others.

comment 10y ago · link · parent

> How is this not just positive spin on a doj money grab?

While the _best_ case scenario would be the entire notion of any asset sharing program be made outright illegal [0] because it has been shown to be corrupt, etc, etc - simply having it shut down is a good thing even if not for "good reasons" because at the very minimum, it means that if and when the program is reinstated, it will force conversation of the issue, something that has gone largely un-discussed in the American political landscape.

[0]: I personally would argue it should be illegal regardless of conviction, otherwise it incentivizes police forces and DAs to only go after high payout crimes

comment 11y ago · link · parent

Empathy goes a long way in programming discussions simply because for _all_ of us, we often make decisions and hold opinions regarding programming based on gut feel but far less often are honest about the origin of said opinions - falsely attributing them to some "truth" we somehow have come to know.

What I mean to say is, from my perspective, it's quite easy to see why the Haskell community exists as it does - most of the people who criticize it do not understand even the most basic fundamentals of it and simply are not qualified to have an opinion. Just as I am not qualified to have an opinion on anything to do with, for example, graphics programming, many people simply do not have the experience to have said qualification - not a judgement, simply a statement of fact.

Haskell certainly is not perfect nor is it likely the pinnacle of programming languages - however I don't know a single person in reality who believes that to be the case. However this is exactly the persona a significant number of Haskell criticisms seems to attack.

So at the end of the day, when the majority of the criticism against the language is _fundamentally wrong_ in fact and based on false assumptions, it's no surprise criticism isn't as well accepted as with other communities.

Now having said all that, after spending a good part of the last two months actually endeavoring to learn Haskell and functional programming at a practical level - I can tell you there are MANY valid criticisms to be made, and the thing is, if you read Haskell mailing lists and other online communities, you'll find that they constantly are being made and discussed rationally, the only difference is they are coming from people who are clearly familiar with the language, and the concepts they are discussing. These discussions, however, are far less interesting to any tech media because a.) they involve topics and terms few people are currently familiar with and b.) they aren't abrasive or hostile, and that simply is _boring_ to the media.

One final comment - Haskell is not hard to learn, any reasonably skilled programmer willing to step outside their comfort zone could within a month be at a place where they would be qualified to critique the language. Which is the primary reason why it is so frustrating, at least to me, that so few people actually do before writing criticisms of the language.

comment 11y ago · link · parent

> their containers

Build your own images, problem solved. (Albeit creating a whole host of other problems in place of it, but those are no worse than a world without containers.)

No one relying on third party images beyond an OS can claim that they _really_ care about security or vulnerabilities anyway.

comment 11y ago · link · parent

Nice - I've previously implemented this in (albeit far less extensible) a curl request, it's been working without hiccup for a while now as a cronjob

    CURRENT_IP=$(dig +short myip.opendns.com @resolver1.opendns.com)
    curl -X PUT 'https://api.cloudflare.com/client/v4/zones/'"$ZONE"'/dns_records/'"$DNS_RECORD_ID" \
      -H "Content-Type:application/json" \
      -H "X-Auth-Key:$AUTH_KEY" \
      -H "X-Auth-Email:$AUTH_EMAIL" \
      --data '{"zone_name":"'$ZONE_NAME'","zone_id":"'$ZONE'","type":"A","name":"'$ZONE_REC_NAME'","content":"'$CURRENT_IP'","data":{},"proxied":false,"proxiable":false,"ttl":1,"priority":1,"id":"'$DNS_RECORD_ID'","locked":false,"modified_on":"2015-08-26T03:10:40.975863Z","created_on":"2015-08-26T03:10:40.975863Z","meta":{"auto_added":false}}'

comment 11y ago · link · parent

Not exactly - you've also got to consider the tax consequences on cashing out directly so with the charity, the money only gets taxed once instead of twice.

Scenario a:

Bob starts Hooli - his stock is now worth 100 million. He wants to give half to his family. He cashes it out and pays long term capital gains on it - at 15% he is left with 85 million. He pays out half to his relatives, but don't forget, there is 35% gift tax when you gift someone more than ~15k So of that 42 million, only about 27 million will actually make it to it's intended target.

Scenario b:

Instead of directly cashing out, he starts the foundation with the 100 million. (using that to offset his entire income that year with a charitable tax deduction most likely). He wants to pay out half to his family still - this time he is starting with 50 million which will similarly be taxed at let's say 35% (income tax) - leaving 32.5 million to pay out. Also consider the case where he exercised a large cash performance bonus upon cashing out, that 5 million he will potentially not have to pay any taxes on either because he was able to make a large tax deduction from his "charitable" gift to the foundation.

It is not a simple thing - depending on how exactly the money flows, there are ways to prevent a significant amount of double taxation. (Also a couple years ago gift tax was 55% so it would have been 19 million (scenario a) vs. 32.5 million (scenario b) in post tax money. What makes things an order of magnitude more complicated, is on top of all this one has to consider timing. Tax rates change significantly all the time (55 vs 35% on gift tax in 2010 vs 2015) - some of which are known far in advance, some changes may be a surprise - so in estate planning where the goal is to maintain wealth for many generations to come - strategies like this start to make a lot of sense

comment 11y ago · link · parent

> But calling it a tax shield makes it sound like you can stand to gain personally by doing this.

One (with that much wealth) absolutely stands to gain a ton from it.

A family member of mine works in financial trusts / estate planning for multi-millionaires (many times over) and this is one of the things I've heard from them used to limit tax exposure while maximizing the most typical goal - not personal wealth (these people have more money then they will ever be able to spend, that isn't the concern for them) - but rather maximizing family wealth.

And once you're extremely wealthy, it's amazing how large your family becomes.

Essentially - many charitable foundations are absolutely charitable in their fundamental mission, and best case are helping thousands of people with most of the money directly helping - however what happens in practice, is this foundation then has family members work for it earning somewhere between a reasonable to a completely insane salary depending on any number of factors.

comment 11y ago · link · parent

If you're looking to improve the CSS you end up writing - I highly suggest considering BEM [0]. It stands for block, element, modifier and defines a fairly rigid structure to build components with.

tl;dr: It promotes extremely simple, component based/modular css that is _trivial_ to refactor with confidence unexpected regressions won't pop up.

I'm primarily a backend engineer, but I do full-stack work, especially in my free time, and after seeing it used by our front-end devs at work I decided to try it on my own project - and for the first time ever, I felt like the CSS I was writing actually made logical sense in the same way any program I'd write makes logical sense. Adding constraints is majorly helpful when your language has hundreds of virtually equivalent ways (or at least seemingly equivalent) of doing the same thing - it's just setting yourself up for confusion later.

With or without any sort of preprocessor, BEM is still crazy beneficial if you have a codebase with many people touching the styles, it -

a.) promotes good css practices by limiting the usage of entirely un-necessary slow css selectors because they'd require convention to be broken (and then caught easily in a code review)

b.) promotes extremely DRY components

c.) defines a very simple yet specific way of handling style variations that make DRY component variants (eg a button component could have a red, green or blue modifier) obvious to everyone on the team in a way almost analogous to a primitive in a programming language -- most codebases don't otherwise have a defined pattern for this leading a lot of wheel reinvention and extra complexity which in turns breeds more complexity, leading to truly disgusting css.

Of course there are downsides, by putting limits on a language some things will necessarily become more difficult/complex to accomplish, but I personally find the benefits far outweigh this.

Additionally, I'm not sure how it works trying to integrate it into a mature codebase - I could see that being a challenge for some projects/CSS code styles, but I've not done that so can't speak from more than speculation.

[0]: https://css-tricks.com/bem-101/

comment 11y ago · link · parent

There is a firmware to run lua directly on the esp8266: https://github.com/nodemcu/nodemcu-firmware

comment 11y ago · link · parent

Yes - at Webflow I believe 4 of us were hired from the who wants to be hired / who's hiring posts.

165.

Building an Rdio Flash Cross-Domain Exploit with FlashHTTPRequest(thehackerblog.com ↗)

1 points · by nmjohn · 11y ago · discuss

comment 11y ago · link · parent

Amazons URL's are actually quite interesting -

    Original: 
        http://www.amazon.com/Structure-Interpretation-Computer-Programs-Engineering/dp/0262510871/

    Equivalent:
        http://www.amazon.com/dp/0262510871
        http://www.amazon.com/dp/0262510871/something-else
        http://www.amazon.com/something/dp/0262510871
        http://www.amazon.com/something/dp/0262510871/something-else
It appears so long as 'dp/0262510871' is in the url (without dp/# appearing before it, but a second one after is fine) it works.

comment 11y ago · link · parent

This link should take you there directly: https://docs.google.com/document/d/1Hvxf6NMPaCUd-1iqm_968SuH...

comment 11y ago · link · parent

I use zsh per directory history [0] as well as this cron job I have set to run hourly:

    #!/bin/bash

    cd /Users/nmjohn/.directory_history \
      && git add . \
      && git commit -m "Automatic Backup: `date`" \
      && echo "Files Modified:" \
      && git log head -1 --name-only --pretty=format:"" | grep "[^\s]" | awk '{print    "\t\t"$0}' \
      && echo ""
It's not bullet-proof, but since I never manually touch the directory it's worked without hiccup for the last ~6 months. When trying to remember the syntax to a rarely used function (or even the name itself) or coming up with a gnarly awk/sed/grep command, it's been incredibly helpful to have fairly granular search capability to go back and find them weeks later.

Also ctrl+g in a terminal toggles between per directory history and global history which makes context switching easier when switching to a project not touched for a while.

[0]: https://github.com/jimhester/per-directory-history

comment 11y ago · link · parent

Whats frustrating is when you have customers who are also down because of the outage - but when you say Amazon is experiencing severe outages causing 50% of our requests to be dropped and there's not much we can do, it makes us look pretty bad when they they go to the amazon dashboard and only see "Elevated Error Rates."

comment 11y ago · link · parent

I'm seeing it as well - majority of connections are being dropped for us atm

  The Amazon S3 team recently completed some maintenance   
  changes to Amazon S3’s DNS configuration for the US STANDARD region on 
  July 30th, 2015.
    
  You are receiving this email because we noticed that your bucket
  is still receiving requests on the IP addresses which were removed 
  from DNS rotation. These IP addresses will be disabled on August 
  10th at  11:00 am PDT, at which time any requests still using
  those addresses will receive an HTTP 503 response status code.
  
  Applications should use the published Amazon S3 DNS names for 
  US STANDARD: either s3.amazonaws.com or s3-external-2.amazonaws.com
  with their associated time to live (TTL) values. Please refer to 
  our documentation at: 
  http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region 
  for more information on Amazon S3 DNS names.
Something to do with that perhaps? AWS sent us that last thursday

comment 11y ago · link · parent

> Amazon is investing up to $100 million to support developers, manufacturers, and start-ups of all sizes who are creating unique and innovative experiences designed around the human voice. Whether that’s creating new Alexa capabilities with the Alexa Skills Kit, building devices that use Alexa for novel voice experiences using the Alexa Voice Service, or something else entirely, if you have a visionary idea, we’d love to talk to you.

comment 11y ago · link · parent

Have you ever used osx for an extended period of time?

I was in a similar situation to you and I caved and got a macbook when I started my job. I absolutely love it.

I have my linux desktop at home that I use perhaps 15% of the time, while at first most of the time I was wanting my linux features on OSX, anymore, its the other way around.

My point, is I absolutely did not give osx a fair chance before I finally switched, and I was missing out for years. So I suggest at least consider it.

Having said that - it shouldn't be an issue to get the workstation that is going to make you the most productive - I guarantee you'll get pushback on the matter in a similar vein of this comment, but you should be able to get the computer you need.

comment 11y ago · link · parent

I was hoping it was just a bad title - but it doesn't appear to be as the founders use the word lossless themselves.

It's concerning because it either means they don't actually know what lossless compression is and believe they are doing it - or they are engaging in borderline fraudulent marketing.

Given they actually built an impressive product for subset of images it works with, I'm going to assume it isn't the former.

I can see their reasoning: "it doesn't appear to be any lower in quality because our brain focuses on the face to determine it, so you get the same effect as lossless compression ergo: lossless compression" - but that still feels rather slimy to me and is a great example of marketing trying to repurpose actual technical terms to fit their product.

comment 11y ago · link · parent

Interesting - 6 months ago or so I was monitoring all transactions on a handful of altcoins' blockchains in regards to which transactions were going in and out of exchanges. Because the number of transactions per block were a number of orders of magnitude lower than bitcoin, it was far easier to keep an accurate index of which addresses belong to a given exchange without relying on a bug in BitGo.

I kept a running tally of coins in/out per hour, 6 hours, and day. I could with fairly high certainty predict most large dumps 5-30 minutes before they occurred (delay before deposit is confirmed) and then immediately sell myself while placing a buy order for 5-10% lower depending on the size of the deposit.

I also started tracking the exact deposit addresses being used - and more importantly, which ones get reused (a crazy high percent) - which let me correlate market behavior to an individual's actions. For example, address X just had a very large deposit. 6 blocks later, there is a market sell order placed for the exact amount deposited and this same behavior happens every time coins are deposited to the given address.

I can then basically add a trigger to automatically pre-empt the likely incoming dump with one of my own and then buy back for 5% less.

The biggest problem was the market cap and transaction volume was just too small to make much money relative to the risk. However if one could do this same analysis with bitcoin, it could be extremely profitable.

comment 11y ago · link · parent

> What about the non-issues that are reported with complicated conditions but don't actually work? Just because you can throw out the obviously bad items doesn't mean the rest are real.

Yes. There will be some which don't fit into the overly simplistic categories I provided.

However in what I've seen the complicated condition requiring reports which turn out to not actually be bugs are rare enough where they aren't relevant to the discussion.

> Exploiting it is rather different from selling it, though, right? And since a vuln in a website can literally be closed immediately, and PayPal's got whole divisions dedicated to preventing and undoing the damage you can do even with "account takeover", it'd be rather much a risk to pay someone cash for a vulnerability. At the first slip, the value drops to $0. Plus all the issues of verifying the bug and establishing trust for both parties. Seems rather difficult.

You are hung up on what was an arbitrary example.

My point simply is if the reward for serious vulnerabilities is orders of magnitude higher if the researchers chooses the black hat instead of the white one - the overall result is a huge net negative for the world.

comment 11y ago · link · parent

> 3. I'm sorry, but you lose credibility by claiming most security reports can be qualified in a minute or less. You can certainly throw out many in a similar time frame, perhaps five minutes, but real vulnerabilities? No.

That was exactly what I was trying to convey: real vulnerabilities can easily be separated from non-issues quite quickly because the later mostly entail things which can be checked in a matter of minutes.

> You will never receive $100,000 for selling a vulnerability in PayPal. You probably couldn't even find a buyer for it on the "black market."

$100,000 may have been slightly inflated, but with a bit of creativity it isn't that hard to believe. Orchestrated correctly one could walk away with a few million dollars from exploiting such a vulnerability.

> This is all to say that I believe your outlook is not consistent with reality, with all due respect. Bug bounties are not a simple decision to make. I've seen development teams swamped, overwhelmed and jaded from the reports they receive.

Or perhaps you and I simply have experienced different realities - as I have not seen development teams swamped from them and have seen major security improvements come about as a direct result to a bug bounty program.

Of the perhaps 15-20 companies (albeit all < $1b market cap) I've spoken/worked with in regards to bug bounty programs or security in general - none of them were receiving more than a handful of reports a week which took up perhaps 2 hours of an engineer's time.

comment 11y ago · link · parent

> let the 7-figure job offers roll in.

I would know far more millionare engineers/hackers if that was actually true

> go to federal prison for 30 years

If one was talented enough to find such a vuln, it is hardly a stretch to say they would be smart enough to avoid getting caught.

comment 11y ago · link · parent

So when I find a bug in say Paypal which allows complete account takeover and could sell it to an organized hacker group for say $100,000 or report it to Paypal "because I'm invested in seeing it fixed" and receive nothing - that is only an easy decision for the whitest of white hat hacker.

Properly designed bug bounty programs are a cornerstone to any company who remotely cares about the security of their product, period.

The idea of misaligned incentives due to poor bug reports being free to submit is ignorant - and worse toxic, because it sounds so true to an executive who has no actual understanding of the issue.

A quality bug report should take no more than 1 minute for a reviewer to look at and know if it's really a bug or not. If it can't, it should be rejected saying provide more clear details. For example a dom based xss attack could be reported with just a target URL and it is quite clear what the problem is. That would take 10 seconds to analyze.

Additionally, most bugs reported to most decent sized companies are reported by someone who has previously reported a bug to the company before. If someone is constantly reporting good bugs or the opposite, its quite easy to prioritize which of those individuals gets their emails read first.

comment 11y ago · link · parent

    ➜ curl -i https://api.exchange.coinbase.com
        HTTP/1.1 404 Not Found
        Server: cloudflare-nginx
        Set-Cookie: AWSELB=7541......;PATH=/
It looks like they are hosted on AWS and only provide access via cloudflare.

Given that, I don't think offering paid access to be closer is really relevant.

The closest you can get physically would be to find the availability zone - however your traffic is still going to be routed through cloudflare, so you might be better being closer to the cloudflare servers handling your requests.

comment 11y ago · link · parent

And it just keeps going, love it

    ➜  ~  curl http://crashfirefox.com/

    ....................../´¯/)
    ....................,/¯../
    .................../..../
    ............./´¯/'...'/´¯¯`·¸
    ........../'/.../..../......./¨¯\
    ........('(...´...´.... ¯~/'....')
    .........\.................'...../
    ..........''...\.......... _.·´
    ............\..............(
    ..............\.............\...
        SNITCHES GET STITCHES

    ....................../´¯/)
    ....................,/¯../
    .................../..../
    ............./´¯/'...'/´¯¯`·¸
    ........../'/.../..../......./¨¯\
    ........('(...´...´.... ¯~/'....')
    .........\.................'...../
    ..........''...\.......... _.·´
    ............\..............(
    ..............\.............\...
        SNITCHES GET STITCHES

    ....................../´¯/)
    ....................,/¯../
    .................../..../
    ............./´¯/'...'/´¯¯`·¸
    ........../'/.../..../......./¨¯\
    ........('(...´...´.... ¯~/'....')
    .........\.................'...../
    ..........''...\.......... _.·´
    ............\..............(
    ..............\.............\...
        SNITCHES GET STITCHES


    ➜  ~  curl http://crashfirefox.com | wc -l
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 3613k    0 3613k    0     0  2020k      0 --:--:--  0:00:01 --:--:-- 2019k
      120000
1
567
13