AKZN Notes

Archives for My Lazy and Forgetful Mind

Category: IT Stuff

INSTALL aria2 to Ubuntu VPS

[VPS][UBUNTU] INSTALL aria2 Table of Contents Install Aria2 Make and configure aria2 config Make the service handler aria2 on init.d install Aria2 Webui Install Aria2 sudo apt install aria2 Make and configure aria2 config install to your path sudo nano /path/to/config/aria2/aria2.conf configure as required, uncomment the rpc part if you want to use aria2 webui […]

Installing and managing LAMP Webserver

Install LAMP Automatic i’m not suggesting this because more often than not i got error instlalation. Run the below command in terminal: php latest wget –no-cache -O – https://raw.githubusercontent.com/akzn/lamp-stack-install/main/lamp-install.sh | bash php 7.4 https://github.com/akzn/lamp-stack-install/blob/main/lamp-stack-install-php7.4 low spec device my suffer slow install or hang if using automatic install Manual php 7.4 follow https://github.com/akzn/lamp-stack-install/blob/main/lamp-stack-install-php7.4 then change mysql […]

SIMPLE OPENVPN SETUP + MIKROTIK CLIENT

install VPN monitoring tools to read : https://kifarunix.com/how-to-monitor-openvpn-connections-using-openvpn-monitor-tool/ If you only need a simple OpenVPN configuration, you only need to do step 1 Install OpenVPN on NAT IPv4 VPS Installation two way of installation Install without Docker 1) Make sure that tun/tap is enabled on your vps. Enable TUN/TAP via SolusVM control panel if present […]

RANDOM DATA Table Order

[MYSQL][PROCEDURE] RANDOM DATA Table Order tb_order DELIMITER $$ DROP PROCEDURE IF EXISTS make_order$$ CREATE PROCEDURE make_order () BEGIN DECLARE monthcounts INT DEFAULT 1; DECLARE daycounts INT DEFAULT 1; DECLARE orderbydaycounts INT DEFAULT 1; WHILE monthcounts < 9 DO SET daycounts = 1; WHILE daycounts < 31 DO SET orderbydaycounts = 1; WHILE orderbydaycounts < 5 […]

Generate Random Data Function with Mysql

Function Helper DROP FUNCTION IF EXISTS generate_fname; DELIMITER $$ CREATE FUNCTION generate_fname () RETURNS VARCHAR(255) BEGIN RETURN ELT(FLOOR(1 + (RAND() * (50-1))), "Deni","Desi","Dito","Femi","Hafid","Rizki","Utami","Aulia","Tika","Hadi","Bayu","Annisa","Retno","Fajar","Wulandari","Nurul","Rini","Ilham","Kusuma","Rizki","Dinda","Andre","Ari","Maria","Wahyu","Mila","Lia","Kartika","Indra","Eko","Kurniawan","Sari","Ajie","Sri","Tyas","Dian","Lestari","Maya","Ika","Arya","Yudi","Andy","Anthony","Siti","Rio","Sarah","Reza","Andi","Fitri","Nur","Ade","Agus","Tri","Indah","Dian","Putra","Muhammad","Dwi","Jeffrey","Melissa","Eric","Anna","Stephen","Andrew"); END$$ DELIMITER ; DROP FUNCTION IF EXISTS generate_lname; DELIMITER $$ CREATE FUNCTION generate_lname () RETURNS VARCHAR(255) BEGIN RETURN ELT(FLOOR(1 + (RAND() * (58-1))), "Bagaskoro","Bakti","Dewangga","Dharma","Danastri","Danurdara","Diajeng","Endaru","Endang","Elok","Erina","Estiana","Gadhing","Ganendra","Gardara","Martin","Gentala","Galih","Ganesh","Gibran","Guinandra","Gumelar","Gunawan","Guntur","Guritno","Gusti","Gahyaka","Gantari","Ihsan","Ismoyono","Indira","Intan","Isthika","Jamal","Janu","Jatmika","Jaya","Jenaka","Jenggala","Jumanta","Jumantara","Kamajaya","Karunia","Kawindra","Kresna","Garini","Gayatri","Gemani","Gemintang","Gempita","Ginanita","Hakim","Halim","Hamdan","Hanafi","Handaru","Hapsari","Hardana","Haribawa"); END$$ DELIMITER ; Example query SELECT generate_fname() AS […]

How to merge two git branches that are in different repos/folders?

Combining two git repositories Use Case I have: folder_a/app_A folder_b/app_B I want to merge app_B into app_A and keep all history. How can I merge the branches together? switch to repo A cd folder_a Add repo B as a remote repository git remote add folderb /path/to/folder_b Pull B’s master branch into a local branch named […]