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
[UIView transitionWithView:self.view | |
duration:0.25 | |
options:UIViewAnimationOptionsTransitionCrossDissolve | |
animations:^{ | |
[self.view addSubview:overlay]; | |
} | |
completion:nil]; |
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 | |
OUTDIR=~/Desktop/moby | |
BASE="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks" | |
mkdir -p ${OUTDIR} | |
cd ${BASE} | |
for dir in * | |
do |
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
def eval_in_file(source, options={}) | |
suffix = options[:suffix] || Time.now.strftime("%s%N") | |
path = options[:path] || "/tmp/" | |
result = nil | |
filename = "#{path}eval-#{suffix}.rb" | |
file = File.new(filename, 'w+') | |
file.write(source) | |
file.rewind | |
begin |
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
require 'aws' | |
require 'json' | |
# Set the following environment variables: | |
# | |
# PROJECT_NAME="" | |
# AWS_ACCESS_KEY_ID="" | |
# AWS_SECRET_ACCESS_KEY="" | |
# | |
# If so desired: |
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 | |
html2haml -ex $1 > tmp.haml | |
git mv $1 ${1/.erb/.haml} | |
mv tmp.haml ${1/.erb/.haml} |
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
function SimpleObjectStore(storeName){ | |
this.storeName = storeName; | |
this.changedEvent = "asq:" + this.storeName + "-changed"; | |
} | |
SimpleObjectStore.prototype = { | |
constructor: SimpleObjectStore, | |
count: function(){ | |
return this.get().length; |
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
Capybara.register_driver :poltergeist_inspector do |app| | |
Capybara::Poltergeist::Driver.new(app, :inspector => true) | |
end | |
Before('@javascript', '@inspector') do | |
Capybara.javascript_driver = :poltergeist_inspector | |
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
#!/bin/bash | |
bundle exec rubocop --format clang --only $1 -a | |
git commit -p -m "$1" |
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
# from: https://gist.github.com/4ndrej/4547029 | |
import javax.net.ssl.SSLSocket; | |
import javax.net.ssl.SSLSocketFactory; | |
import java.io.*; | |
/** Establish a SSL connection to a host and port, writes a byte and | |
* prints the response. See | |
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services | |
*/ | |
public class SSLPoke { |
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
### Keybase proof | |
I hereby claim: | |
* I am tvon on github. | |
* I am tvon (https://keybase.io/tvon) on keybase. | |
* I have a public key whose fingerprint is 4FFD D907 7261 DB2E 0E7D DC66 8C40 C6BE D305 148A | |
To claim this, I am signing this object: |