I hereby claim:
- I am dougpagani on github.
- I am dougpagani (https://keybase.io/dougpagani) on keybase.
- I have a public key ASDiMu-hDDGoUYTXGi1tF_AbUs6kNlSCiy1LjRPidaFkkAo
To claim this, I am signing this object:
ssh-isolate-access() { | |
cat ~/.ssh/id_rsa.pub | command ssh "$@" ' | |
cat > ~/newakeys; | |
nohup bash -c '"'"'trap "" HUP; echo $$ > ~/killme && sleep 10 && mv -f ~/authorized_keys ~/.ssh/authorized_keys;'"'"' </dev/null &>/dev/null & disown; | |
mv ~/.ssh/authorized_keys ~/authorized_keys && | |
mv ~/newakeys ~/.ssh/authorized_keys; | |
echo DONE: close connection | |
' | |
} |
function show-something-cool() { | |
thing | |
return 0 | |
} |
function asdf() { | |
return 0 | |
} |
# obviously need to modify this, just an example | |
examples=($(find "$EXAMPLE_FILES_DIR" -iname "*.${extension}")); | |
PS3='Select which file: '; | |
select opt in "${examples[@]}"; | |
do | |
vim "${opt}" && printf "${opt}" | pbcopy && break; | |
done; |
#!/bin/bash | |
FORM_OUTPUT=$(zenity --forms \ | |
--add-entry "trigger:" \ | |
--add-entry "replacement:" \ | |
--add-combo "word:" --combo-values="false|true" \ | |
--add-combo "propagate case:" --combo-values="true|false") | |
TRIGGER=$(echo $FORM_OUTPUT | cut -d "|" -f1 | tr -d '[:space:]') | |
REPLACE=$(echo $FORM_OUTPUT | cut -d "|" -f2 | tr -d '[:space:]') |
I hereby claim:
To claim this, I am signing this object:
const WSE_FILE = './.wsaddress' | |
const fs = require('fs') | |
// https://stackoverflow.com/questions/12871740/how-to-detach-a-spawned-child-process-in-a-node-js-script | |
// https://github.com/puppeteer/puppeteer/issues/4061 | |
const LAUNCH_CONFIG = { | |
headless: false, | |
// handleSIGHUP: false, | |
// handleSIGINT: false, | |
// handleSIGTERM: false, | |
// args: dontBackgroundArgs |
// does not work because-hoisting.js | |
function calculateWinnerRecursion(squares, possibleWinConditions) { | |
if (noMorePossibleWinConditions()) { return null } | |
if (winConditionIsMet()) { return theWinner() } | |
return SELF(squares, possibleWinConditions.shift())) |
export async function uploadFileToS3(part, projectNumber, partNumber, attachmentBool, failureHandler) { | |
try { | |
// send http request to file-handler server | |
var requestResult = await uploadFileToS3Request(part, projectNumber, partNumber, attachmentBool) | |
// return the response of file-handler upload | |
return parseUploadFileToS3Response(requestResult) | |
} catch(error) { | |
failureHandler(part, projectNumber, partNumber, attachmentBool, requestResult, error) | |
} |
# This function avoids having to: | |
# - vim into the right file | |
# - write out the alias syntax | |
# - quote a commandline's embedded quotes, which can get rather gnarly | |
# - reformat from line-squashing | |
# - add negative numbers (will auto-convert) | |
# TODO: Bug with aliasing THIS line: sed 's/\ -/ \\\n\t\-/g' | |
function aliaslast() { | |
#APPEND_LOCATION=~/.bp_local | |
if [[ -f ~/dotfiles/frags/bp_scratch ]]; then |