We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
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
jump_ | |
jump_abandon | |
jump_abuq | |
jump_acepogo | |
jump_adventure | |
jump_aggregate_zip | |
jump_ahh_c | |
jump_air | |
jump_allstars | |
jump_anime |
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 | |
# Emulate the functionality of grep through regular expressions | |
# ./script -a = echo a a | |
# ./script a = echo a at end of file | |
# ./script -g = echo idk | |
# ./script what = echo $@ | |
opts="n l i v x" |
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 | |
# given a phrase, convert into an acronym | |
# Portable Network Graphics -> PNG | |
# this assumes only that the words are separated by spaces, case doesn't matter | |
if [ -z "$1" ]; then | |
echo "Error: Please enter a quoted phrase to acronymize" | |
exit -1 |
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 | |
# Encode the given string using the ancient 'atbash' cipher technique | |
# Letters are transposed with a reverse alphabet. E.G.: | |
# a -> z, test -> gvhg, gvhg -> test | |
upperOffsetLow=101 | |
upperOffsetHigh=132 | |
lowerOffsetLow=141 |
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 | |
# Given a $1 number of cents, output the correct distribution of coins to use proper change using as few coins as possible | |
# TODO: consider some coin-agnostic refactor approach. if I want to add a new set of coins it becomes very annoying | |
c_penny=0 | |
c_nickel=0 | |
c_dime=0 | |
c_quarter=0 |
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 | |
# Try and google a prompt, then link the first result | |
if [[ $1 == "" ]]; then | |
echo "Error: Please supply an argument to search for" | |
exit | |
fi | |
input=$( echo $1 | xxd -plain | tr -d '\n' | sed 's/\(..\)/%\1/g' ) |
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 | |
# check if a given string was found in the haveibeenpwned breach database | |
prefix=$(echo -n "$1" | sha1sum | head -c 5) | |
suffix=$(echo -n "$1" | sha1sum | cut -c 6- | tr -d ' '-) | |
output=$(curl -s "https://api.pwnedpasswords.com/range/$prefix" \ | |
-H 'user-agent: asdf' |\ | |
grep -i "$suffix" ) |
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 | |
# Give a, b, and c, solve a quadratic equation using the public heroku quadratic API | |
load() { | |
echo $output | python3 -c "import sys, json; print(json.load(sys.stdin)['$1'])" | |
} | |
if [ -z $1 ] || [ -z $2 ] || [ -z $3 ]; then | |
echo "Usage: $0 a b c" |
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 | |
# Retrieve a random song from Apple's iTunes API | |
# https://affiliate.itunes.apple.com/resources/documentation/itunes-store-web-service-search-api/ | |
load() { | |
# Echo, find key pair, strip to just value, remove leading and trailing "'s | |
echo $output | grep -o $1'":"[^"]*"' | cut -d':' -f2- | sed 's/^.\|.$//g' | |
} |
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 | |
# list all public github repos for a given username | |
if [[ -z $1 ]]; then | |
echo Error: Please specify a GitHub username | |
exit -1 | |
fi | |
input="$1" |
OlderNewer