Archived Posts from this Category
Archived Posts from this Category
If you boot into recovery mode on an old laptop and see the message, “An Error occurred while preparing the installation. Try running this application again,” chances are that Apple is rejecting the request from your computer because the battery has died and the time is reset. Open up terminal from the utilities menu and type date and hit enter. If it says 2001, you need to set the date to the current date. You can set it with
date HHMMmmddYYYY, such as 130107092014 for 1:01 PM, July 9 2014. After that, quit terminal and try reinstalling again.
As a web developer, the easiest thing for me to develop on my mac was to work from /Library/WebServer/Documents, which is the default directory for OS X’s apache. There are two problems with this: First, the permissions are all root. I found it easiest to change Documents’ owner to my user, but then running a permissions repair would automatically change these back. Second, Backblaze automatically excludes your /Library directory, so none of my web work was getting automatically backed up. I contacted backblaze about including only this directory and got this response:
I am sorry but there is not a way to back up this data.
Backblaze does not back up the system files or the system library. The /Library and all subdirectories are excluded.
My solution was to create a new directory, webdocs, in my home folder, and to move everything that was in /Library/WebServer/Documents into it. Then, I edited /etc/apache2/httpd.conf with root privileges (in terminal: sudo nano /etc/apache2/httpd.conf or sudo edit /etc/apache2/httpd.conf or sudo subl /etc/apache2/httpd.conf depending on your text editor of choice), and replaced all instances of /Library/WebServer/Documents with /Users/jordan/webdocs. Then I ran sudo apachectl restart to restart apache. Now all of my web work will get backed up automatically by backblaze.
I’m experimenting with Ratchet, a websocket server written in PHP. I wanted to install lib-event for PHP because according to this thread it works better than PHP’s choose_stream function. It ended up being a pain:
port install libevent worked but when I ran
pecl install channel://pecl.php.net/libevent-0.0.5 it could not find the libevent headers even when I pointed it to /opt/local/lib/, which is where
port contents libevent said it was installed.
I ended up following this tutorial on compiling it from source and then pointing the pecl installer to that library and it worked. Mostly. Compiling it from source put it in /usr/local/lib, which the pecl installer liked better. Then it was a question of enabling it in PHP.
OS X’s php.ini installed here:
MacPort’s PHP is installed here:
Unless you change your default setup, apache will serve pages with OS X’s PHP, while the command line will serve pages with MacPort’s PHP.
Most of my OS X PHP extensions are installed here:
Most of my Mac Port PHP extensions are installed here:
I had to copy libevent.so from my mac’s extension directory to the macports extension directory, and add extension=libevent.so to both php.ini files.
My ReFit was hanging on the windows logo on my macbook pro when I would boot into windows.
I was having problems with windows explorer crashing every 5 seconds anyway so I plugged in my boot thumbdrive and reset (reformatted) windows.
However, refit would STILL hang on the windows logo even after a clean install. If I held down option when booting I could use Apple’s menu to get to Windows, but not via Refit.
Finally, I tried unplugging everything from my macbook, including the external mouse, SD card, and external monitor.
Now it boots fine! Hopefully this saves someone from reformatting like I did when it was just a hardware conflict. I have read other reports of USB hubs and other peripherals also causing refit to hang.
I have created a Photoshop action to automatically generate a shadow for a given png. I recommend extending the canvas right 10 or so pixels first. It expects the file to have a single layer with transparency. It duplicates the layer, adds a black color overlay, rasterizes the layer effect, squishes the layer with free transform, skews it to the right, puts the layer below the first one, sets the opacity to 57%, and hides the first layer.
This is useful for generating custom pin shadows for leaflet, google maps or bing.
On mac you can place this in: ~/Library/Application Support/Adobe/Adobe Photoshop CS6/Presets/Actions/
What a Vista-like message. Apple warns you every time you open almost any kind of file that was downloaded from the internet, which is MOST files these days. There doesn’t seem to be any way to turn it off. It happens with applications, php files, even HTML and jpg files. As a PHP programmer, I can’t stand seeing this message every time I open files that I coded MYSELF. It severely interrupts my workflow.
The commonly suggested method of using terminal to write to defaults does NOT work for me:
defaults write com.apple.LaunchServices LSQuarantine -bool NO
There is another method of manually removing the quarantine flag of the files that you download each time you download them, but this would take more time than just clicking ok in the stupid dialog.
What did work for me was downloading the latest version of Onyx and unchecking the internet warning checkbox. Thank you, Titanium Software!
Note that this does make your computer more susceptible to viruses and trojans if you visit risky sites or blindly open unknown applications. For users like me, this is preferable to the condescending, interrupting workflow Apple has been increasingly favoring lately.
Cancel or Allow?
I’ve recently been experiencing never-ending beachballs (crashes) when trying to load instruments in EXS 24 in Logic Pro 9.1.6 in both 32-bit and 64-bit.
I recently installed a Blu-Ray player. As soon as I ejected the disc, Logic stopped beachballing and loaded the sample fine. It must have been trying to search the Blu-Ray drive for the audio files and gotten stuck somehow.
I’ve also read that turning off the spotlight index for any Windows partitions helps. I would suggest unmounting any network drives as well if you’re experiencing this issue.
Update:Barebones support got back to me and explained why this wasn’t working, this method broke their codesigning. But they had a solution: Simply go to File > New > FTP/SFTP Browser. Thanks Barebones!
Edit: Darn, I’m getting this error when trying to open remote documents: (MacOS Error code: -25293)
When I’m working on two projects at once, or want to grab a remote file from FTP when I already have one FTP site open, it would be nice to run two instances of TextWrangler at once, since it only supports having one FTP site open at a time. I figured out how:
-Go to Applications/ and right click on TextWrangler and select Duplicate.
-Rename Textwrangler copy to Textwrangler2
-Right click on Textwrangler and choose “Show Package Contents”
-Open info.plist inside the Contents folder
-Change the data from
Now you can open both TextWrangler apps.
Optionally, grab this snazzy textwrangler alternative icon from this page:
Right click and choose "copy image". Then get info on TextWrangler2, click on the small icon in the top right, and hit command-V to paste. That way it's easy to tell the two instances apart in the Dock and switching between applications.
After having some problems with my home button, I tried taking my iPhone to the Apple store, who told me it would cost $200 to replace the hardware button on my iPhone. They also mentioned there were some home button issues with 4.3.1, the version of my iPhone OS, and to try updating. (They also said they had to mention the jailbreak could be my problem and to remove it).
I went home, determined to either fix the home button myself (they cost $5 online) or try a software update. I tried updating to 4.3.3 first, the latest untethered jailbreak. This is trickier now that 4.3.5 is out.
First, I ran AptBackup, a package you can find in Cydia to save all of your jailbroken apps for restoring later. (Edit: AptBackup deleted all my AppStore apps, people recommend PkgBackup instead.) I also saved my SHSH blobs in Cydia (important) when it prompted me, so that I could upgrade or downgrade my iOS freely.
I downloaded iOS 4.3.3 from here and tried option-updating or option-restoring in Itunes, but it gave me the error “The device isn’t eligible for the requested build.” I learned this is because Apple stopped signing iOS 4.3.3 in an effort to prevent jailbreaking.
I followed Saurik’s old guide, adding the line “22.214.171.124 gs.apple.com” to my /etc/hosts file to have Saurik’s Cydia server spoof apple’s verification servers. This bypasses the “eligible” error in iTunes, but as described, at the end of the restore I got the error message The iPhone “iPhone” could not be restored. An unknown error occured (1015)” Saurik writes that you should restore twice, but that you will get this message both times and get stuck in recovery mode, and then you should jailbreak.
Then, I tried using the latest version of RedSn0w to jailbreak. RedSn0w requires you to enter DFU mode by turning off the phone, but in recovery mode the phone turns on automatically when it’s plugged into USB. Regardless, I was able to enter DFU mode by holding down power for 2 seconds, pressing the power and home button for 10 seconds, and then releasing the power button and holding home for 10 seconds. Then, the phone hung on the “Installing Activation Bundles” screen and then rebooted and was stuck on the recovery screen.
I tried the application “fixrecovery43” but it didn’t work. (I got the error: libusb:error [darwin_transfer_status] transfer error: timed out)
What did work for me was installing TinyUmbrella and clicking the “Exit Recovery” option. TinyUmbrella crashed a few times on me, I think because of conflicts with Apple’s httpd server. I had to disable websharing and type “sudo killall httpd” in Terminal first. Then I clicked TinyUmbrella’s “Start TSS Server” and then it ran better. Open up /Applications/Utilities/Console.app for more details on what’s happening if you’re having trouble with TinyUmbrella. Evidentially you can use their TSS servers to restore the phone via iTunes as well but it didn’t work for me (I got a “could not connect to apple servers” error in iTunes).
Note: TinyUmbrella edits your hosts file and deletes everything except the gs.apple.com line. If you have other lines in your hosts file I suggest backing it up.
First I tried DFU mode, but the “fix restore” button didn’t work (the phone got stuck on a greenpois0n screen with the message “unable to find gbdevlist” and “unable to find fs_mount”). What worked for me was leaving the iPhone in recovery mode (iPhone screen on, usb cable icon pointing to iTunes icon), and then it shows up in the list of devices in recovery mode. Then I simply clicked on “exit recovery” and my phone booted normally into 4.3.3. Whew!
Finally, I reinstalled AptBackup and clicked “restore”, which restored all of my Cydia apps, but deleted all of my appstore apps. None of the suggested online fixes (installing an appstore app, resyncing with iTunes, turning on and off restrictions) worked. People online recommend PkgBackup instead of AptBackup, note to self. Anyway I restored my apps and settings from backup again using my old backup in iTunes and all is good. So far so good with the home button. If your iPhone 4 home button is still on the fritz, there are some good voodoo tricks in the comments here.
I’m on a speed-up-my-computer kick today.
I’ve generally used Cyberduck as my main FTP client, but switched to Transmit and FireFTP when it became too sluggish. It has been sluggish for several years now, though I still use it for advanced operations such as right-click file permissions (with the Info menu).
I finally did enough googling to solve its sluggishness: In the transfers window, select all and click Remove. Unless you need a detailed history of everything you’ve downloaded, this window is fairly useless and is the cause of Cyberduck’s sluggishness.
I found this solution via this thread.