Skip to content

Instantly share code, notes, and snippets.

View Jackzmc's full-sized avatar

Jackz Jackzmc

View GitHub Profile
// ==UserScript==
// @name Export Steam Workshop Subscriptions
// @version 1.0
// @description Adds a button to subscribed items page to easily export ALL workshop subscriptions to a simple JSON file.
// @author Jackz
// @match http*://steamcommunity.com/id/*/myworkshopfiles*
// @grant GM_setClipboard
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_listValues
@Jackzmc
Jackzmc / export_blocked.js
Last active February 28, 2021 04:45
Adds a button to export all blocked players as JSON file of steamids
// ==UserScript==
// @name Export Blocked Steam Players
// @version 1.0
// @description Adds a button to export all blocked players
// @author Jackz
// @match http*://steamcommunity.com/id/*/friends/blocked
// @grant GM_setClipboard
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_listValues
@Jackzmc
Jackzmc / matrix.c
Last active October 28, 2020 15:17
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <ctype.h>
#include <stdbool.h>
#include <string.h>
#include "matrix.h"
unsigned char matrixCount = 0;
matrix* matrices;
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
if [[ "$#" -lt 1 ]]; then #if less than 1
echo "Usage: ./download.sh <youtube url> [name of file] "
exit 2
fi
if [[ "$#" -ne 2 ]]; then
echo Downloading $1
OUTPUT="$DIR/%(id)s.%(ext)s"
else
@Jackzmc
Jackzmc / start.sh
Last active February 9, 2024 01:52
Minecraft spigot server auto restart watchdog script.
#!/bin/bash
JAR=$(find -type f -name 'paper-*.jar' -printf %f\\n | sort | head -1)
echo Found jar: ${JAR}
while true; do
java -server -Xms1G -Xmx1G -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=100 -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:G1MixedGCLiveThresholdPercent=35 -XX:+AlwaysPreTouch -XX:+ParallelRefProcEnabled -Dusing.aikars.flags=mcflags.emc.gs -jar ${JAR}
echo "";
for i in {5..1}; do
echo "Server has stopped. Auto-restarting in $i seconds. Ctrl+C to cancel." && sleep 1;
done
sleep 1;
@Jackzmc
Jackzmc / render.sh
Last active June 19, 2019 00:42
scripts to render blender .blend files, either with renderblender CPU or cycles GPU, and auto zipping up final result
#!/bin/bash
#category: setup arguments
main_setup() {
if [ $# -eq 0 ]; then
echo "Please specify a .blend file"
exit
fi
#category: modify arguments
blend_file=$1
shift
@Jackzmc
Jackzmc / examples.java
Last active May 25, 2019 21:59
jTower & jTowerManager w/ examples
/* in Main, you want only one instance of this */
class Main {
final jTowerManager towerManager;
@Override
public onEnable() {
towerManager = new jTowerManager(this);
}
@Override
public onDisable() {
//save towers:
## New
/dank/null
ArchitectureCraft
Chest Transporter
Clumps
Compacter
Deep Resonance
Project E
Long Fall Boots
Engineer's Doors
require('dotenv').load();
const { driver } = require('@rocket.chat/sdk');
let BotID;
start();
async function start() {
const rooms = process.env.ROOMS.split(",");
console.log(`Connecting to ${process.env.HOST} with ${process.env.USER}:${process.env.PASS}`)
await driver.connect({host:process.env.HOST,username:process.env.USER,password:process.env.PASS,rooms,});
const bot = await driver.login({username:process.env.USER,password:process.env.PASS});
/*
1. Must be logged on "socialclub.rockstargames.com" domain
2. Paste in dev tools console (CTRL+SHIFT+I)
3. Paste the below code & enter username in prompt
*/
var ID2find = prompt("What is the social club username?");
var req = new XMLHttpRequest();
req.onreadystatechange=function(){
if(req.readyState ===4){
var res = JSON.parse(req.response);