AKZN Notes

Archives for My Lazy and Forgetful Mind

Archives

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 […]