Something that a user could follow, step by step, with no prior knowledge but with some experience.
]]>I started out with your stylesheet actually, but eventually I got to annoyed at all the effort that XSLT takes for very simple cases like this one.
The deciding factor was JSON + dynamic language, so Ruby would work as well as Perl here; I guess it would look cleaner at the expense of a longer command. (Python’s not much for one-liners, however.) Of course you’d ultimately put this in a script, so that’s neither here nor there.
As for the spamminess, that was probably because somehow all the underscores in my code block got turned into _ character references, and ASCII characters spelled as NCRs is a popular filter blinding technique. (On both sides of the war, actually – we use it against spammers too, c.f. mailto: hiding.)
% curl -k -u randomphrase:shh -o tweets-#1.json ...
zsh: no matches found: tweets-#1.json
% curl -k -u randomphrase:shh -o tweets-\#1.json ...
[...]
% perl -MJSON::XS -E'...' -- tweets-* | json_xs
zsh: command not found: json_xs
Can't locate JSON/XS.pm in @INC (@INC contains: ... )
.
BEGIN failed--compilation aborted.
Despite the snarky comment above, yes it does work nicely after installing libjson-xs-perl.
Another nice to have would be to resolve shortened URLs – this is probably a lot easier to do in Perl than XSLT…
BTW: Your comment was marked as “Very Spammy” by Defensio, and had to be manually rescued. This makes me sad.
]]>[01-32] instead of [1-32] to get filenames with correctly sorting names and with the -o switch you can clean up the filenames further.Bottom line:
curl -k -u user:pass -o tweets-#1.json 'https://twitter.com/statuses/user_timeline.json?count=100&page=[01-32]'
perl -MJSON::XS -E'@s=map{local@ARGV=$_;@{decode_json<>}}@ARGV;delete@{$_}{qw(user source)}for@s;say encode_json\@s' -- tweets-* | json_xs
Tad easier…
]]>In creating restrictions, carriers push a larger proportion of users into buying addons to their contracts or into using the expensive bit of the tariff (international calls by banning net phone apps, etc), so driving up their Average Revenue Per User. Remember, the better the iPhone, the more Apple can squeeze out of the carrier and the more the carrier has to raise the ARPU to get their profit margin back. So Apple leverage the hype they can build to get a better deal from the carrier. And the carrier know that if you’re spending $40/m on a contract, you probably won’t mind another $5 for tethering.
Yes, they are all there to take your money. That’s Big Business at work. The terms of the deal to prevent tethering, to quietly throttle certain apps, were all written into the contracts at the negotiating table. This was a done deal a long time ago. As time goes on, and more apps and uses are prevented, the terms of that deal will be slowly revealed, clause by clause. Apple has not just turned on its loving fans, it has already sold them. Did you expect anything else?
]]>if (hand[0] != licorice)
continue;
i.e. rule out all cases where the one that you put on the table isn’t a licorice candy, and that would give you the 1/3 probability.
]]>