Skip to content

Instantly share code, notes, and snippets.

@SJongeJongeJonge
SJongeJongeJonge / devhints-toc.user.js
Last active April 27, 2021 13:39
devhints.io TOC userscript
// ==UserScript==
// @name devhints.io TOC
// @description 26-4-2021 23:12:54 Adds a table of contents to the devhint cheatsheets.
// @version 1.0
// @author SJongeJongeJonge
// @match http*://devhints.io/*
// @exclude http*://devhints.io/
// @run-at document-end
// @grant none
// @downloadURL https://gist.github.com/SJongeJongeJonge/c6c92707e70f60a0c3187b4e70bd3215/raw/devhints-toc-userscript.js
@SJongeJongeJonge
SJongeJongeJonge / log_spf.js
Created April 6, 2021 20:11
Log spf events
const events = ['spfready', 'spfclick', 'spfhistory', 'spfrequest', 'spfprocess', 'spfdone'];
const log = event => {
console.groupCollapsed(event.type);
console.log(event);
console.groupEnd(event.type);
};
events.forEach(event => window.addEventListener(event, log));
@SJongeJongeJonge
SJongeJongeJonge / test.py
Created January 4, 2021 09:22
Open3d Tests
import open3d.visualization.gui as gui
import open3d.visualization.rendering as rendering
class TestWindow:
def __init__(self, pcd_file, width, height):
self.pcd_file = pcd_file
self._window = gui.Application.instance.create_window("Test", width, height)
w = self._window
@SJongeJongeJonge
SJongeJongeJonge / yt-blur.js
Last active September 20, 2020 22:07
YouTube thumbnail blur userscript
// ==UserScript==
// @name YouTube Thumbnail Blur
// @namespace YouTube Scripts
// @match https://www.youtube.com/*
// @grant none
// @version 1.1
// @author SJongeJongeJonge
// @description 21-9-2020 00:05:32 Blurs thumbnails on the youtube homepage.
// ==/UserScript==

Header 1

This header is quite big....

Table of Contents

  1. Sub 1
  2. Sub 2
  3. Sub 3

Subsection 1

const Discord = require('discord.js');
const client = new Discord.Client();
const prefix = '!';
client.on('message', async msg => {
if (msg.author.bot || !msg.content.startsWith(prefix)) return;
const args = msg.content.slice(prefix.length).split(' ');
if (args[0] === 'activitycheck') {