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
| ########## Install NGINX ############## | |
| # Install software-properties-common package to give us add-apt-repository package | |
| sudo apt-get install -y software-properties-common | |
| # Install latest nginx version from community maintained ppa | |
| sudo add-apt-repository ppa:nginx/stable | |
| # Update packages after adding ppa |
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
| // List all envs | |
| let env = ProcessInfo.processInfo.environment | |
| print(env) | |
| // List all args | |
| let arg = ProcessInfo.processInfo.arguments | |
| print(arg) |
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
| //Extensions for swift classes |
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
| # If you come from bash you might have to change your $PATH. | |
| export PATH=$HOME/bin:/usr/local/bin:$PATH:/usr/local/sbin:$PATH:~/.composer/vendor/bin | |
| # Path to your oh-my-zsh installation. | |
| export ZSH=/Users/msabukwaik/.oh-my-zsh | |
| # Set name of the theme to load. Optionally, if you set this to "random" | |
| # it'll load a random theme each time that oh-my-zsh is loaded. | |
| # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
| #ZSH_THEME="robbyrussell" |
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
| // MARK : function definition without binarytree, the problem of this solution is that the big-O of this algorithm is O(n^2) | |
| // Write a function named firstNonRepeatingLetter that takes a string input, and returns the first character that is not repeated anywhere in the string. | |
| func firstNonRepeatingLetter(_ inputString:String) -> Character?{ | |
| // Convert to lowercase | |
| let inputStringLower = inputString.lowercased() | |
| //Iterate each character in a given string | |
| for i in 0..<inputString.count{ | |
| //Compare with the other characters of the string |
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
| use_frameworks! | |
| platform :ios, '9.0' | |
| def shared_pods | |
| # Firebase | |
| pod 'Firebase' | |
| pod 'Firebase/Core' | |
| pod 'Firebase/Auth' | |
| pod 'Firebase/Database' |
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 | |
| extension IndexPath { | |
| static func fromRow(_ row: Int) -> IndexPath { | |
| return IndexPath(row: row, section: 0) | |
| } | |
| } | |
| extension UITableView { | |
| func applyChanges(section: Int = 0, deletions: [Int], insertions: [Int], updates: [Int]) { |
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 | |
| extension URL { | |
| // returns an absolute URL to the desired file in documents folder | |
| static func inDocumentsFolder(fileName: String) -> URL { | |
| return URL(fileURLWithPath: NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0], isDirectory: true) | |
| .appendingPathComponent(fileName) | |
| } | |
| } |
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 -rf ~/Library/Caches/CocoaPods; | |
| rm -fr ~/.cocoapods/repos/master/; | |
| rm -rf ~/Library/Developer/Xcode/DerivedData/* | |
| rm -rf Pods/ | |
| pod install |
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
| # Mac | |
| .DS_Store | |
| # Xcode | |
| # | |
| # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore | |
| ## Build generated | |
| build/ | |
| DerivedData/ |