Skip to content

Instantly share code, notes, and snippets.

View RchGrav's full-sized avatar

Richard Graver RchGrav

View GitHub Profile
@RchGrav
RchGrav / setup_neural_net.bat
Last active November 18, 2021 19:31
Setup Neural Net
@echo off
REM Does generate.py exist, if so lets assume all of this script has been ran already and just execute the demo.
if exist %~dp0generate.py goto launch
REM If this script wasn't run in the context needed to install needed components lets prompt the user for their permission to do so.
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if '%errorlevel%' NEQ '0' (
@RchGrav
RchGrav / flac2mp3
Created March 19, 2019 05:33
FLAC to MP3 w/ ID3 Transfer
#!/bin/bash
for f in "$@"; do
[[ "$f" != *.flac ]] && continue
album="$(metaflac --show-tag=album "$f" | sed 's/[^=]*=//')"
artist="$(metaflac --show-tag=artist "$f" | sed 's/[^=]*=//')"
date="$(metaflac --show-tag=date "$f" | sed 's/[^=]*=//')"
title="$(metaflac --show-tag=title "$f" | sed 's/[^=]*=//')"
year="$(metaflac --show-tag=date "$f" | sed 's/[^=]*=//')"
genre="$(metaflac --show-tag=genre "$f" | sed 's/[^=]*=//')"