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
NSString *alertMessage = NSLocalizedString(@"Are you sure you want to sign out?", nil); | |
SGAlertView *alertView = [[SGAlertView alloc] initWithTitle:nil message:alertMessage]; | |
[alertView addButtonWithTitle:NSLocalizedString(@"Cancel", nil) block:^{}]; | |
[alertView addButtonWithTitle:NSLocalizedString(@"Sign out", nil) block:^{ | |
// Handle the sign out stuff | |
}]; | |
[alertView show]; | |
[alertView release]; |
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
Contents/MacOS/main |
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
# if ([a valueForKey:@"key"] == [NSNull null]) | |
# obj.foo = [a valueForKey:@"key"]; | |
# Copied straight into ruby | |
if a["key"] != nil | |
obj.foo = a["key"] | |
end | |
# Use a ruby method to test for nil | |
if !a["key"].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
http://devstreaming.apple.com/videos/wwdc/2013/400xex2xbskwa5bkxr17zihju9uf/400/400-HD.mov?dl=1 | |
dir=~/Downloads/WWDC 2013/Tools/ | |
out=Session 400 - What’s New in Xcode 5.mov | |
http://devstreaming.apple.com/videos/wwdc/2013/400xex2xbskwa5bkxr17zihju9uf/400/400.pdf?dl=1 | |
dir=~/Downloads/WWDC 2013/Tools/ | |
out=Session 400 - What’s New in Xcode 5.pdf | |
http://devstreaming.apple.com/videos/wwdc/2013/401xbx2xq50gv7mqafyfdns2yhxl/401/401-HD.mov?dl=1 | |
dir=~/Downloads/WWDC 2013/Tools/ | |
out=Session 401 - Xcode Core Concepts.mov | |
http://devstreaming.apple.com/videos/wwdc/2013/401xbx2xq50gv7mqafyfdns2yhxl/401/401.pdf?dl=1 |
All rules and guidelines in this document apply to HTML files.
The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
Icon Legend:
·
Space, ⇥
Tab, ↵
Enter/Return
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
// To unzip the epub, move the ePub to a folder, cd to it then simply: | |
unzip MyEbook.epub | |
// To zip up an epub: | |
1. zip -X MyNewEbook.epub mimetype | |
2. zip -rg MyNewEbook.epub META-INF -x \*.DS_Store | |
3. zip -rg MyNewEbook.epub OEBPS -x \*.DS_Store | |
Some explanations necessary here. We start each line with two flags: |
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 | |
sudo mount -o remount,size=10G,noatime /tmp | |
echo "Done. Please use 'df -h' to make sure folder size is increased." |
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
curl -s https://api.github.com/users/milanboers/repos | grep \"clone_url\" | awk '{print $2}' | sed -e 's/"//g' -e 's/,//g' | xargs -n1 git clone |
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
import Foundation | |
import UIKit | |
import ImageIO | |
import MobileCoreServices | |
extension UIImage { | |
static func animatedGif(from images: [UIImage]) { | |
let fileProperties: CFDictionary = [kCGImagePropertyGIFDictionary as String: [kCGImagePropertyGIFLoopCount as String: 0]] as CFDictionary | |
let frameProperties: CFDictionary = [kCGImagePropertyGIFDictionary as String: [(kCGImagePropertyGIFDelayTime as String): 1.0]] as CFDictionary | |
OlderNewer