Skip to content

Instantly share code, notes, and snippets.

View xacrimon's full-sized avatar

Joel Wejdenstål xacrimon

View GitHub Profile
@xacrimon
xacrimon / skript-essentialsy.txt
Created January 8, 2018 17:09
Useful lines of code for the skript-essentialsy project
# Send the player the no permission message.
send(player, {@npm})
sudo dd if=/dev/sda conv=sync,noerror bs=64K | gzip -6c > /PATH/TO/DRIVE/backup_image.img.lz4
#!/bin/sh
# curl -s https://gist.github.com/2legal2/787617fe861fea54c15a57caae3544b0/raw | bash
# Contains useless shit, proceed at own risk
echo "[1] Big Shaq - Mans not hot"
echo "[2] Rich Chigga - Glow like dat"
echo ""
read c
@xacrimon
xacrimon / backup.sh
Last active April 24, 2024 22:22
Backup script using tar and xz for arch linux
#!/bin/sh
if [[ $(whoami) != "root" ]]
then echo "Please run as root"
exit 1
fi
if [ "$(ls /bin | grep trizen)" == "trizen" ]
then
PKGMAN=trizen
else
@xacrimon
xacrimon / zclean
Last active January 25, 2018 15:25
A script to clean the system of logs and caches for arch linux, adjust the username for the homedir accordingly
#!/bin/sh
user1=archie
if [[ $(whoami) != "root" ]]
then echo "Run as root"
exit 1
fi
if [ "$(ls /bin | grep trizen)" == "trizen" ]
@xacrimon
xacrimon / pythonutils
Last active February 10, 2018 20:56
Useful script onelines
# Get the parent directory of the directory where in the program resides in python
os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
# Get the directory of the current running script in shell
"$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Decrypt a file with aes-256-cbc
openssl enc -aes-256-cbc -d -in file.txt.enc -out file.txt

Keybase proof

I hereby claim:

  • I am xacrimon on github.
  • I am acrimon (https://keybase.io/acrimon) on keybase.
  • I have a public key ASDrQiuoCCy15UW1ij1DlheaI53OMOBqLFUK70_eaPYnOwo

To claim this, I am signing this object:

# rust-toolchain
nightly-2021-07-29
# .cargo/config
[target.x86_64-unknown-linux-gnu]
rustflags = ["-Zshare-generics=y"]
[target.x86_64-apple-darwin]
use super::gpu::Gpu;
use super::stb_image::{LoadImageError, Rgba8Image};
use bus::{Bus, BusReader};
use log::{debug, info};
use nanoserde::{DeRon, SerRon};
use std::env;
use std::{
collections::HashMap,
fs, io,
path::{Path, PathBuf},