Vanilla Debounce esnextbin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Spatie\SimpleExcel\SimpleExcelWriter; | |
$username = "blabla"; | |
$pass = "3CVzq8MmV8U3TXDL"; | |
$host = "localhost"; | |
$db = "db_arsip"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// simpan fungsi ini di mana kek. contoh di arspi/helpers.php | |
// trus panggil ki di setiap pemanggilan echo | |
if (! function_exists('e')) { | |
function e($value, $doubleEncode = true) | |
{ | |
return htmlspecialchars($value ?? '', ENT_QUOTES, 'UTF-8', $doubleEncode); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function e($value, $doubleEncode = true) { | |
return htmlspecialchars($value ?? '', ENT_QUOTES, 'UTF-8', $doubleEncode); | |
} | |
function dd($var) { | |
$backTrace = debug_backtrace(); | |
$file = $backTrace[0]['file']; | |
$line = $backTrace[0]['line']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# === Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers) === | |
# | |
# by Fotis Evangelou, developer of Engintron (engintron.com) | |
# | |
# ~ Updated December 2021 ~ | |
# | |
# | |
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores. | |
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$request = null; | |
$('form').on('submit', function(event) { | |
event.preventDefault(); | |
if ($request != null) { | |
$request.abort(); | |
$request = null; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# secure directory by disabling script and html execution | |
# | |
<filesMatch "\.(php|php3|php4|php5|php6|php7|php8|pl|py|jsp|asp|htm|html|xhtml|shtml|sh|cgi)$"> | |
Order Deny,Allow | |
Deny from All | |
</filesMatch> |
Merged from https://github.com/joelparkerhenderson/git_commit_message and https://chris.beams.io/posts/git-commit/
- Commit messages must have a subject line and may have body copy. These must be separated by a blank line.
- The subject line must not exceed 50 characters
- The subject line should be capitalized and must not end in a period
- The subject line must be written in imperative mood (Fix, not Fixed / Fixes etc.)
- The body copy must be wrapped at 72 columns
- The body copy must only contain explanations as to what and why, never how. The latter belongs in documentation and implementation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// copied from https://raw.githubusercontent.com/DataTables/DataTables/master/examples/server_side/scripts/ssp.class.php | |
function array_pluck($a, $prop) | |
{ | |
$out = array(); | |
for ( $i=0, $len=count($a) ; $i<$len ; $i++ ) { | |
if(empty($a[$i][$prop])){ | |
continue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// file ssp.class.php | |
// https://raw.githubusercontent.com/DataTables/DataTables/master/examples/server_side/scripts/ssp.class.php | |
/* | |
* Helper functions for building a DataTables server-side processing SQL query | |
* | |
* The static functions in this class are just helper functions to help build | |
* the SQL used in the DataTables demo server-side processing scripts. These |
NewerOlder