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
id touchedView = [[touches anyObject] view]; | |
if([[touchedView class] isEqual: [NSClassFromString(@"UITableHeaderFooterView") class]]){ | |
NSLog(@"Text: %@", [touchedView performSelector:@selector(text)]); | |
} |
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/ruby | |
USER = "git" | |
HOST = "ssh://#{USER}@github.com/" | |
COMMAND = "git clone #{HOST}" | |
EMAIL = ["xxx@xxx.com", "ooo@xxx.com"] | |
repos = [] | |
repos << %w"1 2 3 4" | |
repos << %w"5" |
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
=begin | |
(1..10).each{|i| | |
puts i.! | |
} | |
=end | |
class Integer | |
def ! | |
_return_val = 1 | |
self.times{|_current| |
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 | |
# PHP version: http://www.josephj.com/entry.php?id=346 | |
EMAILS_CONFIG_FILE = File.join(File.dirname(__FILE__), "..", "emails") | |
if(File.exist?(EMAILS_CONFIG_FILE)) | |
emails = File.read(EMAILS_CONFIG_FILE).split("\n").join(", ") | |
`git config hooks.mailinglist "#{emails}"` | |
puts "E-mail receivers: #{emails}" | |
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
class Store | |
attr_accessor :name | |
def initialize | |
@name = "N/A" | |
@@root = "Apple" | |
end | |
def root | |
@@root |
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
^{ | |
NSLog(@"I'm in a block"); | |
}; |
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(){ | |
console.log("I'm running."); | |
})(jQuery); |
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
var run_to_me = function(lonely){ | |
if(lonely) | |
console.log("whenever you're lonely"); | |
else | |
console.log("f**k off"); | |
} | |
run_to_me(true); | |
run_to_me(false); |
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
@interface Worker : NSObject { | |
} | |
+(void)something:(void (^)(BOOL))block; | |
@end | |
@implementation Worker |
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
int age = 23; | |
^{ | |
NSLog(@"My age is: %d", age); | |
}(); |
OlderNewer