Skip to content

Instantly share code, notes, and snippets.

@jonathanpenn
jonathanpenn / hidpi.txt
Created January 28, 2013 02:39 — forked from simX/hidpi.txt
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES;
sudo defaults delete /Library/Preferences/com.apple.windowserver DisplayResolutionDisabled;
// by the way, you need to logout and log back in for this to take effect. Or at least that's what
// Quartz Debug says. Who knows, maybe it's lying?
// P.S. Go to [Apple menu --> System Preferences --> Displays --> Display --> Scaled] after logging
// back in, and you'll see a bunch of "HiDPI" resolutions in the list to choose from.
@jonathanpenn
jonathanpenn / toggle_uiautomation_views.scpt
Created November 6, 2012 17:35 — forked from wearhere/toggle_uiautomation_views.scpt
Toggle Between Script and Editor Log Views in UIAutomation Instrument
(*
Running this script will cause Instruments to become active
and switch from the Script view (where you edit your UIAutomation script)
to the Editor Log view (where you see the logs of executing those scripts)
or vice versa.
*)
-- JW: This block only needs to be executed once, and can then be removed.
-- I don't know if leaving it in might cause a performance hit;
#import "MPAppDelegate.h"
@interface MPAppDelegate()
@property (strong, nonatomic) UIView *wildView;
@property (strong, nonatomic) UIViewController *viewController;
@end
@jonathanpenn
jonathanpenn / Gemfile
Created July 16, 2012 17:27 — forked from lukeredpath/Gemfile
A parser for Twitter's tweet archive dump format
gem "mongo"
gem "bson_ext"
gem "mongoid"
@jonathanpenn
jonathanpenn / stdout
Created April 25, 2012 18:27 — forked from listrophy/stdout
UIATargetHasGoneAWOLException
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",
@jonathanpenn
jonathanpenn / build.sh
Created June 13, 2011 16:36 — forked from jonah-williams/build.sh
Command line iOS project builds and over-the-air distribution
#!/bin/bash
# https://gist.github.com/949831
# http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/
# command line OTA distribution references and examples
# http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson
# http://nachbaur.com/blog/building-ios-apps-for-over-the-air-adhoc-distribution
# http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/
# http://www.neat.io/posts/2010/10/27/automated-ota-ios-app-distribution.html
require 'open-uri'
# url dsl -- the ultimate url dsl!
#
# You just can't beat this:
#
# $ irb -r url_dsl
# >> include URLDSL
# => Object
# >> http://github.com/defunkt.json

Introduction

Forward (from PEP 8)

One of Guido’s key insights is that code is read much more often than it
is written. The guidelines provided here are intended to improve the
readability of code and make it consistent across the wide spectrum of
Python code. As PEP 20 6 says, “Readability counts”.

A style guide is about consistency. Consistency with this style guide is

require 'rubygems'
require 'spec'
if not defined? BlankSlate
class BlankSlate
instance_methods.each { |m| undef_method m unless m =~ /^(__|instance_eval)/ }
end
end
class RDingus < BlankSlate