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
| # iOS | |
| app_identifier "com.myapp.app" # The bundle identifier of your app | |
| apple_id "[email protected]" # Your Apple email address | |
| team_id "1234ABCD" # Developer Portal Team ID | |
| # Android | |
| json_key_file "./google-play-api-secret.json" # Path to the json secret file - Follow https://github.com/fastlane/supply#setup to get one | |
| package_name "com.myapp.app" # Your Android app package |
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
| # Ask for the user password | |
| # Script only works if sudo caches the password for a few minutes | |
| sudo true | |
| # Install kernel extra's to enable docker aufs support | |
| # sudo apt-get -y install linux-image-extra-$(uname -r) | |
| # Add Docker PPA and install latest version | |
| # sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
| # sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
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
| var https = require('https'); | |
| const endpoint = "https://spreadsheets.google.com/feeds/list/1DikXO7iDW8PjSE7GBIO-QJdVSXE7yiTuQ0MBwLBoGFM/od6/public/values?alt=json"; | |
| https.get(endpoint, function(res) { | |
| var body = ''; | |
| res.setEncoding('utf8'); | |
| res.on('data', function(chunk) { | |
| body += chunk; | |
| }); |
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
| extension UIImageView { | |
| public func cachedImage(withURL url_string:String){ | |
| if let cached = ImageCache.shared.getImage(key: url_string) { | |
| self.image = cached | |
| }else{ | |
| guard let url = NSURL(string: url_string) else { return } | |
| ImageCache.shared.fetchImage(url: url, callback: { (image) in | |
| NSOperationQueue.main().addOperation({ | |
| self.image = image | |
| }) |
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
| class ImageCache { | |
| static let shared = ImageCache() | |
| let cache: NSCache<NSString,UIImage> = NSCache() | |
| func addImage(key:String, image:UIImage) { | |
| self.cache.setObject(image, forKey: key) | |
| } | |
| func getImage(key:String) -> UIImage? { |
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
| swift package init --type library |
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
| ## | |
| # Host Database | |
| # | |
| # localhost is used to configure the loopback interface | |
| # when the system is booting. Do not change this entry. | |
| ## | |
| 127.0.0.1 localhost | |
| 255.255.255.255 broadcasthost | |
| ::1 localhost |
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
| docker-compose up --build | |
| Building website | |
| Step 1 : FROM python:2.7-slim | |
| ---> 035cf774b0b8 | |
| Step 2 : MAINTAINER Nick Janetakis <[email protected]> | |
| ---> Using cache | |
| ---> 0554b77eccd4 | |
| Step 3 : ENV INSTALL_PATH /snakeeyes | |
| ---> Using cache | |
| ---> 97e63342861a |
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
| @interface UINavigationController (Extras) | |
| - (void)changeViewController:(UIViewController *)viewController animated:(BOOL)animated; | |
| @end | |
| @implementation UINavigationController (Extras) | |
| - (void)changeViewController:(UIViewController *)viewController animated:(BOOL)animated | |
| { | |
| if ([self.childViewControllers containsObject:viewController]) { |
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
| SKStoreProductViewController *productVC = [[SKStoreProductViewController alloc]init]; | |
| [productVC setDelegate:self]; | |
| NSDictionary *productParameters = @{ SKStoreProductParameterITunesItemIdentifier : @"708802884" }; | |
| [productVC loadProductWithParameters:productParameters completionBlock:^(BOOL result, NSError *error) { | |
| // | |
| [self dismissViewControllerAnimated:NO completion:nil]; | |
| if(error) | |
| { | |
| [[[UIAlertView alloc] initWithTitle:[error localizedDescription] |