Posts

Add Font to iOS

http://tetontech.wordpress.com/2010/09/03/using-custom-fonts-in-your-ios-application/ 1) Add the .TTF or .OTF font file/s you wish to use as a resource 2) Open your info.plist and create a new key called UIAppFonts or "Fonts provided by application" , set the key to be an array type. 3) For each font you want to use in your app, add it as a new object in the array with its full name and extension and save the info.plist when finished 4) Now in your code you can simply call [UIFont fontWithName:@"Insert font name here" size:18]

iOS Icons

Universal apps icon requirements. Image Size (px) File Name Used For Required Status 512x512 iTunesArtwork Ad Hoc iTunes Optional but recommended 114x114 Icon@2x.png Home screen for iPhone 4 High Resolution Optional but recommended 72x72 Icon-72.png Home screen for iPad compatibility Optional but recommended 58x58 Icon-Small@2x.png Spotlight and Settings for iPhone 4 High Resolution Recommended if you have a Settings bundle, otherwise optional but recommended 57x57 Icon.png App Store and Home screen on iPhone/iPod touch Required 50x50 Icon-Small-50.png Spotlight for iPad compatibility Recommended if you have a Settings bundle, otherwise optional but recommended 29x29 Icon-Small.png Spotlight and Settings Optional but recommended corner radius for the 512x512 =  80  (iTunesArtwork) corner radius for the 114x114 =  18  (iPhone/iPod touch (Retina)) corner radius for the 72x72 =  11 ...

VIM Guide

Vim guide for Textmate users http://www.jackkinsella.ie/2011/09/05/textmate-to-vim.html

Design Secrets for engineers

http://eng.pulse.me/design-secrets-for-engineers/

mysqld will not start-problem with /tmp/mysql.sock

My solution to the [ERROR] Can't start server : Bind on unix socket: Permission denied problem was to change ownership of the directories: /usr/local/var/run/mysqld /usr/local/var/db/mysql sudo chown -R _mysql /usr/local/var/run/mysqld via: http://bugs.mysql.com/bug.php?id=11380

SSH tips

http://blogs.perl.org/users/smylers/2011/08/ssh-productivity-tips.html

python 2.6 on debian lenny

Source:  http://mindref.blogspot.com/2010/04/python-26-on-debian.html Debian 5.0 comes with Python 2.5 since there is no newer version available in stable repository yet. So the question becomes how you can install a newer Python on your box. Usual way is to update from sid repository and install python version you need... but it doesn't work that way, unfortunately. You will see the following error: pycentral rtinstall: installed runtime python2.6 not found The only way to get rid of this error is by removing older version of python (please note that updating python 2.5 to latest version will not work). apt-get remove python2.5-minimal python2.5 rm -Rf /usr/bin/python /usr/bin/python2.5 /usr/lib/python2.4 /usr/lib/python2.5 /etc/python2.5 add sid repository, e.g.  deb http://ftp.us.debian.org/debian/ sid main , to /etc/apt/sources.list apt-get -y update apt-get -y install python python-setuptools python-virtualenv comment out sid repository in  /etc/apt/source...