Poesie und Philosophie über den ganz normalen Wahnsinn unseres Lebens. Poetry and philosophy about the everyday madness in our lives.

Archiv der ‘Tech-Stuff’ Kategorie


Psalm 23 in C#

Dienstag, Dezember 1st, 2009

Und ob ich schon wanderte in finsteren Globals,
so fürchte ich keine Access Violation,
denn Parameter sind bei mir.
Deine Referenz und dein Call-By-Value spenden mir Thread-Safety.
Du bereitest mir ein Invoke im Angesicht meiner Kapselung.
Du forkest mein Main mit Threads und schenkest mir echtes Multitasking.

Changing MAC on Macs / Mac OSX

Montag, November 23rd, 2009

Yes there are some pretty good howtos out there that explain how to temporarily change the MAC address of your ethernet device on a Mac. I’ll just repeat what I learned since a friend of mine seems not to find the sites i did.
I did this on Mac OSX Leopard and Snow Leopard. I don’t know how whether it’s the same on Tiger or older versions – just get a newer Mac pal, you want it anyway!

So here’s how it works for a copper interface (wifi: see below):

  1. Open a terminal. Personally, I prefer iTerm – but any terminal is fine.
  2. Become super user. Since I don’t want to type sudo for every freakin’ command I do this by entering:
    sudo su
    Enter your user password. Enjoy the power you gained for a second and remember: You can really really damage your system configuration as root user, so watch out!
  3. Check your network settings with:
    ifconfig
    Find your network adapter. On my Mac en0 is the copper wire nic and en1 is wifi.
    You recognize your copper interface by checking whether it can do 100baseT or even 1000baseT (it’s written next to it). Yeah, that’s a lame description but it works since there is no wifi that does 1000baseT (yet).
  4. Change the MAC address by entering something like
    ifconfig en0 ether af:fe:af:fe:af:fe
  5. Verify changes with
    ifconfig | grep en0

So you want to change the MAC address of your wifi device. That’s a little bit more tricky. Here comes:

  1. Follow steps 1-3 of the above guide to gain godlike powers and identifiy your wifi interface
  2. Make sure your wifi device is running (Check wifi symbol in top right corner in Finder). It has to be running, you can’t change the mac of a device that is down.
  3. Disassociate the device from all networks. There is a tool to do so called airport. No worries, you already have that tool – you just didn’t know. It’s actually located here /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport. So that’s very unhandy – let’s change that.
    ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport /usr/bin/airport
  4. Now you can just type the airport command from wherever you want. Nice huh? Well anyway. Disassociate all wifi networks now. Type
    airport -z
    or
    airport --disassociate

  5. Change the MAC address by entering something like
    ifconfig en1 ether af:fe:af:fe:af:fe
  6. Verify with a look at the output of
    ifconfig

So you’re all set. Get crackin’ … I never said you should – but it would be wise to change your MAC before doing so, since the MAC is a unique identifier to your device.

Use the comment function if something doesn’t work as you wished or if you just find me awesome and want to tell me exactly that.

One more thing: I used af:fe:af:fe:af:fe as MAC address. This is very unwise since it looks nothing like a MAC address. Most MAC addresses start with 00:01 or something like that. Just be creative but not fancy. Fancy gets you feds – and you don’t want ‘em.

LaTeX: tables, tabular, tabularx – FML

Montag, Juli 20th, 2009

Nothing poetic this time. Just wanted to report something in the hope this might someday save someones sanity :-( .

Currently I’m working on my bachelor thesis and since I think of myself as a expert this has to done in LaTeX. So I’ve been writing for a couple of days and everything seemed nice and easy. It all started when I tried to create a table. No matter what I did, the table didn’t care for page margins or anything. I searched for any possible solution and tried everything – nothing seemed to work. It also didn’t matter what tabular-environment I used (tried: tabularx, longtable, supertabular, tabular*, …)

So out of frustration (after three f*****g days) I started throwing out my \usepackages and suddenly it worked. I narrowed it down to the pdfsync package. Well now one might ask “Wait! What has pdfsync to do with tables” and I can’t give an answer to that – because there is no logical explanation if you’re not a TeX freak and understand the fundamentals. Anyway – remove \usepackage{pdfsync} from your document and you should be fine.

Oh yeah – before I forget, I’m using TeXLive – have to actually – because I work on Mac and Windows – try that with MiKTeX :-) Editor is WinEdt – and Syncing with SumatraPDF-Viewer works even after removing the pdfsync package – now isn’t that irony?

Hope this helps