31 March 2015

Software: GCalCLI (and how to replace straight quotes with SED)

GoogleCL was a nice program to get quite a bit of your Google information in and out of the cloud via the commandline instead of a bloated interface. For example, I used it to pull down my agenda from Google Calendar and then incorporate that into all sorts of fun things.

It is (was, depending on when you read this) hosted on Google Code (and quite a few people have exported it to GitHub - here's one example.

But there's been problems with the API for the Google Calendar for a while. (Non-tech version: It stopped working.)  In comes GCalCLI, which uses API version 3 (Non-tech version: it works). 

It is also a LOT more powerful than GoogleCL's version was - especially in terms of customization and display.  Take a look at this screenshot from the repository:


This works really well for me, except for one thing - I often pipe the output through other scripts.  Many of which use "straight" quotation marks to mark where they are supposed to start and stop doing things.

...and many of my events (like Bob's birthday or Go to "the thing" at someone's place) also include straight quotes, so my scripts fail.

Luckily SED (mentioned here before) comes to the rescue.  (Presuming your terminal supports UTF-8, of course.)

gcalcli agenda | sed "s/'/’/g" | sed 's/"\(.*\)"/“\1”/g'

Obviously, this little trick will work anywhere you need to turn straight quotes into smart quotes (as long as they're paired), and you can swap the straight and smart quotes in order to reverse the effect when you need to remove smart quotes.

26 March 2015

The Truth About Religious Discrimination Laws

Here's the simple truth: 

The people who fight for these discriminatory religious laws (like Indiana's RFRA) in the US are the same ones who scream the loudest about Sharia law, people saying "happy holidays", or having a Wiccan headstone in Arlington.

They are not talking about religious freedom. 

They are talking about their religion being supreme.  They are talking about their religion being the law of the land.1


I hope that we will overturn such institutionalized bigotry, and will do what I can to hasten that time.

If you are in Indiana and find yourself a target of this kind of discrimination, go to lambdalegal.org/help and Keeping Track.
http://www.lambdalegal.org/help


In the meantime, I will look forward to the wailing when one of the supporters of this bigotry finds themselves unexpectedly being discriminated against because of someone else's beliefs. 

Perhaps that will cause them to re-evaluate their support.


1 You get a whole new perspective on what "their religion" means when you realize that the faith you were brought up in doesn't count as "Christianity" for a non-trivial percentage of American Christians.

24 March 2015

Bandits Getting Sneaky: Using randomizers and multiple forum posts to pirate material

Here's a neat trick some bandits (here's why I say bandits instead of pirates) pulled off:  They managed to have a single URL lead to one of (at least) six different forums where there were planted posts leading to their download service.

I was able to capture images from OpenMamba, Kindle Users Forum, The Comic Book Forum, cre8asite forums, and two that didn't have the name in the header.  Screen caps at the bottom of the post, or look at this album on imgur: http://imgur.com/a/ERmCu#0

So when you clicked the original url, it took you to a webpage that redirected (you can see the source here on github: https://gist.github.com/uriel1998/ba3bb7c2081a068a320c).  Each of the forum pages had a link in it that also led to a randomizer that took you to the download service (and clearly with a referrer code).

Which means these suckers are bandits - and are also probably generating false clicks for the download service as well (and thus racking up extra cash).

While I can (and have) issued a DMCA notice to the download service, this kind of redirect is something that I'm not sure how we can effectively deal with.  I doubt the forum owners are really aware of what's going on (yet - share this post with them!) since there's clearly posts saying "don't download stuff illegally" in several of these screencaps. 

And while they might become aware of the problem and have some strong moderation, that just means the problem moves elsewhere, to less moderated forums.

Any thoughts, gang?