Skip to content

Instantly share code, notes, and snippets.

@ioistired
ioistired / repository_names.rb
Created June 1, 2020 22:56
github repository name generator
# Creates a fun suggested name for users
def suggested_name
prefix = rand < 0.25 ? "octo-" : ""
"#{adjectives.sample}-#{prefix}#{nouns.sample}"
end
ADJECTIVES = %w[
animated
automatic
bookish
@ioistired
ioistired / make-certs.sh
Last active February 28, 2024 10:58
make caddy certs (make sure ports 80 and 443 are open first)
#!/usr/bin/env bash
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
exit
fi
tmp=$(mktemp --directory)
cd $tmp
wget --content-disposition 'https://caddyserver.com/download/linux/amd64?license=personal'
@ioistired
ioistired / revisionist.py
Last active April 29, 2023 08:10
Discord selfbot that lets you see when people edit or delete their messages
#!/usr/bin/env python3
# encoding: utf-8
"""
Revisionist: logs Discord message edits and revisions
Copyright © 2017 Benjamin Mintz
https://bmintz.mit-license.org/@2017
"""
import discord
@ioistired
ioistired / npm-acronyms.txt
Last active February 15, 2022 19:54
All the things that "npm" stands for. Taken from https://npmjs.org
Nauseating Pumpkin Mush
Nebulous Pumpkin Moons
Neurotic Pumpkin Murderer
Neutral Pumpkin Mews
Never-ending Pumpkin Mulch
Nice Pumpkin Machete
Nifty Pumpkin Mill
Ninja Pumpkin Mutants
Nitrogen Pumpkin Mulch
Nocturnal Pumpkin Maelstrom
{
"people": [
{
"names": [
"grinning"
],
"surrogates": "😀",
"unicodeVersion": 6.1
},
{
@ioistired
ioistired / bot_example.py
Last active September 9, 2019 20:13 — forked from EvieePy/bot_example.py
A Cogs Example for the rewrite version of - discord.py
import discord
from discord.ext import commands
import sys, traceback
"""This is a multi file example showcasing many features of the command extension and the use of cogs.
These are examples only and are not intended to be used as a fully functioning bot. Rather they should give you a basic
understanding and platform for creating your own bot.
These examples make use of Python 3.6+ and the 1.0.0 version on the lib.
@ioistired
ioistired / inspectable_timeit.py
Last active June 26, 2019 20:05 — forked from imayhaveborkedit/timeit.py
Like `python -m timeit` but you can probe the results
import timeit as _timeit
import math
import sys
import warnings
from dataclasses import dataclass, field
from typing import List
def timeit(stmt, *, setup='pass', repeat=5, number=0, precision=3, globals=None):
timer = _timeit.Timer(stmt, setup, globals=globals)
@ioistired
ioistired / emote_collector.utils.image.py
Created December 2, 2018 01:29
emote collector memory leak debugging
import contextlib
import imghdr
import io
import logging
logger = logging.getLogger(__name__)
try:
import wand.image
except ImportError:
@ioistired
ioistired / jsfuckhello.js
Created February 21, 2015 05:03
JSFuck Hello World
[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+
@ioistired
ioistired / .gitignore
Last active August 17, 2018 08:39
discord.py@rewrite tool to monkey patch functions that run before every invocation of Messageble.send
*.swp
*.py[cod]
venv/
.venv/