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
- (void) uploadFileURL: (NSURL *) fileURL key: (NSString *) key content: (NSString *) contentType { | |
// TODO: TRANSER MANAGER NEED TO BE UPDATED BASED REGISTER KEY | |
AWSS3TransferUtility *transferUtility = [AWSS3TransferUtility S3TransferUtilityForKey:AWSS3_TRANSFER_MANAGER_CONFIGURATION_LMS]; | |
@weakify(self) | |
//Create the completion handler for the transfer | |
AWSS3TransferUtilityUploadCompletionHandlerBlock completionHandler = ^(AWSS3TransferUtilityUploadTask *task, NSError *error) { | |
dispatch_async(dispatch_get_main_queue(), ^{ | |
@strongify(self) |
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
{ | |
"songs" : [ { | |
"artist" : "The Tallest Man on Earth", | |
"img_url" : "http://fireflygrove.com/songnotes/images/artists/TheTallestManOnEarth.jpg", | |
"title" : "1904 up down", | |
"web_url" : "http://www.songnotes.cc/songs/78-the-tallest-man-on-earth-1904", | |
"year" : "2012" | |
}, { | |
"artist" : "Dave Matthews", | |
"img_url" : "http://fireflygrove.com/songnotes/images/artists/DaveMatthews.jpg", |
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
function removePushNotification(body, prevNotificationID){ | |
var notification = new apn.Notification(); | |
notification.expiry = Math.floor(Date.now() / 1000) + 60; // Expires 1 min from now. | |
notification.badge = 1; //you can update the count as it required | |
notification.alert = body.alertMessage; | |
// for Silent Notification | |
notification.sound = ""; |
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 apn = require('apn'); | |
var options = { | |
token: { | |
key: './keys/AuthKey_XXXXXXXXXX.p8', | |
keyId: "XXXXXXXXXX", | |
teamId: "XXXXXXXXXX" | |
}, | |
production: false | |
}; |
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
let navigationController: UINavigationController | |
private static let storyboardName: String = <#Module Storyboard Name#> | |
private let httpService: <#HTTP Service Type#> | |
private let storyBoard = UIStoryboard(name: storyboardName, bundle: nil) | |
lazy var rootViewController: <#View Controller#> = { | |
if let lvc = self.storyBoard.instantiateViewController( | |
withIdentifier: <#View Controller#>.className | |
) as? <#View Controller#> { |
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
default_platform :ios | |
platform :ios do | |
desc "Submit a new Beta Build to Hockey App" | |
lane :beta do | |
if !is_ci? | |
changelog = prompt(text: "Please enter what's changed in one sentenence: ") | |
end |
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
import UIKit | |
/// CREDIT: https://stackoverflow.com/a/40957338/2666902 | |
/// GradientView is an IBDesignable Class. It will help you to put two gradient in a View | |
/// Even you can set whether the gradient will be put horizontally or vertically. | |
/// Instructions to use: | |
/// 1. set Class Name of the UIView to `GradientView` in storyboard (identity inspector) | |
/// 2. set specific colors/properties in attribute inspector |
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
branch="$(git rev-parse --abbrev-ref HEAD)" | |
#---------------------------------------------------------------- | |
# RESTRICT BRANCHES FROM DIRECT PUSH | |
#---------------------------------------------------------------- | |
if [ "$branch" = "master" ] || [ "$branch" = "release" ]; then | |
echo "You can't commit directly to $branch" | |
exit 1 | |
fi |
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
#---------------------------------------------------------------- | |
# PREVENT YOUR CODEBASE GETTING SPOILED BY DEVELOPERS | |
# - YOU NEED TO THIS pre-commit file (without any extension) | |
# at ".git/hooks/" folder. | |
# - THEN TRY TO PUT WRONG STYLED/LINT CODE | |
#---------------------------------------------------------------- | |
branch="$(git rev-parse --abbrev-ref HEAD)" | |
#---------------------------------------------------------------- |
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
rm node_modules/react-native/local-cli/core/__fixtures__/files/package.json |
NewerOlder