Skip to content

Instantly share code, notes, and snippets.

View akhwan90's full-sized avatar
🏠
Working from home. Hire me..

Nur Akhwan akhwan90

🏠
Working from home. Hire me..
View GitHub Profile
@akhwan90
akhwan90 / rsync.sh
Created April 22, 2025 03:00
skrip rsync untuk backup antar server
#!/bin/bash
# === Konfigurasi ===
REMOTE_USER="nama-user-remote"
REMOTE_HOST="192.168.xx.xx" #alamat server remote
REMOTE_PATH="/path/folder/file/di/remote"
LOCAL_DEST="/path/folder/file/tujuan/"
SSH_PORT="22"
LOG_FILE="rsync_download_$(date +%Y%m%d_%H%M%S).log"
@akhwan90
akhwan90 / show_hide_by_text.html
Created May 25, 2023 02:01
filter text show hide by it child
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<input type="text" name="katakunci" id="kataKunci" onkeyup="cari()">

Download librari melalui composer

composer require dompdf/dompdf

Import librari ke controller

<?php
defined('BASEPATH') OR exit('No direct script access allowed');

use Dompdf\Dompdf;
$('table').on('paste', 'input', function(e){
var $this = $(this);
$.each(e.originalEvent.clipboardData.items, function(i, v){
if (v.type === 'text/plain'){
v.getAsString(function(text){
var x = $this.closest('td').index(),
y = $this.closest('tr').index()+1,
obj = {};
text = text.trim('\r\n');
$.each(text.split('\r\n'), function(i2, v2){
@akhwan90
akhwan90 / elasticsearch.md
Created April 24, 2020 14:10 — forked from dominicsayers/elasticsearch.md
Configuring ElasticSearch to use less memory

What I actually did

/etc/security/limits.conf

elasticsearch hard memlock 100000

/etc/default/elasticsearch

@akhwan90
akhwan90 / jwtRS256.sh
Created December 23, 2019 13:00 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
class Cewek {
constructor(kowe_sopo, jenenge_bribikanmu, kowe_seneng) {
this.kowe_sopo = kowe_sopo;
this.jenenge_bribikanmu = jenenge_bribikanmu;
this.kowe_seneng = kowe_seneng;
this.seneng_kowe = Boolean(Math.round(Math.random()));
this.singgle = Boolean(Math.round(Math.random()));
}
@akhwan90
akhwan90 / curl_post_php
Created October 17, 2019 04:21
curl_post_php
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "<<alamat_URL>>",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
@akhwan90
akhwan90 / .htaccess
Created September 8, 2019 08:48 — forked from shakee93/.htaccess
Laravel Apache hide .env and several security settings via .htaccess
# Disable Directory listing
Options -Indexes
# block files which needs to be hidden // in here specify .example extension of the file
<Files ~ "\.(env|json|config.js|md|gitignore|gitattributes|lock)$">
Order allow,deny
Deny from all
</Files>
# in here specify full file name sperator '|'
erro usb debuggin xiaomi
Steps for MIUI 9 and Above:
Settings -> Additional Settings -> Developer options ->
Turn off "MIUI optimization" and Restart
Turn On "USB Debugging"