Skip to content

Instantly share code, notes, and snippets.

@command-tab
command-tab / safari_gripes.md
Last active August 29, 2015 14:23
Safari Gripes

Note: I'm a web developer, so it's likely that the software behaviors that bother me are unlikely to affect non-web-developers.

  • Clicking the address bar makes the web address slide to the left to appear like normal editable text field. If I'm clicking in a specific spot to edit the web address, I have to move my mouse again to highlight the portion I wanted, since the whole contents of the field slid leftward upon click. If the address bar wasn't weirdly centered to begin with, the sliding wouldn't be necessary.
  • The address bar is centered and doesn't fill up the width of the hybrid title bar/toolbar. Even removing the Flexible Space toolbar items that are present on either side doesn't make the bar expand to fill the available space. This is inconsistent with the behavior of Flexible Space toolbar items found elsewhere in OS X.
  • I'd like to be able to disable the Favorites icon menu that appears when the address bar is clicked. Combined with the address sliding, there's an awful lot of animation goin
#import <Foundation/Foundation.h>
#import "AFNetworking.h"
int main(int argc, const char *argv[])
{
@autoreleasepool {
NSURL *url = [NSURL URLWithString:@"https://api.github.com/users/AFNetworking/repos"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
NSLog(@"success: %@", JSON);
$ vagrant provision
[default] Running provisioner: VagrantPlugins::Shell::Provisioner...
/Applications/Vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/communicators/ssh/communicator.rb:105:in `initialize': No such file or directory - /Users/collin/Desktop/vagrant-ansible-dev/provisioning/shellx.sh (Errno::ENOENT)
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/communicators/ssh/communicator.rb:105:in `open'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/communicators/ssh/communicator.rb:105:in `block in upload'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/communicators/ssh/communicator.rb:311:in `block in scp_connect'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/communicators/ssh/communicator.rb:248:in `connect'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/communicators/ssh/communicator.rb:309:in `scp_connect'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.5/plugins/communicators/ss
@command-tab
command-tab / prov-p12-verify.sh
Created April 10, 2013 20:06
Compares fingerprints of certificates in an Apple provisioning profile against that of a PKCS12 (.p12) file. Usage: prov-p12-verify.sh /path/to/prov.mobileprovision /path/to/pkcs.p12 secretpassword
#/bin/bash
prov="$1"
p12="$2"
password="$3"
blue_color="\033[0;36m"
green_color="\033[0;32m"
red_color="\033[0;31m"
end_color="\033[0m"
lipo -create libdevice.a libsimulator.a -output libfat.a
# Navigate to the frontmost Finder window
function navigate_finder
{
osascript -e 'tell application "Finder" to if window 1 exists then if target of window 1 as string is not ":" then get POSIX path of (target of window 1 as alias)'
}
alias f="cd \"\$(navigate_finder)\""
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/
PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>com.splunk.splunkforwarder</string>
<key>EnvironmentVariables</key>
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<photos page="1" pages="241" perpage="100" total="24022">
<photo id="8879534383" owner="49650603@N07" secret="2dab000a47" server="5336" farm="6" title="CAFLS-5453" ispublic="1" isfriend="0" isfamily="0" url_sq="http://farm6.staticflickr.com/5336/8879534383_2dab000a47_s.jpg" height_sq="75" width_sq="75" url_o="http://farm6.staticflickr.com/5336/8879534383_0d56d24565_o.jpg" height_o="3456" width_o="5184" url_m="http://farm6.staticflickr.com/5336/8879534383_2dab000a47.jpg" height_m="333" width_m="500" dateupload="1369842684">
<description>2013 CAFLS Senior Awards</description>
</photo>
<photo id="8879535271" owner="49650603@N07" secret="54d01a86b0" server="7356" farm="8" title="CAFLS-5452" ispublic="1" isfriend="0" isfamily="0" url_sq="http://farm8.staticflickr.com/7356/8879535271_54d01a86b0_s.jpg" height_sq="75" width_sq="75" url_o="http://farm8.staticflickr.com/7356/8879535271_8acb61e3b3_o.jpg" height_o="3456" width_o="5184" url_m="http://farm8.stat

So You Want to Develop PHP Locally

This guide is intended for developers who want to write and run PHP on their local Mac. It is expected that you have some familiarity with Terminal commands, as well as opening and saving text files with an editor of your choice.

Install Xcode Command Line Tools

Available from the Apple Developer Center, the Xcode Command Line Tools are all that Homebrew needs to build and install software on the Mac. The Xcode app is only needed if you intend to also to OS X or iOS development.

Install Homebrew

$ export VAGRANT_DEFAULT_PROVIDER=vmware_fusion
$ VAGRANT_LOG=DEBUG vagrant up
INFO global: Vagrant version: 1.2.7
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/box/plugin.rb
INFO manager: Registered plugin: box command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/destroy/plugin.rb
INFO manager: Registered plugin: destroy command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/halt/plugin.rb
INFO manager: Registered plugin: halt command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/help/plugin.rb