For symmetic encryption, you can use the following:
To encrypt:
openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt
To decrypt:
using System; | |
using System.IO; | |
using System.Net; | |
public static class FileDownloader | |
{ | |
private const string GOOGLE_DRIVE_DOMAIN = "drive.google.com"; | |
private const string GOOGLE_DRIVE_DOMAIN2 = "https://drive.google.com"; | |
// Normal example: FileDownloader.DownloadFileFromURLToPath( "http://example.com/file/download/link", @"C:\file.txt" ); |
#!/bin/bash | |
# Copyright © 2017 Google Inc. | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
#!/usr/bin/env bash | |
set -e | |
CONTEXT="$1" | |
if [[ -z ${CONTEXT} ]]; then | |
echo "Usage: $0 KUBE-CONTEXT" | |
exit 1 | |
fi |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Security.Claims; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Authentication; | |
using Microsoft.AspNetCore.Authentication.OAuth; | |
using Newtonsoft.Json.Linq; |
#!/bin/bash | |
# Installation: | |
# | |
# 1. vim /etc/ssh/sshd_config | |
# PrintMotd no | |
# | |
# 2. vim /etc/pam.d/login | |
# # session optional pam_motd.so | |
# |
[HtmlTargetElement(Attributes = ControllersAttributeName)] | |
[HtmlTargetElement(Attributes = ActionsAttributeName)] | |
[HtmlTargetElement(Attributes = RouteAttributeName)] | |
[HtmlTargetElement(Attributes = ClassAttributeName)] | |
public class ActiveRouteTagHelper : TagHelper | |
{ | |
private const string ActionsAttributeName = "asp-active-actions"; | |
private const string ControllersAttributeName = "asp-active-controllers"; | |
private const string ClassAttributeName = "asp-active-class"; | |
private const string RouteAttributeName = "asp-active-route"; |
You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:
ssh-agent
from Windows Services:Services
in the Start Menu
or Win+R
and then type services.msc
to launch the Services window;OpenSSH Authentication Agent
in the list and double click on it;OpenSSH Authentication Agent Properties
window that appears, choose Automatic
from the Startup type:
dropdown and click Start
from Service status:
. Make sure it now says Service status: Running
.git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
#!/usr/bin/env bash | |
set -e | |
echo "install docker bash completion" | |
curl -L https://raw.githubusercontent.com/docker/cli/v$(docker version --format '{{.Server.Version}}' | sed 's/-.*//')/contrib/completion/bash/docker -o /etc/bash_completion.d/docker | |
echo "install docker-compose bash completion" | |
sudo curl \ | |
-L https://raw.githubusercontent.com/docker/compose/1.29.2/contrib/completion/bash/docker-compose \ | |
-o /etc/bash_completion.d/docker-compose |