Skip to content

Instantly share code, notes, and snippets.

View d0x2f's full-sized avatar
🐱

Dylan McGannon d0x2f

🐱
  • Revolut
  • Brighton, UK
  • 07:21 (UTC)
View GitHub Profile
@andyholmes
andyholmes / gjs-timeout-and-interval.js
Created January 13, 2019 06:09
Simple ports of setTimeout and setInterval in GJS
#!/usr/bin/env gjs
const GLib = imports.gi.GLib;
/**
* https://developer.mozilla.org/docs/Web/API/WindowOrWorkerGlobalScope/setInterval
* https://developer.mozilla.org/docs/Web/API/WindowOrWorkerGlobalScope/clearInterval
*/
window.setInterval = function(func, delay, ...args) {
@nealey
nealey / slack-emoji-bulk-delete.js
Last active May 25, 2023 23:09
Bulk delete every custom emoji in Slack
//
// I just found out that we have a bunch of NSFW emoji in our bulk-imported set of >4000 emoji.
// Rather than weed them out, I want to start with a blank slate. This code does that.
//
// Navigate to your "Custom Emoji" page, the one with all the delete buttons.
// Delete one of them and acknowledge that it's going away forever.
// Then open the JavaScript console and paste this in.
//
// At some point your JavaScript console will start spewing errors.
// Reload the Emoji page, delete one emoji by hand again, and paste this in again to resume.
@corux
corux / sonar-cleanup.py
Created July 29, 2016 18:07
Script to automate the deletion of old projects from SonarQube.
#!/usr/bin/env python
import argparse,collections,json,shlex,urllib,re
from datetime import datetime
from datetime import timedelta
from dateutil.parser import parse
from termcolor import colored
# Command line arguments
parser = argparse.ArgumentParser()
parser.add_argument("--dry-run", dest="dryrun", action="store_const", const=True, default=False, help="Do not delete SonarQube projects.")