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
if Rails.env.development? || Rails.env.cucumber? | |
module ActionView | |
module Partials | |
def render_partial_with_annotations(options = {}) | |
begin | |
if partial_path = options[:partial] | |
allocated_objects_before = ObjectSpace.allocated_objects | |
%{\n<!-- START PARTIAL: "#{partial_path}" -->\n#{render_partial_without_annotations(options)}\n<!-- #{ObjectSpace.allocated_objects - allocated_objects_before} objects allocated END PARTIAL: "#{partial_path}" -->\n} | |
else |
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
(ruby -e 'STDERR.puts("stderr output") ; STDOUT.puts("stdout output") ' | tee -a stdout_logfile.txt) 3>&1 1>&2 2>&3 | tee -a stderr_logfile.txt |
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
(* | |
SwapBetweenSpec.scpt | |
Get into the BDD groove with this Xcode user script which quickly toggles between your implementation (or header) | |
and its Cedar Spec. Bind it to your favorite shortcut key and enjoy the cycle. | |
Be sure to add this User Script to Xcode as an Applescript, not a shell script: | |
1. Paste the contents of the gist into ~/Library/Application Support/Developer/Shared/Xcode/User Scripts/SwapBetweenSpec.scpt | |
2. When adding to script in the "Edit User Scripts" window of Xcode, choose "Add Script File..." and not "New Shell Script" and then choose the file from (1) | |
3. Set Input to "No Input" |
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/sh | |
#Get CoreImageTool from http://www.entropy.ch/software/macosx/coreimagetool/ | |
CONVERTER=/usr/local/bin/CoreImageTool | |
for FILE in $(find . -name \*-hd.png) | |
do | |
TARGET=$(echo $FILE | sed -e s@-hd\.png@\.png@) | |
echo $FILE \=\> $TARGET | |
$CONVERTER load pic $FILE filter pic CILanczosScaleTransform scale=0.5 store pic $TARGET public.png |
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
.DS_Store | |
*.swp | |
*~.nib | |
build/ | |
*.pbxuser | |
*.perspective | |
*.perspectivev3 |
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
on run {input, parameters} | |
tell application "Xcode" | |
set my_workspace to active workspace document | |
set workspace_projects to projects of my_workspace | |
set currentFullPath to "" | |
set projectDir to "" | |
set reverseDocumentList to (reverse of (source documents as list)) | |
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/sh | |
# | |
# aerobuild.sh | |
# | |
# What does this do? | |
# ================== | |
# - Bumps build numbers in your project using agvtool | |
# - Builds your app and packages it for testing/ad-hoc distribution | |
# - Commits build number changes to git |
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
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="robbyrussell" | |
# Set to this to use case-sensitive completion |
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/osascript | |
(* | |
What does this script do? | |
This script lets you quickly open the Cedar spec for the corresponding class header/implementation that is currently open in Xcode. If the spec is open, it opens the implementation instead. | |
How do I use it? | |
Save this script somewhere. | |
Start Xcode and go to Xcode > Behaviors > Edit Behaviors… |
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
Summary: | |
When ARC is enabled, C++ candidate templates are ignored due to an incorrectly diagnosed substitution failure. | |
Steps to Reproduce: | |
Compile the following main.mm file, with and without ARC: | |
#import <Foundation/Foundation.h> | |
template <typename T> |
OlderNewer