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 setupSentiance(completion: (() -> Void)? = nil, failure: ((_ error: SentianceError) -> Void)? = nil) { | |
if CLLocationManager.authorizationStatus() != .authorizedAlways, CMMotionActivityManager.authorizationStatus() != .authorized { return } | |
guard let realm = try? Realm(), let _ = realm.objects(User.self).first else { return } | |
if let isInitialised = SENTSDK.sharedInstance()?.getInitState() { | |
if isInitialised == .SENTInitInProgress { return } | |
if isInitialised == .SENTInitialized { | |
if let sdkStatus = SENTSDK.sharedInstance()?.getStatus()?.startStatus, sdkStatus == .started { | |
completion?() |
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
package org.digitalsprouts.example.http_client; | |
import org.glassfish.jersey.client.ClientProperties; | |
import org.glassfish.jersey.client.ClientResponse; | |
import org.glassfish.jersey.message.internal.Statuses; | |
import javax.ws.rs.core.Response; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.net.http.HttpClient; |
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
#!/usr/bin/env bash | |
# set this to your active development branch | |
# based on https://gist.github.com/pgilad/5d7e4db725a906bd7aa7 | |
develop_branch="develop" | |
current_branch="$(git rev-parse --abbrev-ref HEAD)" | |
# regex to validate in commit msg | |
commit_regex='(VUDDF-[0-9]+|merge)' | |
error_msg="Aborting commit. Your commit message is missing either a JIRA Issue ('VUDDF-1111') or 'Merge'" | |
# only check commit messages on main development branch |