Skip to content

Instantly share code, notes, and snippets.

@ndbeals
ndbeals / calendarscroll.user.js
Last active May 17, 2023 14:59
Userscript - Horizontal Scroll Google Calendar
// ==UserScript==
// @name Shift Scroll google calendar
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Enables holding shift + scrolling to move to previous/next day/week/month.
// @author Nathan Beals
// @updateURL https://gitlab.com/-/snippets/2543244/raw/main/calendarscroll.user.js
// @downloadURL https://gitlab.com/-/snippets/2543244/raw/main/calendarscroll.user.js
// @match https://calendar.google.com/calendar/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
@ndbeals
ndbeals / facebook-saved-bulk-remove.user.js
Created August 24, 2022 22:21
Facebook Saved Items Bulk Remove
// ==UserScript==
// @name Facebook Saved Items Bulk Remove
// @namespace facebooksaved
// @version 0.1
// @description Bulk remove saved items from facebook
// @author Nathan Beals
// @match https://www.facebook.com/saved/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=facebook.com
// @run-at document-start
// ==/UserScript==
@ndbeals
ndbeals / ffmpeg-encode.sh
Last active July 2, 2018 22:31
ffmpeg Recursive Encode script
#!/usr/bin/env bash
ffmpeg_parse_video () {
fullfilename=$(basename -- "$1")
extension="${fullfilename##*.}"
filename="${fullfilename%.*}"
dirpath=$(dirname "$1")
ffmpeg -i "$fullfilename" -i "$filename".eng.srt -c:s copy -c:a libfdk_aac -b:a 128k -c:v libx265 -preset veryslow -pix_fmt yuv420p10le -crf 22 "$dirpath/out/$filename.mkv"
}

Keybase proof

I hereby claim:

  • I am ndbeals on github.
  • I am nathanbeals (https://keybase.io/nathanbeals) on keybase.
  • I have a public key whose fingerprint is 840D 7E42 C85C 8C4C 782D 11DC CAFC 56DF 2968 802E

To claim this, I am signing this object:

--- Class Creator.
-- Creates a basic class template and returns it to be used for further editing and extending.
-- Supports infinite class inheritence.
--@function Class
--@param base The baseclass for the newly created class to inherit from.
--@return class Returns the new class template to be edited.
function Class( base )
local class = { -- a new class metatable
base = base
}
function Class( base )
local class = { -- a new class metatable
base = base
}
class.__index = class
local classmt = { -- the new classes' meta table, this allows inheritence if the class has a base, and lets you create a new instance with <classname>()
__index = base
}