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
#!/bin/bash | |
# Инструкция | |
# | |
# Для начала надо попросить у техподдрежки, чтобы сменили способ 2FA с приложения Multifactor на Google Authenticator. | |
# Во время настройки Google Authenticator сделайте скриншот QR кода и сохраните его в виде картинки. | |
# На сайте webqr.com можно расшифровать QR код и получить secret для генерации OTP. | |
# Пример: otpauth://totp/Luna:username?secret=TQPNWO37ZC6J6RG22MLSOIKQR5&algorithm=SHA256 | |
# | |
# В приложении "Связка ключей" на macOS необходимо вручную создать две записи с паролями: |
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
#!/bin/bash | |
# Completely stops & unloads Checkpoint, then uninstalls. | |
#/Library/Application\ Support/Checkpoint/Endpoint\ Connect/uninstall --uninstall | |
VPN_SITE_ADDRESS="secure.contoso.com" | |
# !!! Script expects a flat DMG file, such as one created using JAMF's Composer! | |
CHECKPOINT_INSTALLER_URL="https://s3-us-west-2.amazonaws.com/my-cool-bucket/checkpoint-endpointVPN-versionDERP.dmg" | |
CHECKPOINT_INSTALLER_VOLUME="endpointVPN-835017303" | |
REMOVE_PATHS=( "/Applications/Endpoint Security VPN.app" \ | |
"/Library/Application Support/Checkpoint/" \ |
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 showMessageResetApp(){ | |
let exitAppAlert = UIAlertController(title: "Restart is needed", | |
message: "We need to restart the app on your first login to the app.\n Please reopen the app after this.", | |
preferredStyle: .alert) | |
let resetApp = UIAlertAction(title: "Close Now", style: .destructive) { | |
(alert) -> Void in | |
// home button pressed programmatically - to thorw app to background | |
UIControl().sendAction(#selector(URLSessionTask.suspend), to: UIApplication.shared, for: nil) | |
// terminaing app in background |
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
// Image+Trim.swift | |
// | |
// Copyright © 2020 Christopher Zielinski. | |
// https://gist.github.com/chriszielinski/aec9a2f2ba54745dc715dd55f5718177 | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is |
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 Foundation | |
/// Thread-safe Swift dependency injector | |
/// | |
/// **Using Injector** | |
/// 1. Call `Injector.setup()` early in the application lifecycle. | |
/// 2. In dependency classes, conform to one of `Injectable`, `Singleton`, `WeakSingleton`, `EagerSingleton`. | |
/// 3. In application code, construct dependencies using property injection like: | |
/// ``` | |
/// private let logger: TTLogger = inject() |
OlderNewer