Skip to content

Instantly share code, notes, and snippets.

View NegatioN's full-sized avatar

Joakim Rishaug NegatioN

View GitHub Profile
@NegatioN
NegatioN / lesstimewaste.js
Last active May 27, 2023 09:34
WeDontLikeWastingTime
var portalMain = window.frames['mainwindow'].frames['portalmain'];
var rightSideFrame; // This is named of the form *_rightside, so we search
for(let i = 0; i < portalMain.frames.length; i++) {
if(portalMain.frames[i].name.endsWith('_rightside')) {
rightSideFrame = portalMain.frames[i];
break;
}
}
var frameDoc = rightSideFrame.frames['componentframe'].document;
@NegatioN
NegatioN / backup.sh
Created November 11, 2024 17:47
Archive backup cron command
gsutil -m rsync -r -i -x ".*filesToFilterOut.*" /local/path/to/myfolder gs://mybucket/myfolder
@NegatioN
NegatioN / to_mobi.fish
Created February 3, 2025 11:43
Recursively convert epubs to mobi of a folder
#!/usr/bin/env fish
# Check if directory path is provided as an argument
if test (count $argv) -eq 0
echo "Usage: $argv[0] <directory>"
exit 1
end
function list_epub
# Check if directory path and extension are provided as arguments