vim plugin of the month, diff chunks of files

This vim plugin can run vimdiff, on two versions of a function in different files, etc.

http://www.vim.org/scripts/script.php?script_id=3745

Usage:

1. visual select some function in one file
2. :’<,’>Linediff
3. select the other version of function in other (or same) file
4. :’<,’>Linediff

It will open a new tab with vimdiff on those two sections, then after you close the tab it puts the sections back in the original files.

Recommended install goes like this:

mkdir -p ~/.vim/autoload ~/.vim/bundle
curl 'www.vim.org/scripts/download_script.php?src_id=16224' \
  > ~/.vim/autoload/pathogen.vim
echo 'call pathogen#infect()' >> ~/.vimrc
git clone git://github.com/AndrewRadev/linediff.vim.git \
  ~/.vim/bundle/linediff

The ‘pathogen’ thing is not a virus, it’s a vim package manager, can make it easier to install and update plugins.

Posted in Uncategorized | 3 Comments

Austrlia’s Corrupt Political System

to Mr. Adam Bandt, MP for Melbourne

Thank-you for your great work as the Greens MP for Melbourne.  You must be happy to have achieved such a great victory for the Greens, by getting elected to the so-called “house of representatives”.

I want to complain about the electoral system, and I’m going to use some strong language, which is in no way directed to your good self.

If 40% of all people in each electorate vote Labour, and 51% vote Liberal/National, for the “house of representatives”, then Liberal/National would win 100% of the seats, and no one else would win any seats.

This is FUCKING CORRUPT, if I may get angry. Is it “REPRESENTATIVE” that minority parties such as the Greens are almost totally unrepresented, due to a moronic system of election?

As you know, this is a big problem not just in theory – the Greens won 11.76% of vote in the 2010 elections, which should entitle them to 18 seats out of 150 in the ‘lower house’, but they have only one seat which is yours.  I’m proud to live in Melbourne where the Greens appear to be the majority party, but where the hell are our other 17 seats?

Can we do something about this?  I suppose a referendum would be needed, but with a decent public exposee, it could hardly fail.

It would even be better to forget about the electorates entirely, and say Greens won 13% = 20 seats, Labour won 50 seats, liberal won 50 seats, now please figure out amicably which of the seats you would prefer to have, guided by which seats had the highest number of votes for each party.

I am going to contact several online petition orgs to raise this issue, it really makes me furious.

Any mathematician would laugh or cry at the stupidity of the electoral system for our house of representatives.  I’m ignorant, but I wouldn’t be surprised if most other countries have equally idiotic systems for electing their government leaders.

Thank your sir for reading my rant.  I will also send it to your email for your convenience, if you wish to respond by email!

Sam Watkins
Melbourne Australia.

Posted in Uncategorized | 8 Comments

Humble Bundle saves some rainforest, please join in.

Buy these excellent Humble Bundle games, pay whatever you like, and save some real rainforest at $45 for a 1/4 acre block. Now that’s a deal no tree-hugging gamer can refuse!  :)  Please take a minute to support this, even if you’re not a gamer.  http://www.humblebundle.com/

Posted in Uncategorized | Leave a comment

Disabling Secure MUST NOT be possible on ARM systems.

Dear Microsoft,

Hello there.  Please forward this complaint to someone who can understand and reply to it, if you are not that person.  I read in a Microsoft document, that “Disabling Secure (boot) MUST NOT be possible on ARM systems” that ship with Windows 8.

This offends and angers me.  DAMN that “MUST NOT” for a BAD JOKE.

If an OEM wants to ship ARM devices or computers with Windows 8, those devices must be locked to Windows 8, and the user is not allowed to run an alternative operating system such as Linux without resorting to extensive hackery.  This is extremely anti-competitive.

I am a computer programmer – developer – who uses Windows and Linux every day of the working week.  I use Intel, ARM and MIPS computers and devices.

I own many ARM systems, and can code in ARM assembly language.  I have bought an ARM phone, three ARM handhelds, an ARM development board, an ARM e-book reader, an ARM router, and an Acorn ARM computer.  I like ARM.

As a software developer, I have a fairly large disposable income, and spend much of that on computer software and devices.  I bought various Microsoft products, and many computers that shipped with Microsoft operating systems.  My company licenses Microsoft products for us to use at work.  I am a Microsoft customer.

If you maintain this “MUST NOT” clause, I will not buy any more Microsoft products, I will not buy any ‘locked’ Windows 8 ARM devices, and when I buy new PCs and laptops, the manufacturer shall give me a full refund for any unwanted copy of Windows that might have been pre-installed.  I will actively petition other people to avoid Microsoft, because you are behaving like an anti-competitive bad-ass company.

I would never purchase such a stupid locked-down device.  I won’t purchase Apple devices, because they limit the programming languages that may be used on them.  I actively discourage people from buying Apple products, and similarly for Microsoft products now.  Please change this idiotic MUST NOT clause, so that I can continue to be a Microsoft customer.

Posted in Uncategorized | Leave a comment

Disabling Secure MUST NOT be possible on ARM systems.

Dear Microsoft. Hello there. Please forward this complaint to someone who can understand and reply to it, if you are not that person.

I read in a Microsoft document, that “Disabling Secure (boot) MUST NOT be possible on ARM systems” that ship with Windows 8.

This offends and angers me. DAMN that “MUST NOT” for a BAD JOKE.

If an OEM wants to ship ARM devices or computers with Windows 8, those devices must be locked to Windows 8, and the user is not allowed to run an alternative operating system such as Linux without resorting to extensive hackery. This is extremely anti-competitive.

I am a computer programmer – developer – who uses Windows and Linux every day of the working week. I use Intel, ARM and MIPS computers and devices.

I own many ARM systems, and can code in ARM assembly language. I have bought an ARM phone, three ARM handhelds, an ARM development board, an ARM e-book reader, an ARM router, and an Acorn ARM computer. I like ARM.

As a software developer, I have a fairly large disposable income, and spend much of that on computer software and devices. I bought various Microsoft products, and many computers that shipped with Microsoft operating systems. My company licenses Microsoft products for us to use at work. I am a Microsoft customer.

If you maintain this “MUST NOT” clause, I will not buy any more Microsoft products, I will not buy any ‘locked’ Windows 8 ARM devices, and when I buy new PCs and laptops, the manufacturer shall give me a full refund for any unwanted copy of Windows that might have been pre-installed. I will actively petition other people to avoid Microsoft, because you are behaving like an anti-competitive bad-ass company.
I would never purchase such a stupid locked-down device. I won’t purchase Apple devices, because they limit the programming languages that may be used on them. I actively discourage people from buying Apple products, and similarly for Microsoft products now. Please change this idiotic MUST NOT clause, so that I can continue to be a Microsoft customer.

Posted in Uncategorized | Leave a comment

Nika, Sean and I won at Ghost Stories for the first time today, at midnight on Friday the 13th. It’s a great, hard, and scary board game! We bought it at Mind Games in Melbourne. http://sam.nipl.net/ghosts

Posted on by | Leave a comment

JavaScript LAN scanner / CSRF demo

I wrote a JavaScript LAN scanner:

http://sam.nipl.net/code/lan-scan/

It is not at all cutting-edge, just a friendly demo of Cross Site Request Forgery.

The Firefox NoScript extension has a component called ABE, which can help.

Posted in Uncategorized | Leave a comment