This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is part of a rakefile I use for UI Automation that's part of an | |
# upcoming (secret) project that I hope to announce soon. | |
# You need to set the $app_bundle global variable to point to the application's | |
# bundle on disk. Then hand in 1 for iPhone or 2 for iPad to this function | |
# and it will manipulate the plist of the device. | |
def pick_simulator_device index | |
# For now, the only way to tell UI Automation to run the iPad or iPhone | |
# simulator is to change the app bundle plist to require only that device. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Cover all the permutations. This is how I roll. | |
command! W :w | |
command! Q :q | |
command! Qa :qa | |
command! QA :qa | |
command! WQ :wq | |
command! Wq :wq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
honor TravisCI(原*) rake test | |
running: /Users/brad/dev/bwoken/bin/unix_instruments.sh -D /Users/brad/dev/ios/TravisCI/integration/tmp/trace -t /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -v /Users/brad/dev/ios/TravisCI/build/TravisCI.app -e UIASCRIPT /Users/brad/dev/ios/TravisCI/integration/tmp/javascript/iphone/favorites.js -e UIARESULTSPATH /Users/brad/dev/ios/TravisCI/integration/tmp/results | |
Instruments : Plugin Search Paths ( | |
"/Users/brad/Library/Application Support/Instruments/PlugIns", | |
"/Library/Application Support/Instruments/PlugIns", | |
"/Applications/Xcode.app/Contents/Developer/usr/PlugIns", | |
"/Applications/Xcode.app/Contents/Developer/usr/bin/PlugIns", | |
"/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns", | |
"/Applications/Xcode.app/Contents/Developer/Library/Instruments/PlugIns", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Disable shadow in screenshots | |
# Run this command from the terminal | |
defaults write com.apple.screencapture disable-shadow -bool true | |
# Now you press Cmd-Shift-4 to go into "select a portion of the screen to shoot" mode, | |
# but press the spacebar and it then switches to "select a window to shoot" mode. Magic! | |
# From https://raw.github.com/mathiasbynens/dotfiles/master/.osx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rack' | |
require 'raptor' | |
class Posts | |
end | |
class Users | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prompt Setup | |
YELLOW='\[\033[1;33m\]' | |
BLUE='\[\033[1;34m\]' | |
GREEN='\[\033[1;32m\]' | |
RED='\[\033[0;31m\]' | |
NORMAL='\[\033[00m\]' | |
WHITE='\[\033[0;37m\]' | |
function minutes_since_last_commit { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Copyright (c) 2013 Jonathan Penn (http://cocoamanifest.net) | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is just a fun experiment to write an expectation | |
# framework with matchers. NOT PRODUCTION READY! :) | |
def main | |
include Expectation | |
my_matchers = matchers do | |
define_matcher :to_be do |expected, actual| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# In honor of Dennis Ritchie, I present my directory diff'ing | |
# script built on the piping magic of Unix. | |
# | |
# Usage: diffdir dir1 dir2 | |
set -e # Bomb out of the script on any errors | |
diff_directories() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AbsPathTag < Liquid::Tag | |
def initialize(tag_name, src, tokens) | |
super | |
@src = src | |
@src.strip! | |
end | |
def render(context) | |
@base_url = context.registers[:site].config['url'] | |
absoluteize(@src) |