This file contains 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
# Example docker-compose.yml for plex. | |
version: "2" | |
services: | |
plex: | |
image: plexinc/pms-docker:plexpass | |
runtime: nvidia | |
container_name: "plex" | |
restart: always | |
hostname: "MY-PLEX" | |
volumes: |
This file contains 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
const string host = "domainna.me"; | |
const string username = "chucknorris"; | |
const string password = "norrischuck"; | |
const string workingdirectory = "/highway/hell"; | |
const string uploadfile = @"c:\yourfilegoeshere.txt"; | |
Console.WriteLine("Creating client and connecting"); | |
using (var client = new SftpClient(host, port, username, password)) | |
{ | |
client.Connect(); |
This file contains 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
internal static class MyRfc6238AuthenticationService | |
{ | |
private static readonly DateTime UnixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); | |
private static readonly TimeSpan DefaultTimeStep = TimeSpan.FromMinutes(3); | |
private static readonly Encoding Encoding = new UTF8Encoding(false, true); | |
private static int ComputeTotp(HashAlgorithm hashAlgorithm, ulong timestepNumber, string modifier) | |
{ | |
// # of 0's = length of pin | |
const int mod = 1000000; |