Skip to content

Instantly share code, notes, and snippets.

View Necroforger's full-sized avatar
💭
drifting on

Necroforger Necroforger

💭
drifting on
View GitHub Profile
@Necroforger
Necroforger / embed.go
Last active April 6, 2024 02:22
Needs a fallthrough
//Embed ...
type Embed struct {
*discordgo.MessageEmbed
}
// Constants for message embed character limits
const (
EmbedLimitTitle = 256
EmbedLimitDescription = 2048
EmbedLimitFieldValue = 1024
@Necroforger
Necroforger / krigoapp-youtube.user.js
Created December 15, 2017 12:12
Krigoapp Userscript
// ==UserScript==
// @name Krigoapp-Youtube
// @namespace https://youtube.com/
// @version 0.1
// @description Transmit videoURL, videoThumbnail, and videoTitle data to the server
// @author Rin
// @match https://www.youtube.com/*
// @grant GM_xmlhttpRequest
// ==/UserScript==
@Necroforger
Necroforger / bot.go
Created June 30, 2018 21:07
Custom command discord bot
package main
import (
"bytes"
"encoding/json"
"flag"
"log"
"math/rand"
"os"
"os/signal"
package main
import (
"bytes"
"encoding/base64"
"flag"
"fmt"
"io/ioutil"
"log"
"sort"
@Necroforger
Necroforger / xor-image.go
Created July 31, 2018 06:09
Xor the RGB pixels of two images together, because why not
package main
import (
"flag"
"image"
"image/draw"
_ "image/gif"
_ "image/jpeg"
"image/png"
"log"
@Necroforger
Necroforger / alwaysontop.js
Last active August 31, 2018 22:55
Sets windows as always on top and borderless with hotkeys. Also allows you to drag them around
var robot = require("robot-js");
const DRAG_ENABLED = true // enable dragging
const DRAG_BUTTON = robot.BUTTON_LEFT; // Mouse button required to drag windows
const DRAG_REQUIRE_ALT = false; // Require alt to be pressed to drag a window
const DRAG_TELEPORT_MOUSE = true; // Teleport the mouse to the bottom of the video to prevent it from pausing when dragging
const DRAG_SENSITIVITY = 30; // Minimum distance mouse is required to move after clicking to drag window
const DRAG_REQUIRE_BORDERLESS = true; // Require that a window be borderless to allow dragging
const DRAG_REQUIRE_ALWAYS_ON_TOP = true; // require that a window be always on top to allow dragging
const DRAG_BOTTOM_DEADZONE = 0; // Leave a deadzone of 'n' pixels from the bottom of the window going upwards.
(function () {
// Number of pages to attempt to scroll
const pages = 1;
// sleep duration between scrolls in milliseconds.
// adjust to compensate for network speed.
const sleepDuration = 500;
/**
* Sleep for duration milliseconds
@Necroforger
Necroforger / youtube_tools.user.js
Last active September 7, 2018 04:48
Adds some extra buttons to youtube videos
// ==UserScript==
// @name Youtube Tools
// @namespace http://tampermonkey.net/
// @version 1.1
// @description Adds some extra buttons to youtube
// @author necroforger
// @match https://www.youtube.com/watch*
// @grant none
// ==/UserScript==
// ==UserScript==
// @name Youtube Tools Popout Helper
// @namespace http://tampermonkey.net/
// @version 0.2
// @description replaces links in the end screen to point towards another embed page
// @author necroforger
// @match https://www.youtube.com/embed/*?*ytt_popout=1*
// @grant none
// ==/UserScript==
@Necroforger
Necroforger / mastodon_necroforger.user.js
Last active December 2, 2018 07:45
Custom mastodon theming
// ==UserScript==
// @name mastodon_necroforger
// @version 1.4
// @description personalizing mastodon
// @author Necroforger
// @match *://mastodon.social/*
// @grant none
// ==/UserScript==
(async function () {