Skip to content

Instantly share code, notes, and snippets.

View yusufneeson's full-sized avatar
🌿
nyoba berbeda dari yang biasanya

Yusuf Neeson yusufneeson

🌿
nyoba berbeda dari yang biasanya
  • RESERVER RESEARCH
  • Indonesia
  • 18:27 (UTC +07:00)
View GitHub Profile
@yusufneeson
yusufneeson / wget.sh
Created April 23, 2022 07:19
WGET: FTP Connection Check
wget --continue --tries=10 --timeout=10 ftp://server.com --ftp-user=user_server --ftp-password=thisissecurepassworldever
@yusufneeson
yusufneeson / supervisor.server.com.conf
Created April 23, 2022 07:18
Supervisor Configuration Laravel Job
[program:server.com]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/server.com/public_html/artisan queue:work database --sleep=5 --tries=2 --max-time=3600
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=webmanager
numprocs=8
redirect_stderr=true
@yusufneeson
yusufneeson / .auto_reconnect_vpn.sh
Created April 23, 2022 07:17
Linux: Auto Reconnect VPN
#!/bin/bash
CON="VPNCONN"
STATUS=`sudo nmcli con show --active | grep $CON | cut -f1 -d " "`
if [ -z "$STATUS" ]; then
sudo nmcli con up $CON passwd-file $PWD/.vpnpass >> $PWD/.vpn_logs
fi
@yusufneeson
yusufneeson / .htaccess
Created April 23, 2022 07:15
HTTPS Redirect by htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
@yusufneeson
yusufneeson / functions.php
Created April 23, 2022 07:14
Wordpress: Hide author page
<?php
add_action('template_redirect', 'my_custom_disable_author_page');
function my_custom_disable_author_page() {
global $wp_query;
if ( is_author() ) {
$wp_query->set_404();
status_header(404);
}
}
@yusufneeson
yusufneeson / virtualuser.sh
Created April 23, 2022 07:12
Linux: ProFTPD Virtual User
#!/bin/bash
# sudo mount -o rw,umask=0,uid=nobody /dev/sdb1 /media/developer/
DOMAIN=
FTP_PATH="/media/developer/backup_test/"
OUTFILE="$PWD/log.txt"
# fill DOMAIN variable with --domain=domain.tld
for i in "$@"
do
@yusufneeson
yusufneeson / ssh_remote.md
Created April 23, 2022 07:09
SSH Remote Guide

Remote SSH

scenario : kamu ingin memperlihaktan hasil kerjamu ke client dari jarak jauh, tetapi masih tahap development. Solusi termudah adalah menggunakan ngrok, tetapi ngrok itu dinamis kalo mau statis harus bayar. Solusi lainnya adalah ini:

Di Server

  • Aktifkan konfigurasi GatewayPort yes di sshd_config
  • Restart sshd sudo systemctl restart sshd

Di Lokal

@yusufneeson
yusufneeson / icon-fb.svg
Created April 23, 2022 07:08
SVG Icon FB
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yusufneeson
yusufneeson / congrats.html
Created April 23, 2022 07:07
Confetti Particle
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Confetti Particle</title>
<style>
canvas{
position: fixed;
@yusufneeson
yusufneeson / select.html
Created April 23, 2022 07:03
Select2: with constrained
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Static Template</title>
<link
href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css"
rel="stylesheet"