Spotify and kernel panic

Last week I had a kernel panic. The only time I had it before was (on 2012!) using my 27″ iMac that had a defective motherboard and thus… I was scared to have an hardware problem in the quite new retina MacBook pro…

Today I had a second kernel panic, and I could connect the dots… again I was clicking things in Spotify. A quick Google search got me to the sad truth: Apple is working to the problem, meaning that the problem is a bug in OS X.

IMG_7155.jpg

Syntax highlight in Keynote presentations

Syntax highlight in Keynote

When preparing slides with a lot of code inside having a proper syntax highlighter is mandatory, and hacks like taking screenshots don’t work both for the useless amount of bytes wasted and for the inability to correct mistakes later on.

You can install highlight via Brew:

brew install highlight

then simply:

highlight -O rtf input_file.php | pbcopy

pbcopy is a supercool utility that grab the standard input and copies it into the clipboard (yes, there’s pbpaste too).

Colors in Objective-C

With this post I start annotating some basic tips on Apple programming, as most newbies do.

We want to change the text and color of a label:

MyName.text = [[listNames objectAtIndex:i] uppercaseString] ;
[MyName setTextColor:[UIColor colorWithRed:22.0/255.0f green:150.0/255.0f blue:22.0/255.0f alpha:1.0]] ;

Continue reading