This file contains hidden or 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
#import <UIKit/UIKit.h> | |
// Including the .h and .m file together for simplicity’s sake. | |
// yes, this is a horrific abuse of ObjC | |
@interface CSTextCell : UITableViewCell { | |
} | |
+ (id)generate:(UITableView *)tableView at:(NSIndexPath *)indexPath text:(NSString *)text; | |
+ (NSString *)cellID; |
This file contains hidden or 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 | |
while [ 1 ] | |
do | |
clear | |
echo "iPad 2 Wi-Fi White 16GB: " | |
# This magic courtesy of Garrett Murray: http://log.maniacalrage.net/post/4030658171/tip-how-to-get-an-ipad-2-at-target-today-i | |
# Thanks Garrett! I have barely an idea of how this works, but it is truly brilliant! :) | |
curl -s --data "_dyncharset=ISO-8859-1&asin=&dpci=057-10-1839&zipcode=YOUR_ZIP_CODE_GOES_HERE_BUB&city=&state=" http://sites.target.com/site/en/spot/mobile_fiats_results.jsp?_DARGS=/site/en/spot/mobile_fiats.jsp | grep -A 2 strong | sed -e 's/<p><strong>//' -e 's/<\/strong><br\/>//' -e 's/<br \/>//' -e 's/<\/p>//' -e 's/--//' -e 's/^[ \t]*//;s/[ \t]*$//' > ipad2-white.results |
This file contains hidden or 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
javascript:(function(){if%20%28window.location.host%20%3D%3D%20%27twitter.com%27%29%7Ba%20%3D%20location.hash%3Bif%20%28a%20%3D%3D%20%27%27%29%7Ba%20%3D%20location.pathname%3B%7Da%20%3D%20a.split%28%27/%27%29%3Bb%20%3D%20a%5Ba.length%20-%201%5D%3Blocation.href%20%3D%20%27http%3A//favstar.fm/t/%27%20+%20b%3B%7D})(); |
This file contains hidden or 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
- (BOOL) textField: (UITextField *) textField shouldChangeCharactersInRange: (NSRange) range replacementString: (NSString *) string | |
{ | |
([(textField == self.serverField ? self.emailField : self.serverField).text length] > 0 && | |
[(textField == self.passwordField ? self.emailField : self.passwordField).text length] > 0 && | |
[[textField.text stringByReplacingCharactersInRange: range withString: string] length] > 0 | |
) ? (self.navigationItem.rightBarButtonItem.enabled = YES) : (self.navigationItem.rightBarButtonItem.enabled = NO) ; | |
return YES; | |
} |
This file contains hidden or 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
MyObject *obj = [[MyObject alloc] init]; | |
obj.property = @"OK"; | |
[obj doSomething]; | |
NSLog(@"%@", obj); |
This file contains hidden or 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
<?php | |
function isset_and_is($a,$b,$c){$d=&$GLOBALS['_'.strtoupper($a)];return isset($d[$b])&&$d[$b]==$c;} |
This file contains hidden or 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
1. How do you put a giraffe into a refrigerator? | |
Stop and think about it and decide on your answer before you scroll down. | |
The correct answer is: Open the refrigerator, put in the giraffe, and close the door. This question tests whether you tend to do simple things in an overly complicated way. | |
2. How do you put an elephant into a refrigerator? | |
Did you say, Open the refrigerator, put in the elephant, and close the refrigerator? |
This file contains hidden or 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
<?php | |
/** | |
* Quick-and-dirty password generator, fully-commented edition ;) | |
* | |
* Author: Abraham Vegh <[email protected]> | |
*/ | |
// Our password generator, with a default length of eight | |
function random_password ($length = 8) | |
{ |
This file contains hidden or 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
test |