Using iPhone with multiple machines

Up to this day, the biggest downside of using iPhone was inability to transfer new music and listening to it via iTunes at work, while the phone was synced with my mac at home. Today it hit me – there has to be an unique identifier, that main iTunes library pushes to the iPhone, and the synchronization can have place only when both fingerprints are identical. So what if the both machines would have the same fingerprints? Turns out – it works!

Go to your main mac, locate your iTunes Library XML file (stored by default at ~/Music/iTunes/iTunes Library.xml) and open it using any text editor. The bit we’re interested in is the hashed string in the second line:

<key>Library Persistent ID</key>
<string>242B31B57412A12E</string>

Copy/note the above string (242B31B57412A12E) and go to your second machine, where you have to create a new iTunes Library (run iTunes while holding ALT/OPT key pushed). I tried to pull this out with a preexisting iTunes Music Library, but without any positive outcome. However creating and editing a fresh library helped to achieve my goal.

new libraryAfter iTunes started up with a blank library, quit it and locate new iTunes music library XML file. Open it with a text editor, remember old hash, swap it with a previously copied one, and save it.

Unfortunately it’s not the end of our work – there’s another place where this hashed string is stored – iTunes Library file. It’s a binary file and editing it is a bit harder, than before. Go get yourself a Hex Editor (freeware Hex Fiend will do the trick), and load the binary.

hex editor

Open Search/Replace dialog (CMD+F), and paste the hash tags appropriately (Find: hash tag from new library, Replace: hash tag from the main machine). Be sure to select Hex search method. The string should be replaced only one time (at offset 0×34h). Save the binary, run iTunes, and connect your iPhone.

From now on you’ll be able to play music from your iPhone via iTunes and update your music without necessity of wiping out contents of your phone.

Published: | Posted in tips | Tagged , , , | 1 Comment

Revolution in web typography is almost here?

Looks like the revolution in web typography will be here faster, than we all suspected. But will it be what people asked for?

Small Batch Inc. announced today Typekit – “The easiest way to use real fonts on your website”. From the scraps of information available today, we know, that Typekit is a platform working with type foundries, that delivers web-embeddable fonts on demand. It’s supposed to be launched this summer with free and paid plans.

With this new solution, new concerns emerge:

  • why would we have to pay for fonts, that we already own? From this point of view, the new EULA, thats enables web-embedding is a definitely better answer for webdesigners (rather than typographers).
  • why overcomplicate easy and obvious things? Instead of simple CSS definition linking external typeface, you’re forced to use JavaScript.
  • will JavaScript take advantage of browser not supporting @font-face natively? (like typeface.js, or cufon)
  • what will happen, when your Typekit subscription will expire, or this particular font will be removed from the library?
  • website vulnerability – it’s external JavaScript for gods sake! Any global/local website modifications, visitor tracking, and data hijacking by anyone, who owns Typekit (takeover anyone?)

For now, we have to be patient and follow @typekit’s updates on Twitter, or wait for theirs newsletter.

Published: | Posted in design | Tagged , , , , | Leave a comment

A new hope

Ladies and gentlemen, you’re witnessing the beginning of a revolution – “Axel” font family designed by Erik Spiekermann will be embeddable via @font-face. FontShop’s move could push other big players to update their EULAs and let us all reap benefits from the new era of web typography.

Published: | Posted in design | Tagged , , | 1 Comment

View Blip.pl avatars in hi-res

Blip.pl is more or less a Polish equivalent of Twitter. If you upload a photo as an avatar, it will be resized, but the original hi-res image is still stored on the server. To view it, just drag hi-res avatar into your bookmarks bar, and click it while visiting other users’ dashboards.

Published: | Posted in tips | Tagged , , , | Leave a comment

Flickr: from thumbnail to photo page

Have you ever came across a thumbnail of an awesome photo/graphic linked somewhere without any info about the author?

Thumbnail address:
http://farm4.static.flickr.com/3276/2635299642_1792a9d755.jpg

Link redirecting to photo page:
http://www.flickr.com/photo.gne?id=2635299642

Published: | Posted in tips | Tagged , | Leave a comment

Insanity is just a state of mind

Paul Hayes came up with 3D Cube using CSS transformations:

multiple-cubes-css

What you see is pure HTML+CSS(!) rendered by Webkit/Firefox3.5.

Published: | Posted in programming | Tagged , , , , , | Leave a comment

State of upcoming Firefox 3.5

Alongside with newest WebKit builds, Mozilla is adding lots of new and promising features to Gecko:

  • HTML5 and @font-face support!
  • Media Queries, allowing website/webapp developers to load certain stylesheets depending on the device properties, like:
    display’s aspect ratio, bits per color, color/monochrome display, etc.
    Nearly all of those properties accept min/max prefixes, and can be combined using logical operators,
  • Updated :before and :after support, and loads of new CSS3 pseudoselectors.
  • and more…

The world is becoming a better place for both developers and users.

Published: | Posted in programming | Tagged , , , | Leave a comment

Checking font availability with jQuery

FontAvailable is a short and brilliant jQuery plugin (put together by Howard Rauscher), that allows to check if ceratin font is installed on a visitor’s computer/device. Why, you ask? So you can select an adequate method of enhancing your website/webapp typography (@font-face, sIFR, typeface.js, cufón, etc.).

$(document).ready(function() {
    if($.fontAvailable('klavika')) {
        // @font-face
    }else{
        // sIFR / typeface.js / cufón
    }
});
Published: | Posted in programming | Tagged , , , , , , , | Leave a comment

Updating Wordpress engine via SSH

Wordpress updates made me sick. My blood boiled every time when a stable update came out. I had to download package to my local HD, unpack it and upload files to server. All this while keeping in mind fact, that i had to prepare it to prevent overwriting some crucial files/directories – otherwise I’d end with broken blog. To make things worse, I’ve got several blogs running on separate WP engines. There had to be an easier way…

And there is – updating WP via SSH. Open up terminal (on Windows use PuTTY, on a Mac OS run Terminal.app)

Backing up your current WP installation at this point isn’t a bad idea.

wget wordpress.org/latest.tar.gz
tar xzf latest.tar.gz
cd wordpress/
rm -rf wp-content/
cp -R * ../path/to/blog/directory/

First line downloads the latest stable WP package in tar format.

To unpack it to the actual directory use tar xzf command (second line). If you’d now run ls command, you should see a new directory called wordpress/, right? Ok, lets move on.

We’ll now enter this new directory (third line) to removewordpress/wp-content/ directory (fourth line). By doing that, we’ll prevent overwriting previously installed themes and plugins during update process.

Last thing to do in terminal is to overwrite old files with their new equivalents (last line).

Now log in to your wp-admin page – if needed, wordpress will automatically update it’s database structure and shortly after that greet you with higher version number.

All this makes updating WP much less pain, but what when you’ve got multiple WP engines installed on the same server/account? In a few days I’ll finish and upload a polished Bash script that solves this problem updating multiple instances at once.

Published: | Posted in programming | Tagged , , | 2 Comments