Skip to content

Instantly share code, notes, and snippets.

Avatar

btarg iCrazyBlaze

View GitHub Profile
@iCrazyBlaze
iCrazyBlaze / discord_name.js
Last active Mar 24, 2021
Get Discord username from console (for browser user scripts and custom clients)
View discord_name.js
// Get Discord name from bottom left corner text box
const name = document.getElementsByClassName("size14-e6ZScH title-eS5yk3")[0].innerHTML;
const tag = document.getElementsByClassName("hovered-d5PMVU")[0].innerHTML;
const username_full = name + tag
@iCrazyBlaze
iCrazyBlaze / crashcreator.bat
Created Jan 18, 2021
Discord Crash Video Creator
View crashcreator.bat
@echo off
title Discord Crash Video Creator
color c
echo ========================= NOTE =========================
echo This script creates videos that crash Discord/Chrome.
echo Hardware acceleration must be enabled for it to work.
echo Crash videos will get you banned in some Discord groups!
echo.
echo FFmpeg needs to be installed for this to work:
@iCrazyBlaze
iCrazyBlaze / get-sm64pc.sh
Last active Jun 3, 2020
Download and build SM64PC for MYSYS2 on Windows (get-sm64pc) [LEGACY: get the new script here https://sm64pc.info/forum/viewtopic.php?f=4&t=2&i=2]
View get-sm64pc.sh
#!/bin/bash
# https://www.reddit.com/r/SM64PC/comments/ggnghp/how_to_download_sm64pc/fqno5zw?utm_source=share&utm_medium=web2x
# Please use -h or --help for usage.
# Setup
TEMP=$(getopt -o o:fh --long outpath:,flush,help -- "$@")
eval set -- "$TEMP"
# Defaults
@iCrazyBlaze
iCrazyBlaze / launch_minecraft.bat
Created Nov 5, 2019
Minecraft portable launcher windows
View launch_minecraft.bat
@echo off
title Minecraft
echo Launching Minecraft...
"%CD%\bin\Minecraft.exe" --workDir "%CD%\data\.minecraft"
@iCrazyBlaze
iCrazyBlaze / InitMods.cs
Created Sep 30, 2019
Mod.io Unity: Load mods
View InitMods.cs
using System.Collections.Generic;
using UnityEngine;
using ModIO;
using System.IO;
public class InitMods : MonoBehaviour
{
public string bundleName = "modbundle";
// Start is called before the first frame update
@iCrazyBlaze
iCrazyBlaze / launch.sh
Created Sep 28, 2019
Launch Minecraft is Screen virtual terminal
View launch.sh
#!/bin/bash
sudo screen -S mcs java -Xms1G -Xmx7G -d64 -jar server.jar nogui
@iCrazyBlaze
iCrazyBlaze / mc-setup.sh
Last active Oct 7, 2019
Google Cloud Minecraft server setup
View mc-setup.sh
#!/bin/bash
###########################################################
# Google Cloud Minecraft server setup
# Written by iCrazyBlaze
# Last edited 07/10/2019
###########################################################
path=/home/minecraft/server
backuphours=6
@iCrazyBlaze
iCrazyBlaze / updater.sh
Created Sep 25, 2019
Minecraft Server update script from Minecraft Wiki
View updater.sh
#----------------------------------------
# A shell script for updating the minecraft server jar file on Linux Servers
# Written by: Andrew Haskell
# Updated by: Zukaro Travon
# Last updated on: 2019.Sep.23
# Distributed under The MIT License (MIT)
#
# Dependencies
# cURL For downloading of the manifest and jar files
# jq For parsing the manifests
@iCrazyBlaze
iCrazyBlaze / backup.sh
Created Sep 25, 2019
Minecraft backups for Google Cloud
View backup.sh
#!/bin/bash
screen -r mcs -X stuff '/save-all\n/save-off\n'
/usr/bin/gsutil cp -R ${BASH_SOURCE%/*}/world gs://<bucket>/$(date "+%Y%m%d-%H%M%S")-world
screen -r mcs -X stuff '/save-on\n'
@iCrazyBlaze
iCrazyBlaze / mcapi.py
Last active May 7, 2019
[UPDATED] Get MC UUID from username (for use with APIs like Crafatar)
View mcapi.py
import requests
import urllib.request
import json
while True:
username = input("Enter username: ")
try:
# Make requests to Mojang API and grab info
data = urllib.request.urlopen("https://api.mojang.com/users/profiles/minecraft/" + username).read()
uuid = json.loads(data)["id"]