Skip to content

Instantly share code, notes, and snippets.

Avatar

Zack Sargent zsarge

View GitHub Profile
@zsarge
zsarge / backup_npp.rb
Created Jun 25, 2022
Back up save data (nprofile) for the game N++
View backup_npp.rb
#!/usr/bin/ruby
# This script backs up the save data for the game N++.
# It is only tested on Fedora Workstation 36.
#
# There is a rare bug in the game where save data gets corrupted,
# but the game is so long that many people still encounter it.
#
# I recommend running this script on a regular interval with cron.
#
@zsarge
zsarge / make_server_public.sh
Created Apr 29, 2022
Run Minecraft server with playit.gg tunnel
View make_server_public.sh
#!/bin/sh
echo "running playit with the config file under './playit_config/config.txt'"
playit --config-file ./playit_config/config.txt
@zsarge
zsarge / make_slideshow.sh
Created Apr 10, 2022
Make slideshow from videos from Google Photos Album
View make_slideshow.sh
#!/usr/bin/bash
# The goal of this script is to take a series of videos
# from an album export from Google Photos
# and append them all together to make one long video.
# For example, if the videos folder contained:
# ./videos
# - a.mp4
@zsarge
zsarge / google_tts.py
Created Feb 16, 2022
Convert lots of text files to mp3s using Google Text to Speech
View google_tts.py
import os
import gtts
from gtts import gTTS
from tqdm import tqdm
from time import sleep
from random import randrange
from datetime import datetime
"""
@zsarge
zsarge / install_nodejs_without_admin.ps1
Last active Jun 20, 2021
This PowerShell script installs Node.JS v16.3.0 on Windows 10 without admin privileges.
View install_nodejs_without_admin.ps1
# This powershell script installs Node.JS v16.3.0 without admin on Windows 10.
# See https://nodejs.org/en/download/ for direct download.
# A temporary path is created on your desktop called "DELETE_ME".
# Node is actually installed to %USERPROFILE%\node-v16.3.0-win-x64\
# Written by Zack Sargent on June 20th, 2021
$DesktopPath = [Environment]::GetFolderPath("Desktop")
$WorkPath = "$DesktopPath\DELETE_ME"