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
#!/usr/bin/env python3 | |
import requests | |
import pandas as pd | |
import os | |
import subprocess | |
from io import StringIO | |
def get_keychain_password(account, service): | |
""" |
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
import requests | |
import pandas as pd | |
import os | |
import subprocess | |
from io import StringIO | |
def get_keychain_password(account, service): | |
""" | |
Fetch a password from the macOS Keychain. | |
:param account: The account name associated with the password. |
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
# links | |
# https://github.com/pyenv/pyenv | |
# test box | |
ssh ubuntu2004 | |
# install prereqs | |
sudo su - | |
apt update | |
apt-get update |
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
# The git prompt's git commands are read-only and should not interfere with | |
# other processes. This environment variable is equivalent to running with `git | |
# --no-optional-locks`, but falls back gracefully for older versions of git. | |
# See git(1) for and git-status(1) for a description of that flag. | |
# | |
# We wrap in a local function instead of exporting the variable directly in | |
# order to avoid interfering with manually-run git commands by the user. | |
function __git_prompt_git() { | |
GIT_OPTIONAL_LOCKS=0 command git "$@" | |
} |
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
# setup for prompt | |
autoload colors; colors; | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
# export LSCOLORS="Gxfxcxdxbxegedabagacad" | |
setopt prompt_subst | |
# prompt | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}%{$fg[blue]%}(%{$fg[green]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[blue]%})%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" |
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
#!/usr/bin/env bash | |
# | |
# Copyright (c) Microsoft Corporation. All rights reserved. | |
# Licensed under the MIT License. See License.txt in the project root for license information. | |
function realpath() { python -c "import os,sys; print(os.path.realpath(sys.argv[1]))" "$0"; } | |
CONTENTS="$(dirname "$(dirname "$(dirname "$(dirname "$(realpath "$0")")")")")" | |
ELECTRON="$CONTENTS/MacOS/Electron" | |
CLI="$CONTENTS/Resources/app/out/cli.js" | |
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@" |
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
jq -r '.data[] | "\(.id), \(.attributes.name)"' |
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
# tear will print a line across the screen to sperate the output | |
function tear { | |
printf -vl "%${COLUMNS:-`tput cols 2>&-||echo 80`}s\n" && echo $'\e[1;33m'${l// /-}$'\e[0m'; | |
} |
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
snipit() { | |
[ ! -z "${1}" ] && snip_file="${1}" || snip_file='snippets.sh' | |
echo "" >> $snip_file | |
read -p "Enter comment: " comment | |
[ ! -z "${comment}" ] && echo "# ${comment}" >> $snip_file | |
fc -ln -1 | sed '1s/^[[:space:]]*//' >> $snip_file | |
[ ! -z "${comment}" ] && tail -n 2 $snip_file || tail -n 1 $snip_file | |
} |
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
Host * | |
UseKeychain yes | |
AddKeysToAgent yes | |
IdentityFile ~/.ssh/id_rsa | |
ServerAliveInterval 120 | |
TCPKeepAlive yes | |
ForwardAgent yes |
NewerOlder