Skip to content

Instantly share code, notes, and snippets.

View veeso's full-sized avatar

Christian Visintin veeso

View GitHub Profile
@veeso
veeso / parcel_to_vite.sh
Last active February 26, 2025 09:47
script to migrate from parcel to vite
#!/bin/bash
rm .eslintrc.json
rm .eslintignore
# eslint.config.js
echo "import js from '@eslint/js';" > eslint.config.js
echo "import globals from 'globals';" >> eslint.config.js
echo "import reactHooks from 'eslint-plugin-react-hooks';" >> eslint.config.js
echo "import reactRefresh from 'eslint-plugin-react-refresh';" >> eslint.config.js
@veeso
veeso / vars_by_file.rs
Created October 18, 2024 09:07
Vars by file
/// A macro to create a [`HashMap<&str, HashMap<&str, String>>`] from a list of variables
///
/// The syntax is: `vars_by_file! { "file_name" => { "VAR_NAME" => "value", "VAR_NAME2" => "value" }, "file_name_2" => { ... } }`
///
/// ### Example
///
/// ```rust
/// let vars = vars_by_file! { "foo" => { "WASM" => "foo.wasm", "PATH" => "/tmp" }, "bar" => { "WASM" => "bar.wasm" } };
/// let foo_vars = vars.get("foo").unwrap();
@veeso
veeso / female.txt
Last active November 21, 2022 21:37
Tons of names divided by gender
Jessica
Ashley
Jennifer
Amanda
Sarah
Stephanie
Nicole
Heather
Elizabeth
Megan
@veeso
veeso / rotate.sh
Created December 2, 2020 11:00
rotate framebuffer
echo 0 > /sys/class/graphics/fbcon/rotate # 0
echo 1 > /sys/class/graphics/fbcon/rotate # 90
echo 2 > /sys/class/graphics/fbcon/rotate # 180
echo 3 > /sys/class/graphics/fbcon/rotate # 270
# If fbcon doesn't work, try fb0 too. Depends on your machine.
@veeso
veeso / b64_decode.py
Created November 25, 2020 13:51
Python b64 encode / decode scripts
#!/usr/bin/python3
from base64 import b64decode
from sys import argv, exit
if __name__ == "__main__":
args = argv[1:]
if len(args) < 1:
print("Usage: %s <input> [output]" % argv[0])
@veeso
veeso / fixdir.sh
Created November 8, 2020 09:41
Script to fix directory permissions in WSL
# Bash !
function fixdir {
if [ -z "$1" ]; then
echo "Usage: $0 <directory>"
return 1
fi
DIR=$1
@veeso
veeso / yolo.sh
Last active November 17, 2022 16:39
Git Yolo
git config --global alias.yolo '!git add -A && git commit -m "$(curl --silent --fail https://whatthecommit.com/index.txt)"'
@veeso
veeso / README.md
Last active June 17, 2020 12:39
OpenVPN Quick-Setup Guide