Skip to content

Instantly share code, notes, and snippets.

View MolarFox's full-sized avatar
🦊

RJ MolarFox

🦊
View GitHub Profile
@MolarFox
MolarFox / unzip_intodirs.fish
Created March 21, 2021 01:36
fish shell script to unzip all archives into their own folders in current directory
function unzip_intodirs
for zipfile in *.zip ;
set fdir (basename $zipfile .zip)
mkdir $fdir
unzip -d $fdir $zipfile
end
end
@MolarFox
MolarFox / error.yeet
Last active March 19, 2021 12:16
Excellent Error Messages
(steam:3329): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that doesn't believe we're it's parent.
@MolarFox
MolarFox / example_schema.sql
Created March 10, 2021 05:00
SQLite generating a padded serial
/* Modified extract from my db combining the two below */
BEGIN TRANSACTION;
CREATE TABLE project (
serial CHAR(7) PRIMARY KEY DEFAULT ( SUBSTR('0000000' || ABS(RANDOM() % 9999999), -7) )
);
INSERT INTO project DEFAULT VALUES;
INSERT INTO project DEFAULT VALUES;
@MolarFox
MolarFox / g
Created February 16, 2021 15:15
do you need a g?
g
@MolarFox
MolarFox / btrfs_backup.service
Last active September 14, 2022 01:27
btrfs snapshot automation script
# systemd main unit file for btrfs incremental snapshotting
[Unit]
Description=Execute btrfs snapshot routine for given volumes
[Service]
Type=oneshot
ExecStart=/usr/local/bin/btrfs_backup /home 48 # Choose partition mount point and num backups to keep here
include system.gist();
void gist1(){
Print("Herro, I am a gist!");
}