Skip to content

Instantly share code, notes, and snippets.

View desawarna's full-sized avatar

Zae makhrus desawarna

View GitHub Profile
@desawarna
desawarna / .htaccess
Created August 21, 2025 05:56
httaccess
# redirect all http to https
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Block Bot
RewriteEngine On RewriteCond %{HTTP_USER_AGENT} ^.*(Baiduspider|HTTrack|Yandex|AhrefsBot|Baiduspider|DuckDuckBot|Ezooms|MJ12bot|YandexBot|Google|TikTok|Bytedance|Semrush|Bing|BabbarTech|Commoncrawl|Neilpatel|Ais|Aioseo|Seoptimer).*$ [NC] RewriteRule .* - [F,L]
# Block URL Buruk
SetEnvIfNoCase Referer "google.com" bad_referer Order Allow,Deny Allow from ALL Deny from env=bad_referer
SetEnvIfNoCase Referer "duckduckgo.com" bad_referer Order Allow,Deny Allow from ALL Deny from env=bad_referer
@desawarna
desawarna / webhook.php
Created August 20, 2025 09:27
slimswa
<?php
define('DB_HOST', 'localhost');
define('DB_PORT', '3306');
define('DB_NAME', 'plp_slms8');
define('DB_USERNAME', 'plp_slms8');
define('DB_PASSWORD', 'cS9pu1-b@4a');
$conn = mysqli_connect(DB_HOST,DB_NAME,DB_PASSWORD,DB_USERNAME);
@desawarna
desawarna / membercard.php
Created October 13, 2021 02:52
Kartu Anggota SLiMS 9+ Dengan Tanggal Lahir
<?php
function floatvalue($val){
$val = str_replace(",",".",$val);
$val = preg_replace('/\.(?=.*\.)/', '', $val);
return floatval($val);
}
?>
<!DOCTYPE html>
<html>
<head>
@desawarna
desawarna / Copas-Code-Set-Pasword-Anggota-Secara-Berjamaah.sql
Created September 21, 2020 23:27
Copas Code Set Pasword Anggota Secara Berjamaah
UPDATE `member` SET `mpasswd` = MD5('bejo');
@desawarna
desawarna / gist:eceb0e86302bc1c6223d5d8ff4f44cd4
Created September 16, 2020 11:27
Copasan blowfish_secret config phpmyadmin
/**
* This is needed for cookie based authentication to encrypt password in
* cookie. Needs to be 32 chars long.
*/
$cfg['blowfish_secret'] = 'qtdRoGmbc9{8IZr323xYcSN]0s)r$9b_JUnb{~Xz'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
@desawarna
desawarna / gist:bdd2c0ea742ff3b568d3b2a7e281d0c3
Last active September 18, 2020 04:01
Copasan Menu Login Template Default SLiMDS 9
$main_menus = [
'home' => [
'text' => __('Home'),
'url' => 'index.php'
],
'login' => [
'text' => __('Login Admin'),
'url' => 'index.php?p=login'
],
@desawarna
desawarna / gist:90232eda0eea95074218e78fbd53dc1d
Created September 13, 2020 07:23
Copasan Menu Visitor Counter
'visitor' => [
'text' => __('Visitor Counter'),
'url' => 'index.php?p=visitor'
],
<6>Server version name: Apache Tomcat/9.0.24 (Ubuntu)
<6>Server built: Aug 22 2019 11:55:14 UTC
<6>Server version number: 9.0.24.0
<6>OS Name: Linux
<6>OS Version: 5.0.0-13-generic
<6>Architecture: amd64
<6>Java Home: /usr/lib/jvm/java-8-openjdk-amd64/jre
<6>JVM Version: 1.8.0_252-8u252-b09-1~19.10-b09
<6>JVM Vendor: Private Build
<6>CATALINA_BASE: /home/dhis/tomcat-dhis
@desawarna
desawarna / visitor.inc.php
Created March 27, 2020 14:13
Loss IP Visitor Counter Slims 8 dengan Suara juga
<?php
/**
*
* Visitor Counter
* Copyright (C) 2010 Arie Nugraha ([email protected])
* Modified By Eddy Subratha ([email protected])
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
sudo mysql -u root
CREATE USER 'server'@'localhost' IDENTIFIED BY 'server';
GRANT ALL PRIVILEGES ON *.* TO 'server'@'localhost' WITH GRANT OPTION;
EXIT;