Skip to content

Instantly share code, notes, and snippets.

View mdestafadilah's full-sized avatar
🧠
I'm an Intuiting Ekstrovert (IE) with B Blood Type.

mDestaFadilah mdestafadilah

🧠
I'm an Intuiting Ekstrovert (IE) with B Blood Type.
View GitHub Profile
@mdestafadilah
mdestafadilah / dropdown_value_db
Created March 16, 2022 01:17
Dropdown value dari Kolom Database
# source: https://github.com/typesafer/codeigniter-enum-select-boxes
if (!function_exists('dropdownKolom')) {
function dropdownKolom($table , $field, $all=false)
{
$ci = & get_instance();
$query = "SHOW COLUMNS FROM ".$table." LIKE '$field'";
$row = $ci->db->query("SHOW COLUMNS FROM ".$table." LIKE '$field'")->row()->Type;
$regex = "/'(.*?)'/";
preg_match_all( $regex , $row, $enum_array );
$enum_fields = $enum_array[1];
@mdestafadilah
mdestafadilah / kalimat_salam
Created March 16, 2022 01:15
Ucapan Selamat Datang
# source: https://stackoverflow.com/a/46574723
if(!function_exists('ucapan_selamat')) {
function ucapan_selamat() {
$hour = date("G");
return ($hour >= 3 && $hour < 12)
? "Selamat Pagi, "
: (($hour >= 12 && $hour < 17) ? "Selamat Siang, " : "Selamat Malam, ");
}
}
@mdestafadilah
mdestafadilah / random_text
Created March 16, 2022 01:14
Genereator Random Text (uniq)
# source: https://gist.github.com/raveren/5555297
if ( !function_exists('random_text')) {
function random_text( $type = 'alnum', $length = 8 ) {
switch ( $type ) {
case 'alnum':
$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
break;
case 'alpha':
$pool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
break;
@mdestafadilah
mdestafadilah / grav
Created January 8, 2022 17:23
Grav GIT Ignore
# Grav Specific
.sass-cache
composer.lock
cache/*
assets/*
logs/*
images/*
user/data/*
# OS Generated
@mdestafadilah
mdestafadilah / Wheel
Created November 17, 2021 04:27
REACT JS WHEEL
https://github.com/shekharramola/react-wheel-of-prizes
https://github.com/frankie95/lucky-wheel
https://gitlab.com/l.eeden/riggedwheel
https://stackoverflow.com/questions/3426404/create-a-hexadecimal-colour-based-on-a-string-with-javascript
https://github.com/gauravburjwal/react-color-palette
@mdestafadilah
mdestafadilah / ReactJS
Last active October 4, 2021 09:03
Package NPM for ReactJS
1. Global State Management
2. Server State Management
3. Scaffolding
4. Form Handling
5. HTTP Call
6. Styling
7. UI Library
8. Documentation
9. Multi-Language Support
10. Animation
@mdestafadilah
mdestafadilah / UBUNTU-SERVER
Last active September 15, 2021 06:13
MEMBANGUN SERVER UBUNTU SOLID
1. DOWNLOAD UBUNTU FROM HERE
- https://old-releases.ubuntu.com/releases/bionic/ubuntu-18.04.4-server-amd64.iso
2. SETUP YOUR BASIC SERVER FROM HERE
- https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-18-04
- https://acahya.web.id/instalasi-ubuntu-server-18-04-lts-bionic-beaver-minimal-server/
3. INSTALL YOUR LET'S ENCRYPT HTTPS FROM HERE
- https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-18-04
@mdestafadilah
mdestafadilah / Tutorial NextJS
Last active May 11, 2021 00:45
NextJS Tutorial
~ NextJS
1. https://nextjs.org/learn/basics/create-nextjs-app
2. https://jasonwatmore.com/post/2021/04/20/next-js-10-crud-example-with-react-hook-form
3. https://pusher.com/tutorials/realtime-tables-nextjs
4. https://adamwathan.me/2019/10/17/persistent-layout-patterns-in-nextjs/
5. https://wityan.medium.com/next-js-project-structure-1531610bed71
6. https://cloudreports.net/convert-html-template-into-nextjs-app/
7. https://medium.com/@defrian.yarfi/next-js-and-reactstrap-admin-dashboard-project-e32ff3205eb2
~ typescript
https://blog.bitsrc.io/simplifying-redux-with-redux-toolkit-6236c28cdfcb
https://www.softkraft.co/how-to-setup-redux-with-redux-toolkit/
https://github.com/dwiyatci/redux-toolkit-login-flow
https://github.com/rishipr/mern-auth
https://github.com/ganeshmani/redux-toolkit-user-flow
https://dev.to/ganeshmani/modern-react-redux-toolkit-login-user-registration-tutorial-and-example-7h0
https://redux-toolkit.js.org/api/createAsyncThunk
https://github.com/cornflourblue/react-hook-form-crud-example
https://github.com/NANIRISU/Registration_Login_redux
https://github.com/cluemediator/login-app-reactjs
https://www.cluemediator.com/login-app-create-login-form-in-reactjs-using-secure-rest-api