Wifi to the people

There’s “free” wifi in places like cafes, airports, shopping centres. However, lest you get too comfortable or you start thinking you can get things for free, this is usually limited to something stupid like fifteen minutes.

This system works based on your device’s MAC address. MAC, standing for media access control (have you ever heard of anything so in need of fucking with) is a unique identifier for your network interface that tells a network that you are an individual user. When you’ve had your time, the network kicks you off based on your MAC address, usually requiring you to pay for more time or give them your email address or other such bullshit.

If you change your MAC address and reconnect, the network thinks you’re a whole new person and will give you another lot of free time. Repeat until you’re done reading or doing whatever it is you’re doing.

If you want to see your current MAC address, open up a terminal and enter this**:

$ ifconfig en0 | grep ether

… and you’ll see some hexadecimal number printed, like d4:c2:ad:45:bb:2a. That’s your MAC address, and this is what you want to change. How, you ask? Well …

I wrote a Python script to change my device’s MAC address. Here it is.**

** SOME CAVEATS:
1. This was written for OS X running Yosemite. Yosemite uses en0, some earlier versions use en1. Google and check. This is self-help, people.
2. Depending on your version of OS X you may need to disconnect from your Airport for this script to work. Follow the instructions in the comments of the script linked above.
3. This was written in ten minutes and tested on one machine. Doesn’t work? Google it. This script contains the bones of running commands from a Python script, you should be able to fill in what works for your own setup.

Save this somewhere as a Python file, calling it something you’ll remember like mac-n-cheese.py (use whatever you want). To run it enter this on the command line (this is assuming you named it mac-n-cheese.py but use whatever you called the file, and the right path to wherever you saved it):

$ python3 path/to/location/mac-n-cheese.py

Enjoy your wifi.

Trashing the trash.

I plugged in this external board today. It’s supposed to have a capacity of 16MB and I needed all sixteen. There were a few files on it so I deleted those, and emptied my system trash can. That should have done the trick. (I’m sure you see where this is going.)

Try to upload to the board: No space! I inspect it and find out that it’s still nearly full, 14MB on it, despite me doing all the right things to delete what was on it.

Fuck you, computer.

So, let’s take a trip to the Land of Wind and Ghosts, where files live on long after you’ve killed them.

sis-transis$ cd /
sis-transis$ ls Volumes/
mainDrive externalBoard
sis-transis$ cd externalBoard
externalBoard sis-transis$ ls
externalBoard sis-transis$

List: nothing. O rly. Time to look in the corners.

externalBoard sis-transis$ ls -a
. .. .Trashes

Trashes. You little fucker. Get in the sea.

externalBoard sis-transis$ sudo rm -rf .Trashes

Presto: Available space, 16.6MB.

As always, fuck you computer, but today fuck that Trashes file in particular.

Mac Homebrew and avr-gcc woes


checking whether clang++ accepts -g... yes
checking whether g++ accepts -static-libstdc++ -static-libgcc... no
checking for gnatbind... no
checking for gnatmake... no
Press ENTER or type command to continue
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
Press ENTER or type command to continue
checking for objdir... .libs
checking for the correct version of gmp.h... yes
checking for the correct version of mpfr.h... yes
checking for the correct version of mpc.h... yes
checking for the correct version of the gmp/mpfr/mpc libraries... yes
checking for version 0.10 of ISL... no
checking for version 0.11 of ISL... no
checking for version 0.12 of ISL... no
configure: error: Unable to find a usable ISL. See config.log for details.

Some background here, I’ve been trying to get the toolchain for my mechanical keyboard set up but for some reason when I was using homebrew I could never get the avr-gcc installed due to a failed isl dependency. No matter what I read and tried I couldn’t get the make script to use the right isl version. I installed and uninstalled isl lord alone knows how many times. I installed and uninstalled the right version of isl012 but couldn’t link the headers correctly. Even the last resort of a symbolic link in my opt folder did nothing.

I have now fixed it.

All you need to do is:

$brew edit avr-gcc

Change the two lines depends_on 'isl' and "__with-isl=#{Formula["isl"].opt_prefix}" to isl012 and you’re good to go.

$brew install avr-gcc

It *should* install the dependency for you and have the bonus of not making your other build chains break due to rolling back. No more failing out on an implicit repository head too far ahead of the make file. I wish there was a way of switching to a previous stable version in homebrew without having to tap formulas using the git switch trigger in a one liner as standard. Something like $brew switch isl 012 would be good but for some reason only some repos support that syntax, postgresql for example.

Seriously, fuck you computer.