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
echo "Bumping build number..." | |
plist=${PROJECT_DIR}/${INFOPLIST_FILE} | |
# increment the build number (ie 115 to 116) | |
buildnum=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${plist}") | |
if [[ "${buildnum}" == "" ]]; then | |
echo "No build number in $plist" | |
exit 2 | |
fi |
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/bash | |
### | |
## A simple bash script for starting a minecraft server | |
## | |
## Options: | |
## -g : Sets the game mode. 0|1 (default 0) | |
## -m : Sets the amount of memory to start with. (default 756) | |
## -t : Sets the memory type. (default M) | |
## |
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
+ (UIImage *)imageFromGifData:(NSData *)data { | |
CGImageSourceRef source = CGImageSourceCreateWithData((__bridge CFTypeRef)data, NULL); | |
if (!source) { | |
return nil; | |
} | |
CFDictionaryRef dict = CGImageSourceCopyPropertiesAtIndex(source, 0, NULL); | |
NSDictionary *metadata = (__bridge NSDictionary *)dict; | |
CGFloat offset = 0.0; | |
if (metadata[@"{GIF}"]) { | |
NSDictionary *meta = metadata[@"{GIF}"]; |
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
- (NSString *)urlEncodeStringUsingEncoding:(NSStringEncoding)encoding { | |
return (__bridge NSString *)CFURLCreateStringByAddingPercentEscapes(NULL, (CFStringRef)self, NULL, (CFStringRef)@"!*'\"();:@&=+$,/?%#[]% ", CFStringConvertNSStringEncodingToEncoding(encoding)); | |
} |
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 minecraft='ssh -t [email protected] "screen -dR"' |
NewerOlder