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
| func textForToday() -> NSAttributedString | |
| { | |
| let sefira = Sefira() | |
| let day = sefira.dayToUseForDisplay() | |
| let prayers : KCSefiraPrayerAddition = self.flagsForPrayerComponentsEnabledByUser() | |
| let storedCustom = SettingsManager.sharedManager.custom() | |
| if let custom = KCSefiraCustom(rawValue: storedCustom) { | |
| sefiraFormatter.custom = custom | |
| } |
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
| // URL Here: | |
| var sampleURL = "http://domain.com/#order/food=chicken/drink=coke"; | |
| // Function to parse the URL | |
| function parseURL(inputURL) { | |
| /** | |
| Strategy: | |
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 requests | |
| import json | |
| url = "https://fcm.googleapis.com/fcm/send" | |
| project_key = "firebase-dashboard-project-key" | |
| headers = { | |
| "Authorization": "key={}".format(project_key), | |
| "Content-Type": "application/json" | |
| } |
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 requests | |
| import json | |
| url = "https://fcm.googleapis.com/fcm/send" | |
| project_key = "token" | |
| def send(title, text): | |
| headers = { | |
| "Authorization": "key={}".format(project_key), | |
| "Content-Type": "application/json" |
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
| func setStatusBarColor(color: UIColor) { | |
| let statusBarWindow = UIApplication.sharedApplication().valueForKey("statusBarWindow") | |
| let statusBar = statusBarWindow!.valueForKey("statusBar") | |
| let selector = Selector("setForegroundColor:") | |
| if statusBar!.respondsToSelector(selector) { | |
| statusBar!.performSelector(selector, withObject: color) | |
| } | |
| } |
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 Locator(successCallback, errorCallback) | |
| { | |
| this.success = (location) => | |
| { | |
| console.dir(location); | |
| this.pauseLocationUpdates(); | |
| successCallback(location); | |
| }; |
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 Locator(successCallback, errorCallback) | |
| { | |
| var _this = this; | |
| this.success = function(location) | |
| { | |
| console.dir(location); | |
| _this.pauseLocationUpdates(); | |
| successCallback(location); |
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
| // Untested on iOS 11, untested with App Review. YMMV. | |
| // MARK: - Theming the Status Bar | |
| private func set(statusBar color: UIColor) { | |
| guard let statusBarWindow = UIApplication.shared.value(forKey: "statusBarWindow") as? UIWindow else | |
| { | |
| print("Failed to get status bar window.") | |
| return | |
| } |
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 requests | |
| print "####################################" | |
| print "# GitHub Collaborator Counter v1.0 #" | |
| print "####################################" | |
| access_token = None | |
| if access_token is None: |
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
| /** | |
| Tested in Google Chrome on macOS. | |
| How to use: | |
| Step 1: Navigate to Ancestry.com > DNA Matches > {A match} > Shared Matches | |
| Step 2: Add a new custom group. (If you don't, the bottom group will be used.) | |
| Step 2, optional: scroll down to load more shared matches. (Only loaded matches can be seen by the script.) | |
| Step 3: Open the Developer Console. | |
| Step 4: Paste this code into the console. | |
| Step 5: Wait. The script is manually clicking buttons and it will take some time. |