Skip to content

Instantly share code, notes, and snippets.

View seb-jones's full-sized avatar
🏹
The Daimyo of Data

Seb Jones seb-jones

🏹
The Daimyo of Data
View GitHub Profile
@seb-jones
seb-jones / bashjack.sh
Last active June 1, 2022 09:50
Blackjack Game written in Bash Script
#!/usr/bin/bash
#
# Simple Blackjack game written in Bash. To play, give this file
# execute permissions and run it:
# chmod u+x bashjack.sh
# ./bashjack.sh
#
# Alternatively you can run Bash with this file as an argument:
# bash bashjack.sh
#
#!/bin/bash
if [[ $# -ne 1 ]]; then
printf "Usage: %s VIDEO_FILE\n" $0
exit 1
fi
source_file=$1
framerate=$(ffmpeg -i "$source_file" 2>&1 | grep -oE '[0-9]+ fps' | grep -oE '^[0-9]+')
@seb-jones
seb-jones / pokemon-fusion-video-generator.sh
Last active September 1, 2019 09:21
The command used to compile frames generated by pokemon-fusion-frame-generator.sh into a video
# Pokemon Fusion Video Generator
#
# Simply run the following command in the 'frames' folder output by pokemon-fusion-frames-generator.sh
# (https://gist.github.com/seb-jones/2bba5c1bfb7ff224a9ca8e58a8e4dcab).
#
# Requires FFMPEG
ffmpeg -f image2 -framerate 1 -i %05d.png -s 1920x1080 pfv.avi
@seb-jones
seb-jones / pokemon-fusion-timestamp-generator.sh
Created September 1, 2019 07:40
Generates the timestamps for the Youtube Description of a video showcasing all combinations from Pokemon Fusion
#!/bin/bash
#
# Pokemon Fusion Time Stamp Generator
#
# Requires a single plaintext file containing the names of each Pokemon in the
# First Generation Pokedex, one per line, in Pokedex order.
SECONDS_PER_MINUTE=60
MINUTES_PER_HOUR=60
@seb-jones
seb-jones / pokemon-fusion-frames-generator.sh
Last active September 1, 2019 09:18
Takes the results of Pokemon Fusion Scraper and prepares them as frames for video.
#!/bin/bash
#
# Pokemon Fusion Frame Generator
#
# Takes the output of pokemon-fusion-scraper.sh (https://gist.github.com/seb-jones/f5c25453f69ec0bad53d35a733694d8e)
# and converts them into frames for a video.
#
# Requires Image Magick and the Noto Sans font
LEFT_CAPTION_FONT="Noto-Sans-Display-Regular"
@seb-jones
seb-jones / pokemon-fusion-scraper.sh
Last active September 1, 2019 09:18
Pokemon Fusion Scraper
#!/bin/bash
#
# Pokemon Fusion Scraper
#
# Simple script that uses curl to grab all the images from pokemon.alexonsager.net.
# Each image is given a meaningful name.
#
# Requires Curl
if [ ! -d images ]