Skip to content

Instantly share code, notes, and snippets.

View Karunamon's full-sized avatar

Mike Parks Karunamon

View GitHub Profile
@Karunamon
Karunamon / FYDragon.ps1
Last active July 24, 2023 15:37
Dragon restart script
$processes = @("natspeak", "dragonbar", "dgnria_nmhost", "dgnsvc", "dgnuiasvr", "dgnuiasvr_x64")
foreach ($process in $processes) {
if (Get-Process $process -ErrorAction SilentlyContinue) {
Stop-Process -Name $process -Force
}
}
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
[System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") | Out-Null
@Karunamon
Karunamon / guide.md
Last active April 19, 2024 07:41
Nintendo Switch reverting to stock with no NAND backup

Restoring your Switch to stock WITHOUT a NAND backup.

Just use Haku33, it is this but automated and safe. There is no reason for you to manually follow this process, it is dangerous!

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.

@Karunamon
Karunamon / minimal_s3_example.py
Created February 8, 2019 02:01
Boto3 with IAM roles
#!/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 January 29, 2017 00:33
Twitch vs Glitch

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 August 8, 2016 13:15
Bible verse cog for Red-Discordbot
import discord
import requests
import json
import urllib
from discord.ext import commands
class Bible:
def __init__(self, bot):
@Karunamon
Karunamon / gist:4818b245b7cfe42f8a235dd8fdede447
Created July 26, 2016 15:29
Install mu without the EMACS var
$ 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 / gist:7e4773825308e6c12da9b2bc5d57b910
Created July 26, 2016 15:26
Install mu with the EMACS var
$ 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 July 22, 2016 15:43
Systemd unit for a Twitch bot
[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 15:30
Pythagorean triple finders, comparing a basic for loop vs a parallelStream
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;
@Karunamon
Karunamon / SMCGP.md
Last active February 14, 2016 21:50
SMCGP

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

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

[pi]

private = "yes"