Skip to content

Instantly share code, notes, and snippets.

View gist:9ace2755c3ba2af78ce76bc5eb07b5c7
Delivered-To: jesse.butryn@joyent.com
Received: by 2002:ab0:30cb:0:0:0:0:0 with SMTP id c11csp2567588uam;
Fri, 5 Jul 2019 10:08:37 -0700 (PDT)
X-Received: by 2002:a1c:d10c:: with SMTP id i12mr4211806wmg.152.1562346517130;
Fri, 05 Jul 2019 10:08:37 -0700 (PDT)
ARC-Seal: i=3; a=rsa-sha256; t=1562346517; cv=pass;
d=google.com; s=arc-20160816;
b=NDulo+3LZSabFv7iJ7HtpCGatX8lFtYd3bLsF9/zFGmYB0osxz3NXUlKYMjO2yKiEt
dU9f9siaIw6y0NucDrIhc3QSDDX1QZGPxKxIhc7HwtTs76ZMIEHBJcqZ/Ik7ukXDuwKR
+sQRqZwKw0j+vmNr/76N+34qtMsxSLcHYu19bN3rkeHwyYcULrI/5gHwFsIAuUd8+m3D
@jessebutryn
jessebutryn / make_prog
Created Jun 8, 2019
This script will create a 12 week lifting program based on your 1 rep maxes
View make_prog
#!/usr/bin/env bash
# VARIABLES
##################################
weeks[1]='70:5'
weeks[2]='75:3'
weeks[3]='80:1'
weeks[4]='75:5'
weeks[5]='80:3'
weeks[6]='85:1'
View gist:93285966fd76e353968022c19c8dd1da
----------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
View gist:a03e5197d8da6e702733aae669128945
#!/bin/bash
multiples=()
is_mult () {
local n=$1
local m=$2
if ! (( n % m )); then
return 0
else
View gist:84b0f2d9cdb5da60b7a8efa292338ebd
@@@@@@@@@
@@@ /@@@@ @@ @@ ,@@@
@@@ /@@@ #@@@ @@@@ @@
@ @@ @& @* @@@@ &@
@ @@ @ @@@@@@@@ @
@ @@ #@@@ .@ @@@@@@@ @
@
@jessebutryn
jessebutryn / obfuscated.sh
Last active Apr 19, 2018
Hello world script
View obfuscated.sh
#!/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
@jessebutryn
jessebutryn / mac-notify
Last active Mar 3, 2018
Mac notify script
View mac-notify
#!/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
#
View gist:fdbbab721c94fb6a5b6d63b16f529384
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
View tree.pl
#! /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 );
View gist:51c7ab0a4303745c9d432ee806a68c10
[root@JBCLAMP001 ~]# array+=('three')
[root@JBCLAMP001 ~]# echo ${array[@]}
zero one two three
[root@JBCLAMP001 ~]# array+='four'
[root@JBCLAMP001 ~]# echo ${array[@]}
zerofour one two three