Skip to content

Instantly share code, notes, and snippets.

View kizza42's full-sized avatar

Kieran Vella kizza42

View GitHub Profile
@kizza42
kizza42 / archiveInbox.gs
Created April 5, 2023 05:28 — forked from agirton/archiveInbox.gs
Gmail App Auto Archive
/**
* Archive all read emails that have been read and
* it has been 7 days.
*
*/
function archiveInbox() {
// search for threads based on following parameters
var threads = GmailApp.search('label:inbox is:read older_than:7d');
for(var i=0; i<threads.length; i++) {
@kizza42
kizza42 / remove_mail_archive.txt
Created April 5, 2023 05:28 — forked from Galarius/remove_mail_archive.txt
gmail: remove archive
has:nouserlabels !in:Inbox -label:sent -label:drafts
@kizza42
kizza42 / Build_Act_Regions.lua
Created October 30, 2025 05:19
A Reaper script to create Act 1 & Act 2 regions from correctly labelled markers. To be used in conjunction with my Qlab Template
-- Build Act 1/Act 2 regions from named markers, then delete ONLY the used markers
-- Return: pos, id (id = markrgnindexnumber needed for safe deletion)
local function findMarker(name)
local target = (name or ""):gsub("%s+", " "):match("^%s*(.-)%s*$"):upper()
local _, num_markers, num_regions = reaper.CountProjectMarkers(0)
local total = num_markers + num_regions
for i = 0, total - 1 do
local ret, isrgn, pos, rgnend, nm, id = reaper.EnumProjectMarkers3(0, i)
if ret == 0 then break end
if not isrgn and nm then
@kizza42
kizza42 / Check_Any_Track_Armed.lua
Last active October 31, 2025 01:28
Reaper script to check if any tracks are Record Armed
-- Check_Any_Track_Armed.lua
-- Writes armed track count and timestamp for QLab to read. Silent inside REAPER.
local resource = reaper.GetResourcePath()
local status_path = resource .. "/reaper-qlab-status.txt"
-- Count armed tracks
local armed = 0
for i = 0, reaper.CountTracks(0) - 1 do
local tr = reaper.GetTrack(0, i)