Apple computers have dedicated keyboard buttons for volume and display brightness adjustment. If you also press Shift+Option (alt) you’ll be able to fine tune both as shown in the video below.
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.
OhMyZSH is a gorgeus enhancement to the standard shell, with better tab-completion and visual feedback.
Installing the vanilla version is as easy as:
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
First you can create a new directory, then to change the system setting:
defaults write com.apple.screencapture location /path/to/screenshots/
Finally to make the change immediately available:
The picture below is an example.
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
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).
The famous app “Caffeine” now has its command line hack. Since Lion there’s the command:
caffeinate -t 600
to do this. With several switces like “-d” to keep the display active, “-s” to keep the system running (only on AC power). See man caffeinate for more.
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]] ;