Skip to content

Instantly share code, notes, and snippets.

View ioistired's full-sized avatar

io ioistired

View GitHub Profile
import time
from collections import defaultdict
class Entity:
def __init__(self, value):
self.value = value
self.pos = 0
self.vel = value
package main
import (
"fmt"
"math/rand"
)
func main() {
values := randomInts(100)
@MawKKe
MawKKe / split_ffmpeg.py
Last active August 7, 2021 21:50
MOVED TO: https://github.com/MawKKe/audiobook-split-ffmpeg | Split audio file with ffmpeg based on chapter metadata
#!/usr/bin/env python3
import sys
import os
import re
import subprocess as sub
import argparse
import tempfile
import json
from concurrent.futures import ThreadPoolExecutor, as_completed
@fourjr
fourjr / Discord Join Messages.js
Last active July 22, 2023 18:11
new member messages discord
loading lines: "https://gist.github.com/fourjr/f94fc112cef6da07fc274216d5755420"
Somewhere in 2020, they reduced the messages from 38 to 13.. This is the updated list on 5 December 2020.
Ctrl+Shift+I > Application > Frames > top > Scripts > a3762dfb973e0a7a21ba.js > ctrl+f "GUILD_MEMBER_JOIN" or https://canary.discordapp.com/assets/a3762dfb973e0a7a21ba.js
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_001: "[!!{username}!!](usernameOnClick) joined the party.",
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_002: "[!!{username}!!](usernameOnClick) is here.",
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_003: "Welcome, [!!{username}!!](usernameOnClick). We hope you brought pizza.",
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_004: "A wild [!!{username}!!](usernameOnClick) appeared.",
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_005: "[!!{username}!!](usernameOnClick) just landed.",
@SocraticBliss
SocraticBliss / CertNXtractionPack.cmd
Last active May 30, 2024 04:01
CertNXtractionPack
@ECHO OFF
TITLE CertNXtractionPack by SocraticBliss and SimonMKWii (R)
ECHO: && ECHO PRE-REQUISITES:
ECHO -- Get your BIS Keys (via biskeydump)
ECHO -- Dump your SYSNAND (via hekate)
ECHO -- Decrypt your PRODINFO (BIS 0 Key) and Save to file - PRODINFO.bin to your working directory (via HacDiskMount)
ECHO -- keys.txt (ie. key = 32 digit hex value) file with the following keys...
ECHO --- master_key_00
ECHO --- rsa_private_kek_generation_source
@PixelSergey
PixelSergey / dump.md
Last active May 31, 2024 23:06
Dump games with godmode9

Dumping games with Godmode9

Dumping games is the act of taking a game from your system or gamecart and copying it into a readable format onto your SD card. Dumping is perfectly legal if you keep the dumps to yourself, however sharing these dumps is piracy and is illegal.

This guide will tell you how to dump games from various formats and for various purposes. Dumping 3DS cartriges as .cia files is good if you want to install them to your system. Dumping them as .3ds files is good for emulators. Installed titles cannot be dumped as .3ds files. NDS cartiges can only be dumped as .nds files and cannot be installed (however, you can play them with emulators or flashcarts).

Dumping the RomFS of a game is primarily for romhacking purposess.

@jegfish
jegfish / example_db.py
Last active March 19, 2024 03:26
Example code for connecting to and using a postgres database using discord.py and asyncpg.
# asyncpg docs: https://magicstack.github.io/asyncpg/current/
# This uses discord.py rewrite branch and .format(). If you are using the async branch of discord.py, it shouldn't matter much
# as only 'await ctx.send()' is something you should need to change. If you are using python 3.6+, you can use f strings as opposed to
# .format() for increased efficiency.
import discord
from discord.ext import commands
import asyncio
import asyncpg
@DXsmiley
DXsmiley / grammarbot.py
Created October 26, 2017 04:49
A discord bot that corrects your writing and makes suggestions.
'''
grammar_bot.py
A discord bot that unrelentingly corrects your
writing and makes suggestions.
This is silly. Don't actually use it in anything
serious.
#!/bin/bash
echo -n Password:
read -s password
echo
hash="$(echo -n $password | openssl sha1)"
upperCase="$(echo $hash | tr '[a-z]' '[A-Z]')"
prefix="${upperCase:0:5}"
response=$(curl -s https://api.pwnedpasswords.com/range/$prefix)
while read -r line; do
@EvieePy
EvieePy / bot_example.py
Last active April 24, 2024 09:30
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.2 and the rewrite version on the lib.