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 / 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
@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 / dbanlz.sh
Last active September 4, 2020 12:00
Erase a disk using dd - An alternative to DBAN
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
warn='!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
echo -e "$warn\n$warn\n$warn"
echo " WARNING"
@insanity54
insanity54 / shinken-notes.md
Created November 5, 2015 17:47
Shinken notes

Shinken

Installation

these steps are for debian.

prereqs

$ sudo apt-get install python-pip python-pycurl python-crypto
@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}"