Skip to content

Instantly share code, notes, and snippets.

View ibnumardini's full-sized avatar

Muhammad Fatkurozi ibnumardini

View GitHub Profile
@ibnumardini
ibnumardini / simple_random_string.php
Last active January 10, 2024 01:06
Simple function to generate random string (number & capital number) in php
<?php
// turn on strict type mode.
declare (strict_type = 1);
/**
* build your own random string.
*/
function make_rand(int $key_length = 0, string $new_space = null): string
{
@ibnumardini
ibnumardini / php.json
Created May 21, 2022 07:06
vscode snippet, for better debugging in php
{
"PRP TAG": {
"prefix": "prp",
"body": [
"echo \"<pre>\". print_r([",
"\t\"$TM_FILENAME - $TM_LINE_NUMBER\",",
"\t$$1",
"], 1) .\"</pre>\";$2"
],
"description": "PRP TAG"
@ibnumardini
ibnumardini / javascript.json
Last active June 6, 2023 08:06
Print something in Javascript with more informative and pretty
{
"PRETTY BASIC CONSOLE LOG": {
"prefix": "pcl",
"body": [
"console.log({",
"\tscene: \"$TM_FILENAME - $TM_LINE_NUMBER\",",
"\ttrunk: $1",
"});$2"
],
"description": "Print log with pretty way"