Overooped

More of a programming nerd than is strictly healthy. See also {nevyn.nu, thirdcog.eu, twitter}

Projects

Wed Nov 4
2009
GPYOW: Inverted Halo Edition. Because I’ve always wanted to do a GPYOW.

GPYOW: Inverted Halo Edition. Because I’ve always wanted to do a GPYOW.

Thu Oct 22
2009
lucius:

I just redesigned felttip.tumblr.com based on Mac OS 9.

That design is AWESOME! You win.

lucius:

I just redesigned felttip.tumblr.com based on Mac OS 9.

That design is AWESOME! You win.

Tue Oct 20
2009
[PHP is] ‘quick- and-dirty’ elevated to a religion. @jmweh

Radiotjänst slösar skattepengar för att få folk att betala tv-innehav fastän de inte behöver

Skrev just ett argt brev till Radiotjänst, efter mina försök att säga upp tv-innehav.

Ni har en online-tjänst, men det går inte att avanmäla tv-innehav därinne. Ni har en telefontjänst (med det sämsta meny-system jag varit med om). Telefonkön specifikt för att säga upp tv-innehav var *38 väntande lång*. Hur många skattefinansierade anställda har ni egentligen på att ta emot avanmälningar? Hur många hundratusentals skattekronor går till detta, bara för att ni saknar en enda liten knapp inne på webbtjänsten?

Det gör mig riktigt förbannad. Vänligen åtgärda och sluta slösa pengar.

Inte nog med detta slöseri, de har också börjat ignorera mail från informationsfrihet.se — jag försökte avanmäla via deras formulär, men fick ingen respons från radiotjänst.

Wed Oct 14
2009
 The write-compile-test cycle is very very tedious when doing iPhone development on the device, because the “compile” step needs to include “install on device”, which can be very, very slow. It can take up to a minute, depending on how many apps you have installed and the current cycle of the moon. Imagine, then, doing tiny interface changes and you want to see how that tiny fix changes the UI (which sometimes you really need to do on the device to get a feel for it) — ten tries changing an animation delay could mean ten minutes of just waiting for installation. If you’re jailbroken, there is an easier faster way.


In Cydia, install ldid, rsync and ssh

Follow this guide to install an ssh key pair on your iPhone, so that the script can install the app without asking for password.
Add an additional build target to your app, and call it “Upload” or something.
Make that build target depend on your real app (as in the picture above)
Add a “run shell script” build phase, and give it this script:
export DEVICE_NAME=Mishimazu.local
rsync -avz "${CONFIGURATION_BUILD_DIR}/${PROJECT}.app" root@${DEVICE_NAME}:/Applications/
ssh root@${DEVICE_NAME} ldid -s "/Applications/${PROJECT}.app/${PROJECT}"

Replace “Mishimazu” with the name of your iPhone.
Change your active target to “Upload”, and build as usual.

A few notes though.

This script does not launch the app, you’ll have to do that yourself.
You don’t get the console routed to Xcode. Open up the Console in the Organizer for a workaround (not as good though)
Xcode debugger won’t work
File locations might have changed! You no longer have your private uuid bundle with your documents, but rather need to place documents and related things in /var/mobile. It’s possible NSSearchPathForDirectoriesInDomains will figure the right paths out for you, I haven’t tested; just make sure you’re aware of this
You are no longer sandboxed. This might change assumptions you do in code


In short, only use this deployment method for simple things, and install as usual when you need to really make sure things still work as they should, before a beta or appstore deploy. Of course, if you’re targeting the Cydia store or similar, that doesn’t apply.

The write-compile-test cycle is very very tedious when doing iPhone development on the device, because the “compile” step needs to include “install on device”, which can be very, very slow. It can take up to a minute, depending on how many apps you have installed and the current cycle of the moon. Imagine, then, doing tiny interface changes and you want to see how that tiny fix changes the UI (which sometimes you really need to do on the device to get a feel for it) — ten tries changing an animation delay could mean ten minutes of just waiting for installation. If you’re jailbroken, there is an easier faster way.

  1. In Cydia, install ldid, rsync and ssh
  2. Follow this guide to install an ssh key pair on your iPhone, so that the script can install the app without asking for password.
  3. Add an additional build target to your app, and call it “Upload” or something.
  4. Make that build target depend on your real app (as in the picture above)
  5. Add a “run shell script” build phase, and give it this script:
    export DEVICE_NAME=Mishimazu.local
    rsync -avz "${CONFIGURATION_BUILD_DIR}/${PROJECT}.app" root@${DEVICE_NAME}:/Applications/
    ssh root@${DEVICE_NAME} ldid -s "/Applications/${PROJECT}.app/${PROJECT}"
  6. Replace “Mishimazu” with the name of your iPhone.
  7. Change your active target to “Upload”, and build as usual.

A few notes though.

  • This script does not launch the app, you’ll have to do that yourself.
  • You don’t get the console routed to Xcode. Open up the Console in the Organizer for a workaround (not as good though)
  • Xcode debugger won’t work
  • File locations might have changed! You no longer have your private uuid bundle with your documents, but rather need to place documents and related things in /var/mobile. It’s possible NSSearchPathForDirectoriesInDomains will figure the right paths out for you, I haven’t tested; just make sure you’re aware of this
  • You are no longer sandboxed. This might change assumptions you do in code
  • In short, only use this deployment method for simple things, and install as usual when you need to really make sure things still work as they should, before a beta or appstore deploy. Of course, if you’re targeting the Cydia store or similar, that doesn’t apply.

Mon Oct 5
2009
Thu Oct 1
2009

Warning: When replacing the glass on an iPhone 3G, don't use pdaparts.com's video!

Pdaparts.com has a video showing how to replace the glass on an iPhone 3G. These instructions are INVALID and will risk destroying your LCD. Please look at leewaterman’s HD video instead.

Specifically, what Pdaparts do wrong is they try to remove the LCD from the frame by loosening it from the bottom, breaking it free from the frame. However, the latches holding the LCD in place are placed along the edges. If you pry too hard along the bottom, you will break the crystals in your LCD! This will look like slightly colorful ink or oil blots where and near where you applied too much pressure.

The correct procedure is to unhinge the latches along the edges. leewaterman’s video shows exactly how this is done.

Mon Sep 14
2009

Jag jobbar på argument jag kommer få dra varje dag framöver.

Jag kommer rösta Pirat om ett år. Det är det enda partiet som förstår, och förstår konsekvenserna av, att kostnaden av en digital kopia är *noll*. Inte “billigt”, *noll*.

Tänk er innan telefonen fanns. Det gick nog väldigt bra för Posten; enda sättet att kommunicera på distans var att skicka brev. Så plötsligt kom då telefonen. Postens roll minskar plötsligt till att skicka paket och kanske en tiondel så många brev. Posten blir väldigt arg på denna nya teknologi — hur ska Posten nu överleva?! Det enda sättet för Posten att överleva är att lobbya för att illegalisera telefonen, eller hur? De stackars Posten-arbetarna sliter ju hårt; de förtjänar sin lön och en stabil jobbsituation.

När en digital kopia är gratis och omöjlig att skilja från originalet, kan en lag säga att det är förbjudet att kopiera information?

Det är dags för musiklobbyn att bli jäkligt bra på att skicka paket, istället för att försöka illegalisera telefoner.

Sun Sep 13
2009

mmoga.com is a scammer

Or so it seems, anyway; and I can’t say I’m surprised. I bought a Diablo II: Lords of Destruction key from them. The key added fine to my battle.net account, so it seemed legit. However, now that I try to log in a month later, the key is in use by someone else; I assume they resold it.

Sat Sep 12
2009
Fork me on GitHub