Saturday, December 05, 2009

Quick Access to iPod Controls In Any Application & On Lock Screen | iPhone Alley

Quick Access to iPod Controls In Any Application & On Lock Screen | iPhone Alley
double clicking the "Home" button on your iPhone brings up a set of controls for volume, skipping tracks, and pausing your music without leaving the current application. There's even an "iPod" button that takes you right to the iPod application. But the fun doesn't stop there, so read on for more "Home" button tricks.

In addition to bringing up iPod controls from the home screen and other applications, you can also access iPod controls from the "Slide to unlock" screen. Wake up your iPhone by pressing one of the two buttons, then double click the "Home" button. A set of iPod controls will appear below the clock and give you access to play/pause, skip/repeat, and volume controls.

The last cool thing double clicking the home button does actually has nothing to do with music at all. By default, when no music is playing, double clicking the home button will actually bring up your Favorites list in the Phone app. This is extremely helpful when you need quick access to your phone from another application.

The "double click" feature can be customized from the Home Button preference page in Settings under General.


Wednesday, December 02, 2009

how to make Universal Binary static library for iPhoneSimulator and iPhoneOS

<span class="pun"></span><span class="pln">From man page of lipo:
The lipo command creates or operates on ``universal'' (multi-architecture) files.
It only ever produces one output file, and never alters the input file. The oper-
ations that lipo performs are: listing the architecture types in a universal file;
creating a single universal file from one or more input files; thinning out a sin-
gle universal file to one specified architecture type; and extracting, replacing,
and/or removing architectures types from the input file to create a single new
universal output file.

Example:
<font face="monospace">lipo -arch armv build/Release-iphoneos/libMylib.a -arch i386 build/Release-iphonesimulator/libMylib.a</font></span><font face="monospace"><span class="pln"> </span><span class="pun">-create -</span><span class="pln">output libMylib.a</span><span class="pln">
lipo -detailed_info libMylib.a
</span></font><span class="pln"></span>
Note:
-arch (armv|i386) can be omitted. lipo can figure out the architecture automatically.
-create and -output options have to be used to create a new Universal Binary static library.



Wednesday, November 18, 2009

Fading Default.png when iPhone app starts

Michael Burford's Lame Blog: Fading Default.png when iPhone app starts
More iPhone code. I wanted to have the startup logo (Default.png) graphic fade into the first screen after the program starts. This is a much nicer transition than just letting the view switch instantly.


Monday, November 02, 2009

File Signatures Table

File Signatures
This table of file signatures (aka "magic numbers") is a work-in-progress. I have found little information on this in a single place, with the exception of the table in Forensic Computing: A Practitioner's Guide by T. Sammes & B. Jenkinson (Springer, 2000). Other useful and reasonably current sources are C.E. Codere's File Format site or the magic file commonly available with Linux systems. This table is still growing and contributions are welcome! Comments and queries can be sent to Gary Kessler at kumquat@sover.net.


Monday, September 14, 2009

iPhone Font List

A lot of web pages and blogs have the iPhone font list, but they usually don't list the actual font name you have to use to create the font in iPhone programs. Here is the list that I found the hard way.

iPhone Font List
@"HiraKakuProN-W3",
@"Courier",
@"Courier-BoldOblique",
@"Courier-Oblique",
@"Courier-Bold",
@"ArialMT",
@"Arial-BoldMT",
@"Arial-BoldItalicMT",
@"Arial-ItalicMT",
@"STHeitiTC-Light",
@"STHeitiTC-Medium",
@"AppleGothic",
@"CourierNewPS-BoldMT",
@"CourierNewPS-ItalicMT",
@"CourierNewPS-BoldItalicMT",
@"CourierNewPSMT",
@"Zapfino",
@"HiraKakuProN-W6",
@"ArialUnicodeMS",
@"STHeitiSC-Medium",
@"STHeitiSC-Light",
@"AmericanTypewriter",
@"AmericanTypewriter-Bold",
@"Helvetica-Oblique",
@"Helvetica-BoldOblique",
@"Helvetica",
@"Helvetica-Bold",
@"MarkerFelt-Thin",
@"HelveticaNeue",
@"HelveticaNeue-Bold",
@"DBLCDTempBlack",
@"Verdana-Bold",
@"Verdana-BoldItalic",
@"Verdana",
@"Verdana-Italic",
@"TimesNewRomanPSMT",
@"TimesNewRomanPS-BoldMT",
@"TimesNewRomanPS-BoldItalicMT",
@"TimesNewRomanPS-ItalicMT",
@"Georgia-Bold",
@"Georgia",
@"Georgia-BoldItalic",
@"Georgia-Italic",
@"STHeitiJ-Medium",
@"STHeitiJ-Light",
@"ArialRoundedMTBold",
@"TrebuchetMS-Italic",
@"TrebuchetMS",
@"Trebuchet-BoldItalic",
@"TrebuchetMS-Bold",
@"STHeitiK-Medium",
@"STHeitiK-Light"

Wednesday, September 09, 2009

How to install fonts in Ubuntu

How to install fonts in Ubuntu? - Page 13 - Ubuntu Forums
1. Copy your TTF files to ~/.fonts (create the dir if it doesn't exist). Yes, that's .fonts, with a dot.

2. Open a console and run fc-cache -fv ~/.fonts



Tuesday, June 30, 2009

One liner for setting up passwordless ssh


cat ~/.ssh/id_rsa.pub | ssh userid@hostname.com 'mkdir -p .ssh && touch .ssh/authorized_keys && cat - >> .ssh/authorized_keys'


Just replace the userid and hostname.com as needed.