We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
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
mr Marathi | |
bs Bosnian | |
ee_TG Ewe (Togo) | |
ms Malay | |
kam_KE Kamba (Kenya) | |
mt Maltese | |
ha Hausa | |
es_HN Spanish (Honduras) | |
ml_IN Malayalam (India) | |
ro_MD Romanian (Moldova) |
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
# found at: | |
# http://stackoverflow.com/questions/1895059/git-revert-to-a-commit-by-sha-hash | |
# reset the index to the desired tree | |
git reset --hard 56e05fced | |
# move the branch pointer back to the previous HEAD | |
git reset --soft HEAD@{1} | |
git commit -m "Revert to 56e05fced" |
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
//Touch events must be implemented in the class for ex. of the control that should handle it. If it doesn't it has to be | |
//implemented in the parent class (ex. if not in the uicontrol, uibutton,table cell, tableview etc then it will go to UIView. | |
//If UIView won't handle it, then it will go to the ViewController class. It can end up to the appdelegate class). | |
//You have to call the parent's function that will implement the event manually | |
//Four methods are used to notify a responder about touches. | |
//When the user first touches the screen, the system looks for a responder that has a method called touchesBegan:withEvent: | |
//Example | |
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event |
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
// | |
// Copyright (c) 2015 Nexar Inc. - All Rights Reserved. Proprietary and confidential. | |
// | |
// Unauthorized copying of this file, via any medium is strictly prohibited. | |
import Foundation | |
import Mixpanel | |
public class Tweaks : NSObject, MPTweakObserver { | |
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
// Inspiration: https://gist.github.com/NinoScript/47819cf6fe36d6845aee32d19b423e9b | |
//: Playground - noun: a place where people can play | |
import UIKit | |
enum SavableEnum { | |
case simpleCase | |
case associatedValue(String) | |
case anotherAssociated(Int) | |
} | |
extension SavableEnum { |
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
// UIActivityTypes | |
NSString * const UIActivityTypePostToInstagram = @"com.burbn.instagram.shareextension"; | |
NSString * const UIActivityTypeFacebookMessenger = @"com.facebook.Messenger.ShareExtension"; | |
NSString * const UIActivityTypeWhatsApp = @"net.whatsapp.WhatsApp.ShareExtension"; | |
NSString * const UIActivityTypeTelegraph = @"ph.telegra.Telegraph.Share"; | |
NSString * const UIActivityTypeGmail = @"com.google.Gmail.ShareExtension"; | |
NSString * const UIActivityTypeTencent = @"com.tencent.mqq.ShareExtension"; | |
NSString * const UIActivityTypeViber = @"com.viber.app-share-extension"; | |
NSString * const UIActivityTypeTumblr = @"com.tumblr.tumblr.Share-With-Tumblr"; | |
NSString * const UIActivityTypeSkype = @"com.skype.skype.sharingextension"; |
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
// Steps to mark ODR resources | |
// Select file(image, audio, etc) - File inspector - On Demand Resource Tags - Give it a name | |
class ODR_ViewController: UIViewController { | |
var tubbyRequest : NSBundleResourceRequest? | |
@IBOutlet weak var resourceDownloadProgress: UIProgressView! //to show download progress | |
// fileName is the name of the file's ODR tag | |
// if you want to download more than 1 file, change String to [String] | |
func fetchODRResourceWithName(fileName: String) {//to be called when the file needs to be accessed |
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 | |
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
extension JSONDecoder { | |
func decode<T: Decodable>(_ type: T.Type, from data: Data, keyedBy key: String?) throws -> T { | |
if let key = key { | |
// Pass the top level key to the decoder. | |
userInfo[.jsonDecoderRootKeyName] = key | |
let root = try decode(DecodableRoot<T>.self, from: data) | |
return root.value | |
} else { |
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
extension UITabBarController { | |
/** | |
Show or hide the tab bar. | |
- Parameter hidden: `true` if the bar should be hidden. | |
- Parameter animated: `true` if the action should be animated. | |
- Parameter transitionCoordinator: An optional `UIViewControllerTransitionCoordinator` to perform the animation | |
along side with. For example during a push on a `UINavigationController`. | |
*/ |
OlderNewer