Skip to content

Instantly share code, notes, and snippets.

View insanity54's full-sized avatar

Chris Grimmett insanity54

View GitHub Profile
@insanity54
insanity54 / provision.sh
Created March 22, 2024 00:16
provision a VPS
#!/bin/bash
apt install -y git mosh mg screen
git clone https://github.com/insanity54/dotfiles
cp ./dotfiles/.screenrc .
curl https://getcroc.schollz.com | bash
ufw allow 60000:61000/udp
@insanity54
insanity54 / minecraft-provision.sh
Last active February 7, 2024 06:34
VPS provisioning scripts 2024
#!/bin/bash
apt install -y git mosh mg screen
git clone https://github.com/insanity54/dotfiles
cp ./dotfiles/.screenrc .
curl https://getcroc.schollz.com | bash
git clone https://gitlab.com/crafty-controller/crafty-installer-4.0.git && \
cd crafty-installer-4.0 && \
./install_crafty.sh
ufw allow 60000:61000/udp
@insanity54
insanity54 / bunny-sign.ts
Created January 28, 2024 08:45
A method for signing BunnyCDN URLS using Token Authentication
import { add } from "npm:date-fns";
/**
* references
* - https://write.corbpie.com/how-to-do-token-authentication-urls-with-bunnycdn/
* - https://git.sr.ht/~jamesponddotco/bunnysign
* - https://bunny.net/blog/were-bringing-token-authentication-to-the-next-level/
*
*/
@insanity54
insanity54 / provision-caprover.sh
Last active August 16, 2021 19:16
Installs docker & caprover on ubuntu 18.04
#!/bin/bash
# install deps
apt update -y
apt upgrade -y
apt install -y ufw openssh-client git python3 python3-pip python-is-python3 mosh mg screen
# screen config
git clone https://github.com/insanity54/dotfiles
cp ./dotfiles/.screenrc .
@insanity54
insanity54 / blah
Last active January 1, 2021 15:57
network.scgi.open_local = /data/scgi.socket
encoding.add = UTF-8
network.port_range.set = 55000-55000
network.port_random.set = no
pieces.hash.on_completion.set = no
directory.default.set = /data/torrents
session.path.set = /data/.session
protocol.encryption.set = allow_incoming, try_outgoing, enable_retry
trackers.use_udp.set = no
dht.mode.set = off
@insanity54
insanity54 / install.sh
Created December 11, 2019 19:10
Lotus installation
#!/bin/bash
# designed for Ubuntu 18.04
# greetz https://docs.lotu.sh/en+install-lotus-ubuntu
sudo apt update
sudo apt install mesa-opencl-icd ocl-icd-opencl-dev
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt update
sudo apt install golang-go gcc git bzr jq pkg-config mesa-opencl-icd ocl-icd-opencl-dev
@insanity54
insanity54 / example.sh
Created November 10, 2019 04:14
bindir bash
#!/bin/bash
bindir="$(dirname "$(readlink -fm "$0")")"
cd "${bindir}"
@insanity54
insanity54 / robinhooder.js
Created September 28, 2019 01:13
Robinhooder
// ==UserScript==
// @name Robinhooder
// @namespace https://robinhood.com/
// @version 0.1
// @description Enhance Robinhood by showing existence/non-existence of open orders in the dashboard
// @author Chris Grimmett <chris@grimtech.net>
// @match https://robinhood.com/*
// @grant none
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js
// @run-at document-idle
# PC
## Good
https://www.newegg.com/Product/Product.aspx?item=9SIAHT38MD7290
https://www.newegg.com/Product/Product.aspx?Item=N82E16883102507
## Better
https://www.amazon.com/CYBERPOWERPC-Xtreme-GXiVR8060A5-i5-8400-GeForce/dp/B0757DVF4Z/
@insanity54
insanity54 / squad-server-setup.ps1
Last active March 25, 2019 09:50
Provision a Windows server to be a 24/7 Karkand Server (Offworld Industries Squad)
# install choco
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install -y steamcmd python vcbuildtools
# install magic-wormhole for admin purposes
python -m pip install --upgrade pip
pip install --user incremental magic-wormhole