Skip to content

Instantly share code, notes, and snippets.

@Karunamon
Karunamon / guide.md
Created Jul 25, 2019
Nintendo Switch reverting to stock with no NAND backup
View guide.md

Restoring your Switch to stock WITHOUT a NAND backup.

Procedure by Nevercholt Tech (https://www.youtube.com/watch?v=gVjF_MKjSv8) - transcribed by Karunamon

Note: This procedure is somewhat advanced and, if you screw up, you are likely to hard brick your switch. *Proceed with caution!

Also note that this is a full reset. All save data, installed apps, everything will be lost.

What you need

View minimal_s3_example.py
#!/usr/bin/env python3
import boto3
sts = bot3.client('sts')
role = sts.assume_role(
RoleArn="arn:aws:iam::ACCOUNT NUMBER:role/ROLENAME",
RoleSessionName="AssumeRoleSession1"
)
credentials = assumed_role_object['Credentials']
@Karunamon
Karunamon / tvg.md
Created Jan 29, 2017
Twitch vs Glitch
View tvg.md

Twitch vs Glitch

General Description:

Streamer plays SMB3 (or similar NES game) using the BizHawk Real Time corruptor mod.

Hotkeys are mapped into various RTC functions, by a bot that hangs out in the twitch chat.

One random viewer is chosen. They have 30 seconds to !roll a d20 equivalent, which determines how many rounds of garbage are injected into the game. Other methods to get extra injections include trivia and puzzles.

@Karunamon
Karunamon / bible.py
Created Aug 8, 2016
Bible verse cog for Red-Discordbot
View bible.py
import discord
import requests
import json
import urllib
from discord.ext import commands
class Bible:
def __init__(self, bot):
View gist:4818b245b7cfe42f8a235dd8fdede447
$ brew install mu --with-emacs --verbose
==> Downloading https://github.com/djcb/mu-releases/raw/master/mu-0.9.16.tar.gz
Already downloaded: /Library/Caches/Homebrew/mu-0.9.16.tar.gz
==> Verifying mu-0.9.16.tar.gz checksum
tar xvzf /Library/Caches/Homebrew/mu-0.9.16.tar.gz
x mu-0.9.16/
x mu-0.9.16/COPYING
x mu-0.9.16/TODO
x mu-0.9.16/Makefile.in
x mu-0.9.16/guile/
View gist:7e4773825308e6c12da9b2bc5d57b910
$ EMACS=$(which emacs) brew install mu --with-emacs --verbose
=> Downloading https://github.com/djcb/mu-releases/raw/master/mu-0.9.16.tar.gz
Already downloaded: /Library/Caches/Homebrew/mu-0.9.16.tar.gz
==> Verifying mu-0.9.16.tar.gz checksum
tar xvzf /Library/Caches/Homebrew/mu-0.9.16.tar.gz
x mu-0.9.16/
x mu-0.9.16/COPYING
x mu-0.9.16/TODO
x mu-0.9.16/Makefile.in
x mu-0.9.16/guile/
@Karunamon
Karunamon / redbot.service
Created Jul 22, 2016
Systemd unit for a Twitch bot
View redbot.service
[Unit]
Description=Red-DiscordBot
After=Network.target
[Service]
Type=simple
#Yeah, it's discouraged to run as root, but this is a single purpose VM. Change user appropriately, and make sure to update the workingdirectory.
User=root
ExecStart=/usr/bin/python3.5 /root/Red-DiscordBot/red.py
Restart=on-abort
@Karunamon
Karunamon / triples.java
Last active May 16, 2016
Pythagorean triple finders, comparing a basic for loop vs a parallelStream
View triples.java
import java.util.*;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.stream.*;
class Main {
private static class tripleCandidate {
BigDecimal a;
BigDecimal b;
View SMCGP.md

%%%%%%%%%%%%%%%%%%%%%%%%%%%

Title = "Short Message Chess Game Protocol"
abbrev = "Short Message Chess Game Protocol"
category = "info"
docName = "smcgpv1-draft"
ipr = "full3978"

[pi]
private = "yes"
@Karunamon
Karunamon / stripMirc.py
Created Feb 7, 2016
Python script for cleaning mIRC color codes from IRC logs
View stripMirc.py
#!/usr/bin/env python
"""mIRC Color Code Stripper
Removes mIRC color codes from provided files.
Usage:
stripMirc.py <filename> [OUTPUT]
If OUTPUT is not specified, filename will be the original filename, with a _FIXED extension.
"""
You can’t perform that action at this time.