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
| Array.prototype.move = function (from, to) { | |
| this.splice(to, 0, this.splice(from, 1)[0]); | |
| }; |
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 moodboards_order_array = []; | |
| function onMoveMoodboardUp(mb_index) | |
| { | |
| switch(getMoodboardFilteringMode()) | |
| { | |
| case true: | |
| // shift filtered | |
| shiftMoodBoardsFiltered(mb_index,-1); | |
| break; |
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] |
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
| 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
| ## | |
| # 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
| 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
| 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
| 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
| 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; | |
| }); |
OlderNewer