Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# Step 0: Update the OS
setenforce 0
sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
dnf -y update
dnf -y install git wget vim bash-completion curl
# Reboot if neccesary
@audy018
audy018 / Converting_a_table_to_JSON_format.go
Created July 21, 2022 16:02 — forked from hygull/Converting_a_table_to_JSON_format.go
Converting users table into JSON form (dbname: practice_db, password: admin@67, user: hygull, port: 8080{localhost}, port: 3306{mysql} )
/**
{
"created_on": "27 may 2017",
"todos": [
"go get github.com/go-sql-driver/mysql",
"postman(optional)",
"browser(optional)",
],
"aim": "Converting a table into JSON form",
"created_by": "Rishikesh Agrawani"
@audy018
audy018 / cron-sendy-backup
Created July 13, 2022 11:41 — forked from nickjj/cron-sendy-backup
An example of creating a database backup and restore script for MySQL, MariaDB and PostgreSQL. It is focused on backing up and restoring a Sendy database (working example from https://www.youtube.com/watch?v=kbCytSYPh0E) but you can apply it for any database with slight modifications.
30 0 * * * root /usr/local/bin/sendy-backup > /dev/null 2>&1
# HOST
echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable-wireguard.list
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' > /etc/apt/preferences.d/limit-unstable
apt update
apt install wireguard pve-headers
echo "wireguard" >> /etc/modules-load.d/modules.conf
# Container
echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable-wireguard.list
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' > /etc/apt/preferences.d/limit-unstable
@audy018
audy018 / thai-id-card.py
Created March 15, 2019 14:55 — forked from bouroo/thai-id-card.py
Thai National ID Card reader in python
#!/usr/bin/env python3
# bouroo
# 27.09.2018
# sudo apt-get -y install pcscd python-pyscard python-pil
import binascii
import io
import os
import sys
from PIL import Image