Idiocracy
No one can have missed the outrageous idiocracy in Italy which simply left me with a single question:
If they had warned, and panic had ensued, and people had gotten killed while trying to escape, and no quake would have hit… then what?
… Seems like a case of “damned if you do, damned if you don’t”…
The US is implementing a “six strikes” type of deal (similar to the ?now defunct? French HADOPI) and apparently the “independent expert” used to draft a “reasonable” law might not have been so independent as they should have… being a former RIAA lobbying firm… The corruption surrounding the copyright industry is truly sickening.
I am probably waaaay to paranoid, but this reeks of false flag operation. Gotta keep the populus scared of them terrorists now don’t we?
Shut up and play nice: How the Western world is limiting free speech.
More and more I am beginning to think that the correct course of action is to completely boycott anyone who use the DMCA since it is used as a sledgehammer instead of a scalpel. I think this comment sums it up pretty well.
Surveillance / Privacy
Outsource government and corporate surveillance to people themselves… great…
Wait! Wait! Wait! You mean to say that geo-tagging can compromise ones privacy and security?!?! Nooo, who’d have thought?
Cool stuff
A distributed twitter thingy I think it’s cool and all, really cool, but I’d still go for identi.ca.
Sleipnir is a small proxy which you run, to intercept requests and serve local files instead. Not sure when or where I’d find use for it, but interesting concept none the less.
A rather good run-through of various tools for UNIX-like systems
Jeff Atwood wrote a post about the future of Markdown, and much have since been written and people have had opinions but from one of those discussions, what I found most interesting was Pandoc.
Stuff I learned
Great answer on how to better control node placement in a graphviz diagram.
And another answer on a similar question, although this should probably be considered an ugly-hack. Then again, there’s a time and place for everything.
Last week I prodded in some Perl code, and found myself unable to visualize just what the heck the internal structure of a variable looked like, and thought to myself Had this been PHP, I would have used var_dump(); I wonder if Perl have something similar?
Of course Perl has something similar.
use Data::Dumper; print Dumper $my_mystery_var;
Source: Perl Mongers
Race-condition-free deployment with the “symlink replacement” trick
Food for thought
Why we can’t solve big problems.
Here’s a peculiar productivity hack: Hire a person to slap you in the face.
Compliance: The boring adult at the security party.
Why we buy into ideas: how to convince others of our thoughts
Vim and adding licenses to code
Thursday, March 31st, 2011A while back @psquid gave me a new perspective on things.
I can’t remember what the discussion was about, but it left me with the realization that my current system (of having file type templates in vim coming with predefined licenses (GPL v3)) was flawed.
The thing I believe he got out of the discussion was that one could use snipMate to define ones own shortcuts for inserting licences into source code.
I couldn’t tell you why I hesitated so long before trying it, since the idea seemed sound. But when I did try it I came to two conclusions:
(1) It wouldn’t work the way I wanted it to , or (2) at least not without duplication.
Since I on occasion program both Python, Java, PHP, Bash and, infrequently, Erlang, in order to have licensing snippets (think GPL3, BSD, and the odd CC By-SA) I’d need to put these license-blurbs into each snippet file that should support it (since Python don’t do C-style comments, and Erlang-style comments are completely different as well)
So what I wanted was some way to call a Vim command (say NERD Commenter ( ,,cs )) once a certain snippet (the license blurb) had been expanded.
I am pretty sure this can’t be done in an easy way, so I gave that idea up. Mapping a key, say F3, to a user defined command in my .vimrc, however, would be much easier.
Something along the lines of:
I am not well-versed at all with scripting vim, so I have probably made some embarrassing mistakes (for one, I should probably read up on what the heck that exclamation mark at the beginning of the function does. Please do point out any mistakes.)
All in all I am pretty content with this solution, but if someone know of a way to trigger a command after a snipMate expansion (and only on specific expansions, and only on the specific expanded lines) I am all ears.
(This since there is a _.snippet which seem to be included in all instances regardless of file type, which means I could still have the licenses in one place, defined once, but used with different comments anyway, which would be awesome)
:wq
Tags: GPLv3, license, NERD Commenter, snipMate, Vim
Posted in English, GNU/Linux, Tools, Uncategorized | Comments Off