Skip to content

Instantly share code, notes, and snippets.

@fritz-c
fritz-c / code-blocks-in-lists.md
Created March 3, 2022 15:37
Code blocks in markdown lists

Code blocks outside of list item children

  1. My list item
my block of code
  1. Other list item
my other block of code
@fritz-c
fritz-c / README.md
Last active February 28, 2024 04:56
(PC) Final Fantasy IX - Jump rope minigame automatic jumping script (computer vision based)

FF9 Jump Rope Jumper

The jumping script in action

Setup

Download the zip for this gist, extract it into a local directory, open up the command line and navigate to that directory.

python3 -m pip install -U --user Pillow mss
@fritz-c
fritz-c / README.md
Last active February 14, 2024 17:18
Computer-vision-based Yakuza 0 Karaoke-playing program

Yakuza 0 Karaoke Singer

A computer-vision-based program to automatically play the Yakuza 0 karaoke minigame.

auto_karaoke

(Full video on reddit)

Setup

@fritz-c
fritz-c / README.md
Last active April 2, 2024 07:11
(PC) Final Fantasy X - Thunder Plains automatic lightning dodging script

FF10 Lightning Dodger

auto lightning dodging

Setup

  1. Download the lightning_dodger.py and trigger_key.py files and place them in the same directory

  2. Install dependencies:

:+1::skin-tone-6::+1::skin-tone-5::+1::skin-tone-4::+1::skin-tone-3::+1::skin-tone-2::+1:
:clap::skin-tone-6::clap::skin-tone-5::clap::skin-tone-4::clap::skin-tone-3::clap::skin-tone-2::clap:
:ok_hand::skin-tone-6::ok_hand::skin-tone-5::ok_hand::skin-tone-4::ok_hand::skin-tone-3::ok_hand::skin-tone-2::ok_hand:
:man-bowing::skin-tone-6::man-bowing::skin-tone-5::man-bowing::skin-tone-4::man-bowing::skin-tone-3::man-bowing::skin-tone-2::man-bowing:
:baby::skin-tone-6::baby::skin-tone-5::baby::skin-tone-4::baby::skin-tone-3::baby::skin-tone-2::baby:
:pray::skin-tone-6::pray::skin-tone-5::pray::skin-tone-4::pray::skin-tone-3::pray::skin-tone-2::pray:
:santa::skin-tone-6::santa::skin-tone-5::santa::skin-tone-4::santa::skin-tone-3::santa::skin-tone-2::santa:
:male-doctor::skin-tone-6::male-doctor::skin-tone-5::male-doctor::skin-tone-4::male-doctor::skin-tone-3::male-doctor::skin-tone-2::male-doctor:
:male-police-officer::skin-tone-6::male-police-officer::skin-tone-5::male-police-officer::skin-tone-4::male-police-off
@fritz-c
fritz-c / git-hubdiff
Last active November 9, 2022 19:46
Open up diff on Github
#!/usr/bin/env bash
# Opens the comparison of two commits on Github (only for repositories on Github)
# Download this script as "git-hubdiff" (no extension), chmod it to be executable and put it in your
# path somewhere (e.g. /usr/bin). You can then use it via `git hubdiff` from inside any git repo.
usage()
{
echo "USAGE"
@fritz-c
fritz-c / README.md
Created April 27, 2016 09:37
Font Awesome Wallpaper/Cheatsheet Generator

I was looking for a wallpaper to use as reference and inspiration for using new icons, and failing to find such a resource, I resorted to laying out all of the icons and screenshotting them myself.

This is the result of that effort.

@fritz-c
fritz-c / upload_changed.sh
Last active February 26, 2016 06:17
Upload all changed and new files in git to multiple servers using rsync
#!/usr/bin/env bash
#
# Push changed files to dev server
#
# License: MIT
LOCAL_BASE="/path/to/local/dir"
REMOTE_BASE="/path/to/remote/dir"
SERVER_ALIASES=("dev" "dev2" "dev3")
@fritz-c
fritz-c / git-recentco
Last active April 8, 2024 02:54 — forked from jordan-brough/git-recent
Git: Check out a branch from a list of recently checked out branches/tags/commits
#!/usr/bin/env bash
# Source: https://gist.github.com/fritz-c/c1e528b09bc1c0827a3c
# Original: https://gist.github.com/jordan-brough/48e2803c0ffa6dc2e0bd
# Download this script as "git-recentco" (no extension), chmod it to be executable and put it in your
# path somewhere (e.g. /usr/bin). You can then use it via `git recentco` from inside any git repo.
# Example:
#
@fritz-c
fritz-c / delete_last_n_histories.sh
Last active August 29, 2015 14:05
Bash delete_last_n_histories function
# Delete the last n (default 1) histories from .bash_history and the history command cache
delete_last_n_histories() {
local count last HISTTIMEFORMAT regex temp
count=$((${1:-1} + 1))
last=$(($HISTCMD - $count))
echo "Deleting the following commands from .bash_history:"; history $count
HISTTIMEFORMAT="##%s###### "
# Contruct regex to find commands in .bash_history based on timestamp