Skip to content

Instantly share code, notes, and snippets.

$ErrorActionPreference = "Stop"
$tempDir = Join-Path ([System.IO.Path]::GetTempPath()) ([System.IO.Path]::GetRandomFileName())
$null = New-Item -ItemType Directory -Path $tempDir -Force -ErrorAction SilentlyContinue
try {
$metadata = Invoke-RestMethod "https://api.github.com/repos/git-for-windows/git/releases/latest"
$downloadUrl = $metadata.assets.browser_download_url -match "Git-.+-64-bit.exe"
Write-Verbose "download package from '$downloadURL'" -Verbose
$ErrorActionPreference = "Stop"
$tempDir = Join-Path ([System.IO.Path]::GetTempPath()) ([System.IO.Path]::GetRandomFileName())
$null = New-Item -ItemType Directory -Path $tempDir -Force -ErrorAction SilentlyContinue
try {
$originalValue = [Net.ServicePointManager]::SecurityProtocol
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
$metadata = Invoke-RestMethod https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/metadata.json
$release = $metadata.LTSReleaseTag[0] -replace '^v'
# Path to your oh-my-zsh installation.
export ZSH="/Users/alexgwolff/.oh-my-zsh"
ZSH_THEME="cloud"
plugins=(git rustup rust minikube kubectl kubectx git-flow gh dotenv docker deno)
source $ZSH/oh-my-zsh.sh
# alias
alias sublime=subl

Using resident keys If your security key supports FIDO2 resident keys*, like the YubiKey 5 Series, YubiKey 5 FIPS Series, or the Security Key NFC by Yubico, you can enable this when creating your SSH key:

$ ssh-keygen -t ecdsa-sk -O resident

This works the same as before, except a resident key is easier to import to a new computer because it can be loaded directly from the security key. To use the SSH key on a new computer, make sure you have ssh-agent running and simply run:

$ ssh-add -K

This will load a “key handle” into the SSH agent and make the key available for use on the new computer. This works great for short visits, but it won’t last forever – you’ll need to run ssh-add again if you reboot the computer, for example. To import the key permanently, instead run:

sudo chown -R root:staff /path/to/dir
git rm --cached <file-name> or git rm -r --cached <folder-name>
@alexgwolff
alexgwolff / ei.cfg
Created May 7, 2020 00:40
folder source
[Channel]
_Default
[VL]
0
New-Item -Path .\projects -ItemType SymbolicLink -Value D:\projects\
const ShadowRoot = ({ content, children }) => {
const container = useRef(null);
useEffect(() => {
if (container) {
const shadowRoot = container.current.attachShadow({ mode: 'open' });
ReactDOM.render(children, shadowRoot);
}
}, []);
return (
<div style={{ height: '100%', width: '100%' }} ref={container}>
git config --global user.name "Alex G. Wolff"
git config --global user.email 13754094+alexgwolff@users.noreply.github.com