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:
| # A basic .muttrc for use with Gmail | |
| # Change the following six lines to match your Gmail account details | |
| set imap_user = "shreesh@kayak.com" | |
| set copy=yes | |
| set smtp_url = "smtps://shreesh@kayak.com@smtp.gmail.com:465/" | |
| set from = "shreesh@kayak.com" | |
| set realname = "shreesh ayachit" | |
| # Change the following line to a different editor you prefer. |
| import subprocess | |
| import re | |
| # Grab password from macOS keychain | |
| def grab_gh_password(): | |
| invocation = ['security', 'find-internet-password', '-gs', 'github.com'] | |
| block = subprocess.Popen(invocation, stdout = subprocess.PIPE, stderr = subprocess.PIPE) | |
| lastline = block.stderr.read().strip().decode("utf-8") | |
| parsed_password = re.sub('password: "(.*)"', '\\1', lastline) | |
| return parsed_password |
| #!/usr/bin/env bash | |
| # FILE: timo-make.sh | |
| # readline for facilitating | |
| set -euo pipefail | |
| ############################################################ | |
| #{{{ Helpers | |
| tmuxdims () | |
| { | |
| local WINDEX=${1:-$(tmux display-message -p '#I')}; | |
| tmux list-windows | \grep -i "^${WINDEX}" | cut -f 3- -d'[' | sed 's/layout //' | sed 's/ @.*//' | sed 's/.$//' |
| typify-file () | |
| { | |
| opwd="$PWD"; | |
| type -a "$1"; | |
| cmdpath=$(type -P "$1"); | |
| if ( test -e "$cmdpath" ); then | |
| count=0; | |
| while ( test -L "$cmdpath" ); do | |
| (( count++ )); | |
| linkrelative=$(readlink -n "$cmdpath"); |
| # https://bashrules.blogspot.com/2006/04/bash-order-of-expansions.html | |
| # http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_04.html | |
| alias bashexpandorder='echo '\'' | |
| 1. {} brace | |
| 2. ~ tilde | |
| 3. $VAR parameter & variable | |
| 4. $() command-substitution | |
| 5. $(()) arithmetic expansion | |
| 6. (IFS) word-splitting | |
| 7. * ? [ filename expansion (-f will disable) |
| #!/bin/bash | |
| unset PASSWORD | |
| unset CHARCOUNT | |
| echo -n "Enter password: " | |
| stty -echo | |
| CHARCOUNT=0 |
| # 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 |
| 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) | |
| } |
| // does not work because-hoisting.js | |
| function calculateWinnerRecursion(squares, possibleWinConditions) { | |
| if (noMorePossibleWinConditions()) { return null } | |
| if (winConditionIsMet()) { return theWinner() } | |
| return SELF(squares, possibleWinConditions.shift())) |
I hereby claim:
To claim this, I am signing this object: