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
{ | |
"basics": { | |
"name": "Andrew Gerst", | |
"label": "Senior Software Engineer" | |
} | |
} |
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
function flatten(obj) { | |
const result = {}; | |
for (const key of Object.keys(obj)) { | |
if (typeof obj[key] === 'object') { | |
const nested = flatten(obj[key]); | |
for (const nestedKey of Object.keys(nested)) { | |
result[`${key}.${nestedKey}`] = nested[nestedKey]; | |
} | |
} else { | |
result[key] = obj[key]; |
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
# execute commands at a specified interval of seconds | |
function watch.command { | |
# USAGE: watch.commands [seconds] [commands...] | |
# EXAMPLE: watch.command 5 date | |
# EXAMPLE: watch.command 5 date echo 'ls -l' echo 'ps | grep "kubectl\\\|node\\\|npm\\\|puma"' | |
# EXAMPLE: watch.command 5 'date; echo; ls -l; echo; ps | grep "kubectl\\\|node\\\|npm\\\|puma"' echo date 'echo; ls -1' | |
local cmds=() | |
for arg in "${@:2}"; do | |
echo $arg | sed 's/; /;/g' | tr \; \\n | while read cmd; do | |
cmds+=($cmd) |
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
(async () => { | |
const gitlabHost = window.location.host; | |
const gitlabUser = 'andrew'; | |
const workingDirPath = '~/Desktop'; | |
const snippetDirName = 'gitlab-snippets'; | |
const getSnippetInfoForIds = async ids => { | |
const rawResponse = await fetch(`https://${gitlabHost}/api/graphql`, { | |
method: 'POST', | |
headers: { | |
'Content-Type': 'application/json', |
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 sh | |
# ASCII: http://patorjk.com/software/taag/#p=display&f=Graffiti&t=Create%20Github%20GPG%20Key | |
# SOURCE: https://gist.github.com/Gerst20051/ | |
function double_echo { | |
echo && echo | |
} | |
function newline { |
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 sh | |
# ASCII: http://patorjk.com/software/taag/#p=display&f=Graffiti&t=Docker%20Setup%20Script | |
# SOURCE: https://gist.github.com/Gerst20051/bf1341448bd43f430761c1f8150fb1b7 | |
function double_echo { | |
echo && echo | |
} | |
function newline { |
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 sh | |
# ASCII: http://patorjk.com/software/taag/#p=display&f=Graffiti&t=MacMini%20Preprovision | |
# SOURCE: https://gist.github.com/Gerst20051/1028d2ed1ca8de80afe5144e5188c745 | |
playbook_repo_name='MacMini-Ansible-Playbook' | |
playbook_repo_url="git@github.com:Gerst20051/$playbook_repo_name.git" | |
playbook_repo_directory="$HOME/$playbook_repo_name" | |
secrets_repo_name='Ansible-Playbook-Secrets' | |
secrets_repo_url="git@github.com:Gerst20051/$playbook_repo_name.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
#!/usr/bin/env sh | |
# ASCII: http://patorjk.com/software/taag/#p=display&f=Graffiti&t=Create%20Github%20SSH%20Key | |
# SOURCE: https://gist.github.com/Gerst20051/3add6fe949b7eef6b4957e5b7d3707c6 | |
github_ssh_key_directory=${1:-~/.ssh} | |
github_ssh_key_name=${2:-github_ed25519} | |
email_address=$3 # optional param - this will be prompted for if not provided | |
if [ $# -gt 0 ] && (($# < 2 || $# > 3)); then |
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
// https://onecompiler.com/javascript/3xyh52rrn | |
class ReactingNodes { | |
#nodes = {}; | |
node(component) { | |
return [this.#nodes[component], component in this.#nodes, this.update(component)]; | |
} | |
update(component) { |
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
[connections] | |
[connections.example] | |
accountname = accountname | |
username = username | |
password = password1234 | |
[options] | |
auto_completion = True | |
log_file = ../snowsql_rt.log |
NewerOlder