Skip to content

Instantly share code, notes, and snippets.

View Alistair1231's full-sized avatar

Alistair1231 Alistair1231

View GitHub Profile
/*-----------------------------------------------------------*\
| THIS IS JUST A BACKUP FOR MY SERVER MIGRATION... |
| EVERYTHING MIGHT BE WRONG. IT WORKED FOR ME |
| AFTER MUCH FIDDLING I MIGHT HAVE FORGOTTEN SOME DETAILS |
\*------------------------------------------------------------*/
//tested with ubuntu 16.04 headless
//PIA setup
docker network create pia_network
@Alistair1231
Alistair1231 / gist:199602f16e0510a1aa3c9bde6355e571
Created July 8, 2020 17:02
kittens game script description
# Kittens-Game-automation-and-tools
> ####Hey there my fellow KG addicts. :D
> ####I was pretty annoyed with wasting so much resources and all the grind, so that I at first looked for some scripts to automate some game aspects.
> ####I started to use the snippets from [this](https://redd.it/2eqlt5) Reddit thread, but then started to write my own Userscript based on the snippets. The Userscript (kittens.user.js) only handles the UI, the rest is done in kittens.js, which gets injected via the userscript.
> ####At this time there is nearly nothing of the code snippets left in my script and I integrated a simple UI: ![screen](https://i.imgur.com/wmIclj9.png)
>> I use a modified CSS, the script only adds the stuff above the chat button
> #### Also I added a lot of features.
> ####I waited before posting the script, so that you get the script with the new UI. Everything *should* work, I use the script daily myself...
@Alistair1231
Alistair1231 / .antigen-setup.sh
Last active January 2, 2024 12:24
installs antigen and applies my personal config
#!/bin/bash
set -x
# curl -L "https://gist.githubusercontent.com/Alistair1231/aaedcf19be1102ae3d1472407f1f380e/raw/.antigen-setup.sh" | bash && zsh
# curl -L "https://gist.githubusercontent.com/Alistair1231/aaedcf19be1102ae3d1472407f1f380e/raw/.antigen-setup.sh" | sudo bash && sudo zsh
case $(command -v apt pacman dnf zypper 2>/dev/null) in
*apt) sudo apt update; sudo apt install build-essential git zsh -y;;
*pacman) sudo pacman -Sy; sudo pacman -S --noconfirm --needed base-devel git zsh;;
*dnf) sudo dnf install make automake gcc gcc-c++ kernel-devel git zsh;;
@Alistair1231
Alistair1231 / docker-compose.yaml
Created December 27, 2020 09:30
n.eko with m1k1o fork and nginx reverse proxy (ssl)
version: "2.0"
services:
neko:
image: m1k1o/neko:latest
restart: always
shm_size: "1gb"
ports:
- "8080:8080"
- "59000-59100:59000-59100/udp"
environment:
@Alistair1231
Alistair1231 / changeTitle.ps1
Created March 22, 2021 10:24
Change MKV Title to part of filename for all files in folder
# path to mkvpropedit
$propedit = "mkvpropedit"
# path where files are
$path="D:\!USENET\!Anime\Hunter X Hunter (2011)"
#substring vals
$skipCharacters=14
$saveCharacters=28
#example: skip 14, save 28
@Alistair1231
Alistair1231 / _split.ps1
Created May 4, 2021 08:16
split audio files into same length parts
# Split MP3/M4A/M4B files into 5 min parts
# Known Issues:
# recursive folders don't work. seperate files I also screwed up. Just give it 1 folder, or use _splitAll.ps1 for multiple folders.
# afterwards you can search in the folder with everything (https://www.voidtools.com/support/everything/)
# like this : "D:\!!Downloads\!audiobook\" !_ to find everything without an underscore (_) which should most likely only be the
# original files and delete them
# if windows refuses to execute the scripts try something like this in an admin powershell (Win+X A):
# Set-ExecutionPolicy Unrestricted
for ($i = 0; $i -lt $args.Count; $i++) {
@Alistair1231
Alistair1231 / newNoteFile.ps1
Created September 1, 2021 07:56
Create a new note file for current class
$dateShort=$(Get-Date -F "yyyyMMdd")
$dateLong=$(Get-Date -F "dd.MM.yyyy")
$folderName=$(split-path -leaf $(get-location))
new-item -path . -name "$folderName-$dateShort-notes.md"-ItemType "file" -Value "# $folderName Notes: $dateLong`r`n"
@Alistair1231
Alistair1231 / mangaupdatesSearch.md
Last active October 15, 2021 15:50
mangaupdates.com search shortcut firefox

Make MangaUpdates searches via your address bar

  • Save this as bookmark
  • picture 1
  • use like this
  • picture 2
  • enjoy!
  • picture 3
@Alistair1231
Alistair1231 / Z_changeSaveLocation.reg
Last active July 12, 2023 12:16
run all gog setups in current folder
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\GOG.com]
"DefaultPackPath"="D:\\Games\\"
@Alistair1231
Alistair1231 / deepl.md
Last active November 2, 2021 21:06
Deepl Firefox Searchbar with Country codes

make bookmark with following content

javascript: (function (s, url = 'https://www.deepl.com/translator#___/___/___') {
    let valsRaw = s.split(" ");
    let vals = [];
    for (let i = 0; i < 2; i++) {
        vals.push(valsRaw.shift());
    }
 vals.push("");