flowchart TD
subgraph bindVolumes["Bind Volumes"]
V1["Source V1"]
V2["Source V2"]
end
subgraph staging["Staging Folder"]
T["Temp Folder"]
T1["Target V1"]
T2["Target V2"]
class Telepen: GenratorCommon, IBarcodeConstants | |
{ | |
private static Hashtable Telepen_Code = new Hashtable(); | |
private enum StartStopCode : int { START1, STOP1, START2, STOP2, START3, STOP3 }; | |
private StartStopCode StartCode = StartStopCode.START1; | |
private StartStopCode StopCode = StartStopCode.STOP1; | |
private int SwitchModeIndex = 0; | |
private int iCheckSum = 0; | |
/// <summary> |
Let's say you receive an app (e.g. MyApp.ipa) from another developer, and you want to be able to install and run it on your devices (by using ideviceinstaller, for example).
Or your certificates and provision profiles have expired and you want to provide a new build to your clients without having to make a new build on the latest XCode or iOS SDK.
The first step is to attain a Provisioning Profile which includes all of the devices you wish to install and run on. Ensure that the profile contains a certificate that you have installed in your Keychain Access (e.g. iPhone Developer: Some Body (XXXXXXXXXX) ). Download the profile (MyProfile.mobileprovision) so you can replace the profile embedded in the app.
#!/bin/bash | |
killall Xcode | |
xcrun -k | |
xcodebuild -alltargets clean | |
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache" | |
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache" | |
sudo rm -rf /Applications/Xcode.app | |
rm -rf ~/Library/Caches/com.apple.dt.Xcode | |
rm -rf ~/Library/Developer | |
rm -rf ~/Library/MobileDevice |
@ECHO OFF | |
REM Uses the file name as the profile name | |
SET MSTEAMS_PROFILE=%~n0 | |
ECHO - Using profile "%MSTEAMS_PROFILE%" | |
SET "OLD_USERPROFILE=%USERPROFILE%" | |
SET "USERPROFILE=%LOCALAPPDATA%\Microsoft\Teams\CustomProfiles\%MSTEAMS_PROFILE%" | |
ECHO - Launching MS Teams with profile %MSTEAMS_PROFILE% | |
cd "%OLD_USERPROFILE%\AppData\Local\Microsoft\Teams" | |
"%OLD_USERPROFILE%\AppData\Local\Microsoft\Teams\Update.exe" --processStart "Teams.exe" |
# Configuration | |
export PUBLIC_DNS=<public hostname> | |
export PUBLIC_IP=<public host IP> | |
export PRIVATE_IP=<private host IP> | |
mkdir docker-ca | |
chmod 0700 docker-ca/ | |
cd docker-ca/ | |
# CA key |
This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.
First be sure to enable the Docker Remote API on the remote host.
This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.
private TimeSpan getServerWaitDuration(DelegateResult<HttpResponseMessage> response) | |
{ | |
var retryAfter = response?.Result?.Headers?.RetryAfter; | |
if (retryAfter == null) | |
return TimeSpan.Zero; | |
return retryAfter.Date.HasValue | |
? retryAfter.Date.Value - DateTime.UtcNow | |
: retryAfter.Delta.GetValueOrDefault(TimeSpan.Zero); | |
} |
var authorisationEnsuringPolicy = Policy | |
.HandleResult<HttpResponseMessage>(r => r.StatusCode == HttpStatusCode.Unauthorized) | |
.RetryAsync( | |
retryCount: 1, // Consider how many retries. If auth lapses and you have valid credentials, one should be enough; too many tries can cause some auth systems to blacklist. | |
onRetryAsync: async (outcome, retryNumber, context) => FooRefreshAuthorizationAsync(context), | |
/* more configuration */); | |
var response = authorisationEnsuringPolicy.ExecuteAsync(context => DoSomethingThatRequiresAuthorization(context), cancellationToken); |
/// <summary> | |
/// Creates a Polly-based resiliency strategy that helps deal with transient faults when communicating | |
/// with the external (downstream) Computer Vision API service. | |
/// </summary> | |
/// <returns></returns> | |
private PolicyWrap<HttpResponseMessage> DefineAndRetrieveResiliencyStrategy() | |
{ | |
// Retry when these status codes are encountered. | |
HttpStatusCode[] httpStatusCodesWorthRetrying = { | |
HttpStatusCode.InternalServerError, // 500 |