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
"body": "If you haven't already, you'll soon start to see people more glued to their phones than usual, perhaps taking bizarre, nonsensical routes down the streets, flicking their screens rapidly in a car park, or gathering around police stations, all the while endlessly muttering \"gotta catch 'em all.” Pokémon Go, the new, extremely popular augmented reality game by Niantic Labs, is set for release in more countries in the very near future, right after the company has fixed its exploding servers.\n\nGiven the game’s immense popularity, competition to become the greatest Pokémon Master of all time—like no one ever was—has never been tougher, and there are some key things you should know before setting off on your journey.\n\nThe first challenge many players face—including those in the UK and Europe—is that the game is not yet available in their country. However, for Android users this is easily sidestepped by simply downloading a mirrored copy of the APK and running it (at your own risk). This workaround has |
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
NSMutableArray *animations = [NSMutableArray array]; | |
// Step 1 | |
{ | |
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform.scale"]; | |
animation.toValue = @(1.3); | |
animation.duration = 0.3; | |
animation.fillMode = kCAFillModeForwards; | |
[animations addObject:animation]; | |
} | |
{ |
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
erase_sim: | |
./reset_sim.sh 2>/dev/null; true |
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
Goto in finder /System/Library/Input Methods/CharacterPalette.app/Contents/Resources | |
copy Category-Emoji.plist | |
Ctrl+C | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<string>😀,😃,😄,😁,😆,😅,😂,🤣,☺️,😊,😇,🙂,🙃,😉,😌,😍,😘,😗,😙,😚,😋,😜,😝,😛,🤑,🤗,🤓,😎,🤡,🤠,😏,😒,😞,😔,😟,😕,🙁,☹️,😣,😖,😫,😩,😤,😠,😡,😶,😐,😑,😯,😦,😧,😮,😲,😵,😳,😱,😨,😰,😢,😥,🤤,😭,😓,😪,😴,🙄,🤔,🤥,😬,🤐,🤢,🤧,😷,🤒,🤕,😈,👿,👹,👺,💩,👻,💀,☠️,👽,👾,🤖,🎃,😺,😸,😹,😻,😼,😽,🙀,😿,😾,👐,🙌,👏,🙏,🤝,👍,👎,👊,✊,🤛,🤜,🤞,✌️,🤘,👌,👈,👉,👆,👇,☝️,✋,🤚,🖐,🖖,👋,🤙,💪,🖕,✍️,🤳,💅,💍,💄,💋,👄,👅,👂,👃,👣,👁,👀,🗣,👤,👥,👶,👦,👧,👨,👩,👱♀️,👱,👴,👵,👲,👳♀️,👳,👮♀️,👮,👷♀️,👷,💂♀️,💂,🕵️♀️,🕵️,👩⚕️,👨⚕️,👩🌾,👨🌾,👩🍳,👨🍳,👩🎓,👨🎓,👩🎤,👨🎤,👩🏫,👨🏫,👩🏭,👨🏭,👩💻,👨💻,👩💼,👨💼,👩🔧,👨🔧,👩🔬,👨🔬,👩🎨,👨🎨,👩🚒,👨🚒,👩✈️,👨✈️,👩🚀,👨🚀,👩⚖️,👨⚖️,🤶,🎅,👸,🤴,👰,🤵,👼,🤰,🙇♀️,🙇,💁,💁♂️,🙅,🙅♂️,🙆,🙆♂️,🙋,🙋♂️,🤦♀️,🤦♂️,🤷♀️,🤷♂️,🙎,🙎♂️,🙍,🙍♂️,💇,💇♂️,💆,💆♂️,🕴,💃,🕺,👯,👯♂️,🚶♀️,🚶,🏃♀️,🏃,👫,👭,👬,💑,👩❤️👩,👨❤️👨,💏,👩❤️💋👩,👨❤️💋👨,👪,👨👩👧,👨👩👧👦,👨👩👦👦,👨👩👧👧,👩👩👦,👩👩👧,👩👩👧👦,👩👩👦👦,👩👩👧👧,👨👨👦,👨👨👧,👨👨👧 |
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
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
// Do any additional setup after loading the view, typically from a nib. | |
NSString *info = @"http://codeafterhours.wordpress.com"; | |
// Generation of QR code image | |
NSData *qrCodeData = [info dataUsingEncoding:NSISOLatin1StringEncoding]; // recommended encoding | |
CIFilter *qrCodeFilter = [CIFilter filterWithName:@"CIQRCodeGenerator"]; | |
[qrCodeFilter setValue:qrCodeData forKey:@"inputMessage"]; |
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
- (void)fixVideoUrl:(NSURL *)url completion:(void (^)(NSURL *outputUrl))completion { | |
// output file | |
NSString* docFolder = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; | |
NSString* outputPath = [docFolder stringByAppendingPathComponent:@"output2.mov"]; | |
if ([[NSFileManager defaultManager] fileExistsAtPath:outputPath]) { | |
[[NSFileManager defaultManager] removeItemAtPath:outputPath error:nil]; | |
} | |
// input file | |
AVAsset* asset = [AVAsset assetWithURL:url]; |
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
- (IBAction)tamLanguageChangeButton:(id)sender { | |
__weak __typeof(self)weakSelf = self; | |
UIAlertController *alert; | |
// if user vill tap to already selected language | |
void (^cancelBlock)(UIAlertAction * _Nonnull action) = ^(UIAlertAction * _Nonnull action) { | |
dispatch_async(dispatch_get_main_queue(), ^{ | |
[weakSelf dismissViewControllerAnimated:YES completion: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
I wanted to document the process that I went through to compile taglib for my iOS project. | |
At the time of this writing I used TagLib 1.9.1 | |
1. Download taglib at: http://taglib.github.io/ | |
2. Download ios-make at: github.com/plenluno/ios-cmake | |
3. The ios-make file that you need is in the toolchain directory. Copy the whole directory “toolchain” from inside the ios-make directory to taglib directory. |
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 UIKit | |
class CustomActivity: UIActivity { | |
var actName = "" | |
var actImage: UIImage? | |
var customActionWhenTapped:( ()-> Void)! | |
init(title: String, image: UIImage, performAction: @escaping (() -> ()) ) { | |
self.actName = title | |
self.actImage = image |
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 UIKit | |
import Photos | |
extension PHPhotoLibrary { | |
// MARK: - PHPhotoLibrary+SaveImage | |
// MARK: - Public | |
func savePhoto(image:UIImage, albumName:String, completion:((PHAsset?)->())? = nil) { | |
func save() { |
OlderNewer