This is some simple body text that I am writing. why not click here
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
/** | |
* Live updating API JS client side class | |
* @author Tim Davies | |
*/ | |
function liveupdatingClient (container) | |
{ | |
/** | |
* Set up, include handlebars and setup template | |
*/ | |
var endpoint = 'liveupdating.php'; |
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
[[self layer] setMasksToBounds:YES]; | |
[[self layer] setShadowColor:[[UIColor blackColor] CGColor]]; | |
[[self layer] setShadowOffset:CGSizeMake(0, 0)]; | |
[[self layer] setShadowOpacity:1]; | |
[[self layer] setShadowRadius:4.0]; | |
[[self layer] setBackgroundColor:[[UIColor clearColor] CGColor]]; |
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
The following doesnt work for some reason and it's really hurting my brains. | |
The variables contents are: | |
=========================== | |
myString = <script src="/mint/?js" type="text/javascript"> | |
matchedString = ?js" | |
I'm finding the range: | |
====================== | |
NSRange matchRange = [[myString string] rangeOfString:matchedString options:NSLiteralSearch]; |
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
alias ls='ls -gFh' | |
# MacPorts Installer addition on 2010-10-11_at_11:46:41: adding an appropriate $ | |
export PATH=/usr/local/bin:/opt/local/bin:/opt/local/sbin:$PATH | |
# Finished adapting your PATH environment variable for use with MacPorts. | |
export GREP_OPTIONS='--color=auto' | |
export CLICOLOR=1; | |
function git-branch() { |
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 |
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
// Get the data into a bitmap. | |
[self lockFocus]; | |
rep = [[NSBitmapImageRep alloc] initWithFocusedViewRect:[self bounds]]; | |
[self unlockFocus]; | |
// Make an NSImage from our bitmap. | |
image = [[[NSImage alloc] initWithSize:[rep size]] autorelease]; | |
[image addRepresentation:rep]; | |
NSData * tiffData = [image TIFFRepresentationUsingCompression: NSTIFFCompressionNone factor: 0.0f]; |
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
What Apple gives you and will cause a crash as dequeueReusableCellWithIdentifier: can't return a cell as none have ever been initialised. | |
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
static NSString *CellIdentifier = @"Cell"; | |
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; | |
return cell; | |
} |
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
@implementation StubbyNavigationController | |
- (UINavigationBar *)navigationBar | |
{ | |
[super.navigationBar setFrame:CGRectMake(0, 20, 300, 44)]; | |
return super.navigationBar; | |
} | |
@end |
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 "NSDataAdditions.h" | |
static char encodingTable[64] = { | |
'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P', | |
'Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f', | |
'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v', | |
'w','x','y','z','0','1','2','3','4','5','6','7','8','9','+','/' }; | |
@implementation NSData (NSDataAdditions) | |
+ (NSData *) dataWithBase64EncodedString:(NSString *) string { |