Skip to content

Instantly share code, notes, and snippets.

View cyranix's full-sized avatar

Andrew Harrison cyranix

View GitHub Profile
@cyranix
cyranix / GitLabEmailFiltering.gs
Created June 12, 2018 04:56
GitLab email filtering for Gmail, based on their custom headers.
/**
Setup:
- Create a "GitLab Catch-all" label and redirect all GitLab emails to it via normal filtering
- You can hide it from the message list, so it doesn't clutter up your sidebar
- Set this catch-all filter to skip the inbox
- Create issue and merge request labels for each GitLab project
- This gist uses nested labels like "GitLab/nifty/Issues", but customize to suit your needs
*/
@cyranix
cyranix / template.user.js
Last active February 7, 2024 02:32
Example for easy dependency loading in user-scripts, compatible with Firefox (Greasemonkey) and Chrome (native; haven't tried Tampermonkey). Because Chrome doesn't allow `@require`, this technique is useful if you're too lazy to sync up a homebrew Chrome extension with an equivalent Greasemonkey script.
// ==UserScript==
// @name <name>
// @match <URL patterns for activation>
// @description <description>
// ==/UserScript==
/**
* Outermost IIFE for bootstrapper.
* @param main Function encapsulating the real work of the script [required]
* @param dep_urls Array of URLs to dependencies [default: empty array]