openssl genrsa -out .\path\to\my_cert_encrypted.key -aes256 4096
openssl genrsa -out .\path\to\my_cert.key 4096
| version: 1 | |
| directus: 11.12.0 | |
| vendor: postgres | |
| collections: | |
| - collection: cast_crew | |
| meta: | |
| accountability: all | |
| archive_app_filter: true | |
| archive_field: null | |
| archive_value: null |
| #!/bin/zsh | |
| # Install keychain via `sudo apt update && sudo apt install keychain` | |
| # Add space-delimited SSH and GPG keynames you want to load on line 7. | |
| # They will persist across terminals. | |
| keychain -q -k others --nogui --agents gpg,ssh \ | |
| id_rsa AB44DF0C6FEC01F2B396AE0429410408D95E08AA | |
| [ -z "$HOSTNAME" ] && HOSTNAME=`uname -n` | |
| [ -f $HOME/.keychain/$HOSTNAME-sh ] && \ | |
| . $HOME/.keychain/$HOSTNAME-sh |
| # Starts an SSH agent for use with git. | |
| # I designed this to share the same agent between PowerShell and Git Bash. | |
| # Make sure you set $GIT_SSH at the User or System level to point to | |
| # whichever ssh-agent.exe PowerShell is using, or else this won't work. | |
| function start_agent { | |
| /c/Windows/System32/OpenSSH/ssh-agent.exe > /dev/null | |
| # Output agent's PID to file | |
| ps -W | grep ssh-agent | awk '{print $4}' | head -n 1 > ~/.ssh/pid | |
| /c/Windows/System32/OpenSSH/ssh-add.exe ~/.ssh/id_rsa.pri # or wherever your private keys are | |
| # Gives me git info in the shell when in git directories | |
| Import-Module posh-git | |
| # Simple function to tell me if I'm in an admin window or not | |
| Function Test-Elevated | |
| { | |
| $wid = [System.Security.Principal.WindowsIdentity]::GetCurrent() | |
| $prp = New-Object System.Security.Principal.WindowsPrincipal($wid) | |
| $adm = [System.Security.Principal.WindowsBuiltInRole]::Administrator | |
| $prp.IsInRole($adm) |
| # OpenSSL root CA configuration file. | |
| [ ca ] | |
| # `man ca` | |
| default_ca = ICA_default | |
| [ CA_default ] | |
| # Directory and file locations. | |
| dir = ./ca # Where everything is kept | |
| certs = $dir/certs # Where the issued certs are kept |
| // To check if you are running as root on Unix: | |
| // 1. Add a PackageReference to Mono.Posix.NETStandard | |
| // 2. Change IsAdminstrator to the following: | |
| public static bool IsAdministrator => | |
| RuntimeInformation.IsOSPlatform(OSPlatform.Windows) | |
| ? new WindowsPrincipal(WindowsIdentity.GetCurrent()) | |
| .IsInRole(WindowsBuiltInRole.Administrator) | |
| : Mono.Unix.Native.Syscall.geteuid() == 0; |
| DECLARE @TableName varchar(50) | |
| DECLARE @SchemaName varchar(50) | |
| DECLARE @ClassNamespace varchar(512) | |
| DECLARE @ClassPrefix varchar(50) | |
| DECLARE @ClassExtends varchar(512) | |
| DECLARE @EnableAnnotations bit | |
| DECLARE @AddOnModelCreating bit | |
| DECLARE @NL varchar(2) -- newline character(s) | |
| SET @TableName = 'User' |
| using System; | |
| using System.Collections.Generic; | |
| using System.Threading.Tasks; | |
| namespace JDMallen.Gists | |
| { | |
| class Program | |
| { | |
| public static async Task Main(string[] args) | |
| { |