CSS
TypeScript
React
JavaScript
CSS
TypeScript
React
JavaScript
| for session in $(tmux ls | grep prefix | awk '{ print $1 }' | sed -e 's/:$//'); do tmux kill-session -t $session; done |
| #!/usr/bin/env bash | |
| # Checkout to upstream-merge branch if we're not on one | |
| BRANCH="$(git branch --show-current)" | |
| if [[ ! "$BRANCH" =~ "upstream-merge" ]]; then | |
| git checkout -b feature/upstream-merge | |
| fi | |
| # Fetch latest from upstream | |
| git fetch upstream |
| #!/usr/bin/env bash | |
| vim_session() { | |
| if [ ! -f ~/.bash_aliases ]; then | |
| echo "No ~/.bash_aliases file found" | |
| return 1 | |
| fi | |
| # Source aliases | |
| shopt -s expand_aliases |
| #!/usr/bin/env bash | |
| # time-npm-start | |
| URL="http://localhost:3000/" | |
| spinner() { | |
| I=$(( (I+1) %4 )) | |
| printf "\r${SPIN:$I:1} $1" | |
| } |
| #!/usr/bin/env bash | |
| # short-uuid | |
| UUID=$(cat /proc/sys/kernel/random/uuid) | |
| SHORT_UUID=$(echo $UUID | sed "s/-//g") | |
| SHORT_UUID=${SHORT_UUID:0:10} | |
| echo $SHORT_UUID |
| #!/usr/bin/env bash | |
| # uuid | |
| UUID=$(cat /proc/sys/kernel/random/uuid) | |
| echo $UUID |
| function TrimText() { | |
| var sheet = SpreadsheetApp.getActive(); | |
| sheet.getActiveRange().trimWhitespace(); | |
| }; |
| function CopyDown() { | |
| var sheet = SpreadsheetApp.getActive(); | |
| sheet.getCurrentCell().getNextDataCell(SpreadsheetApp.Direction.DOWN).activate(); | |
| var currentCell = sheet.getCurrentCell(); | |
| currentCell.activateAsCurrentCell(); | |
| var rangeEnd = (sheet.getSelection().getNextDataRange(SpreadsheetApp.Direction.DOWN).getLastRow()) - currentCell.getRow(); | |
| var range = sheet.getActiveSheet().getRange(currentCell.getRow(), currentCell.getColumn(), rangeEnd); | |
| currentCell.copyTo(range, SpreadsheetApp.CopyPasteType.PASTE_VALUES, false); |
| #!/usr/bin/env bash | |
| # check if websites (args passed) are up | |
| for site in $@ | |
| do | |
| echo | |
| echo $site | |
| curl -I -s $site | head -n 1 | grep -q "404" && echo down || echo up |