Skip to content

Instantly share code, notes, and snippets.

View Blakeinstein's full-sized avatar
Building things, the wrong way.

Blaine Blakeinstein

Building things, the wrong way.
View GitHub Profile
@Blakeinstein
Blakeinstein / README.md
Created January 11, 2023 19:50
Move Microsoft EDGE collections to raindrop / csv

Move Microsoft edge collections to services like Raindrop (that can accept csv)

Get the sqlite db file

  1. You can find the db file in the following places
  • Windows: %LocalAppData%\Microsoft\Edge\User Data\Default\Collections
  • MacOS: ~/Library/Application Support/Microsoft Edge/Default/Collections
  • Linux: TBD
  1. Copy the files (esp. collectionsSQLite) to a seperate Folder.
@Blakeinstein
Blakeinstein / aoc-crypt.md
Created December 10, 2022 06:22
Encrypt aoc inputs via git-crypt

Input Files

Eric has requested that we do not commit the input data to our repos. At least, not encrypted.

My solution:

Use Git-Crypt

Install

@Blakeinstein
Blakeinstein / pkitty-dark.fish
Created August 20, 2022 22:18
command to set a random dark theme from pkitty in a fish env
find /usr/local/share/pretty-kitty/colors/dark -type f -name "*.conf" | shuf -n 1 | tee /dev/tty | xargs -I '{}' cp '{}' "$HOME/.config/kitty/colors.conf"
@Blakeinstein
Blakeinstein / concatRegex.ts
Created October 7, 2021 08:11
Concatinate multiple regexs
export const concatRegex = (...regexs: RegExp[]): RegExp => {
const flags = Array.from(
new Set<string>(
regexs.join().split('')
)
).join();
return new RegExp(regexs.reduce((a, b) => a + b.source, ''), flags);
}
@Blakeinstein
Blakeinstein / README.md
Created July 29, 2021 09:18
Docker compose to quickly setup minecraft servers

Instructions

  • Change OPS
@Blakeinstein
Blakeinstein / README.md
Last active May 24, 2021 21:28
Systemd service file for ASF

Systemd service config for ArchiSteamFarm

Allows ASF to run on boot.

Follow these steps to get it working

  1. Setup ASF according to their guide.
  2. Set ASF to run in headless mode by adding headless: true to ASF.json
  3. Download/Copy the file asf.service to /etc/systemd/system/
  4. Change the path for ArchiSteamFarm to point to your binary, the above expects ASF to be at /home/pi/asf/ArchiSteamFarm also change User=pi to the user you want to run asf as
  5. Reload the systemctl daemon to reflect the new service using

Keybase proof

I hereby claim:

  • I am blakeinstein on github.
  • I am blakeinstein (https://keybase.io/blakeinstein) on keybase.
  • I have a public key ASDFSwy_9e8cbJ7UpL9ZpIh2CvMOwB-UHY-iunqaE1zTDwo

To claim this, I am signing this object:

@Blakeinstein
Blakeinstein / OWOify.js
Created October 14, 2020 10:30
OwOifier for bloop
/**
{
"api":1,
"name":"OWOifier",
"description":"OWOify!",
"author":"Blaine",
"icon":"color-wheel",
"tags":"meme,text,joke,fun",
"bias":0.0
}
@Blakeinstein
Blakeinstein / script.py
Last active June 20, 2020 10:31
Uses imagemagick to prepare toolbar button icons and update items.json for chemical pfd tool
from subprocess import call
from os import walk, curdir, name, makedirs as mkdir, remove
from os.path import join, splitext, split
from json import load, dump
from re import compile
from collections import defaultdict
from sys import argv
from shutil import rmtree, copy
def repl(x):
@Blakeinstein
Blakeinstein / ImageCompress.py
Created February 6, 2020 17:33
A simple tool to compress every image in current directory using Pillow, currently supports png and jpg.
import os
import sys
from PIL import Image
#install Pillow using // pip install Pillow
def compressMe(file, verbose=False):
filepath = os.path.join(os.getcwd(), file)
oldsize = os.stat(filepath).st_size
picture = Image.open(filepath)
dim = picture.size