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
@audy018
audy018 / gist:1bcae7b40153f69efc40d47d09ad9ce5
Last active January 25, 2022 12:18
confluentinc/cp-zookeeper:6.0.1==>docker-compose.yml
version: '3'
services:
cp-zookeeper:
image: confluentinc/cp-zookeeper:6.0.1
hostname: zookeeper
container_name: zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
# 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 / IPTV2
Last active October 16, 2022 12:19
#EXTM3U
#EXTINF:-1 tvg-logo="https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcRxaJqXbWvb4zhffu44_Pjij_hzeut7814wG_r1h7-bYBfA15af&usqp=CAU" group-title="หนังใหม่",139.gozziira vs kong
https://xxx.77player.xyz/hls/7b8008717491b6b924298043ea8c3998/7b8008717491b6b924298043ea8c3998.m3u8
#EXTINF:-1 tvg-logo="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/FOX-Channel-Germany.svg/1200px-FOX-Channel-Germany.svg.png" group-title="English",140.Fox HD
https://livecdn.fptplay.net/foxlive/foxhd_hls.smil/chunklist_b1200000.m3u8
#EXTINF:0 tvg-logo="https://i.imgur.com/IpKuSbU.png" group-title="English",142.AXN
http://136.243.177.164/AXN/playlist.m3u8
@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