Skip to content

Instantly share code, notes, and snippets.

@Yawning
Yawning / orhttp_example.go
Created April 29, 2015 14:41
How to dispatch HTTP requests via Tor in Go.
// To the extent possible under law, the Yawning Angel has waived all copyright
// and related or neighboring rights to orhttp_example, using the creative
// commons "cc0" public domain dedication. See LICENSE or
// <http://creativecommons.org/publicdomain/zero/1.0/> for full details.
package main
import (
// Things needed by the actual interface.
"golang.org/x/net/proxy"
@Che4ter
Che4ter / mozoptimize
Created March 17, 2017 08:39
Bulk mozjpeg optimizer on the current directory, works with spaces in filename
#!/bin/bash
# Compresses all .jpg/.jpeg and saves them to opt/
# works with spaces in filenames
# make sure you adjust the path to mozjpeg bin
# uses the mozilla mozjpeg encoder from https://github.com/mozilla/mozjpeg
# based on https://gist.github.com/sauramirez/e0ef5059ab637ed3e2cea090b504f385
# Che4ter - 2017
#Change to mozjpeg path
MOZJPEG='/opt/mozjpeg/bin/'
@AstraL
AstraL / template.json
Last active December 29, 2023 18:19
Portainer templates
[
{
"type": "container",
"title": "Registry",
"description": "Docker image registry",
"categories": ["docker"],
"platform": "linux",
"logo": "https://portainer-io-assets.sfo2.digitaloceanspaces.com/logos/registry.png",
"image": "registry:latest",
"ports": [
@MeguminSama
MeguminSama / Discord Experiments.js
Last active December 26, 2024 16:08
Discord Experiments.js
let cache; webpackChunkdiscord_app.push([["wp_isdev_patch"], {}, r => cache=r.c]);
var UserStore = Object.values(cache).find(m => m?.exports?.default?.getUser).exports.default;
var actions = Object.values(UserStore._dispatcher._actionHandlers._dependencyGraph.nodes);
var user = UserStore.getCurrentUser();
actions.find(n => n.name === "ExperimentStore").actionHandler.CONNECTION_OPEN({
type: "CONNECTION_OPEN", user: {flags: user.flags |= 1}, experiments: [],
});
actions.find(n => n.name === "DeveloperExperimentStore").actionHandler.CONNECTION_OPEN();
webpackChunkdiscord_app.pop(); user.flags &= ~1; "done";
@amunchet
amunchet / noVNCCopyPasteProxmox.user.js
Last active December 24, 2024 07:22
Copy/Paste for noVNC Proxmox
// ==UserScript==
// @name noVNC Paste for Proxmox
// @namespace http://tampermonkey.net/
// @version 0.2a
// @description Pastes text into a noVNC window (for use with Proxmox specifically)
// @author Chester Enright
// @match https://*
// @include /^.*novnc.*/
// @require http://code.jquery.com/jquery-3.3.1.min.js
// @grant none