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/local/bin/bash - | |
# | |
TXT_BLD=$(tput bold) | |
TXT_YLW=$(tput setaf 3) | |
TXT_RED=$(tput setaf 1) | |
TXT_GRN=$(tput setaf 2) | |
TXT_WARN="${TXT_BLD}${TXT_YLW}" | |
TXT_ERR="${TXT_BLD}${TXT_RED}" | |
TXT_OKAY="${TXT_BLD}${TXT_GRN}" | |
TXT_RST=$(tput sgr0) |
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
#! /bin/bash - | |
#set -x | |
# | |
# Copyright (c) 2017 Joyent Inc. | |
# | |
# This script will convert times from one timezone to another. | |
# | |
# Author: Jesse Butryn <jesse.butryn@joyent.com> | |
# | |
# 10/14/2017 - Initial draft. |
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
[root@JBCLAMP001 ~]# array+=('three') | |
[root@JBCLAMP001 ~]# echo ${array[@]} | |
zero one two three | |
[root@JBCLAMP001 ~]# array+='four' | |
[root@JBCLAMP001 ~]# echo ${array[@]} | |
zerofour one two three |
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 perl | |
$my_tree = '#'; | |
$max_length = 70; | |
for ($i=0; $i <= 20; ++$i) { | |
printf "%s%-${max_length}s\n", ' ' x int(($max_length - length $my_tree)/2), $my_tree; | |
$my_tree = $my_tree . '##'; | |
} | |
$my_trunk = substr( $my_tree, 0, 6 ); |
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
go () { | |
declare -A local goARR=( | |
[tools]='/Users/jessebutryn/Documents/scripts/shell/NOCTools' | |
[tmp]='/Users/jessebutryn/tmp' | |
[wtf]='/Users/jessebutryn/Documents/Reference/wtfisbash' | |
[pics]='/Users/jessebutryn/Pictures' | |
[scripts]='/Users/jessebutryn/Documents/scripts' | |
) | |
PS3='Select a directory: ' | |
if [[ -z "$1" ]]; 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
#!/usr/bin/env bash | |
#set -x | |
# | |
# Copyright (c) 2018 Joyent Inc. | |
# | |
# This script will set a reminder on your mac that generates a popup notification | |
# using applescript upon completion. | |
# | |
# shellcheck disable=SC2155 | |
# |
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
#!/bin/bash | |
declare -a alph | |
declare -a prnt | |
for l in {a..z}; do | |
alph+=( "$l" ) | |
done | |
while read -r i; do | |
if ((i==7)); 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
@@@@@@@@@ | |
@@@ /@@@@ @@ @@ ,@@@ | |
@@@ /@@@ #@@@ @@@@ @@ | |
@ @@ @& @* @@@@ &@ | |
@ @@ @ @@@@@@@@ @ | |
@ @@ #@@@ .@ @@@@@@@ @ | |
@ |
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
#!/bin/bash | |
multiples=() | |
is_mult () { | |
local n=$1 | |
local m=$2 | |
if ! (( n % m )); then | |
return 0 | |
else |
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
----------Week 1---------- | |
squat: 284 x 5 | |
squat: 284 x 5 | |
squat: 284 x 5 | |
squat: 284 x 5 | |
squat: 284 x 5 | |
bench: 210 x 5 | |
bench: 210 x 5 |
OlderNewer