Skip to content

Instantly share code, notes, and snippets.

View erolj's full-sized avatar
🏠
Working from home

Erol Joudy erolj

🏠
Working from home
View GitHub Profile
@erolj
erolj / snippetfile1.txt
Created March 9, 2021 20:15
Default nginx server block for Gitea
server {
listen 80;
server_name git.contoh.com;
include snippets/letsencrypt.conf;
return 301 https://git.contoh.com$request_uri;
}
server {
listen 443 ssl http2;
@erolj
erolj / gitea.service
Created March 9, 2021 20:12
[gitea-snippet] File unit systemd untuk running Gitea
[Unit]
Description=Gitea (Git with a cup of tea)
After=syslog.target
After=network.target
###
# Don't forget to add the database service requirements
###
#
#Requires=mysql.service
#Requires=mariadb.service
@erolj
erolj / padding_with_sass.scss
Created July 11, 2020 10:01
Belajar-Sass__Trik padding.
/* SCSS Code */
@mixin padding($name, $num, $unit) {
@if $name == "bottom" or $name == "b" {
.pb-#{$num} {
padding-bottom: $num + $unit;
}
}
@if $name == "top" or $name == "t" {
.pt-#{$num} {
padding-top: $num + $unit;
@erolj
erolj / chk_cloudflare_ns.sh
Created June 20, 2020 09:14
Script sederhana deteksi sebuah domain menggunakan cloudflare ns atau tidak.
#!/bin/bash
read -rp "Masukkan nama domain: " DOMAIN
CHKDOMAIN=$(dig ns "${DOMAIN}" +short | grep -o cloudflare | head -1)
if [ ! "${CHKDOMAIN}" = "cloudflare" ]; then
echo "Tidak menggunakan NS Cloudflare"
else
echo "Menggunakan NS Cloudflare"
fi
@erolj
erolj / cortana.sh
Created April 23, 2020 04:27
Personal unix server management simple tool.
#!/bin/bash
FILE="cortana.sh"
printf "\n"
echo "-------------------------------------"
echo " CORTANA v0.1"
echo " https://erol.my.id/cortana.sh"
echo "-------------------------------------"
printf "\n"
echo "Hello, what do you want to do today?"
@erolj
erolj / erto-html5.code-snippets
Created January 12, 2020 04:00
Insert custom Bootstrap 4 HTML5 (with FontAwesome 5 + Webfontloader) code snippets to VS Code documents
{
"Insert Bootstrap 4 HTML5 snippets": {
"scope": "html,php",
"prefix": "erto-html5",
"body": [
"<!doctype html>",
"<html lang=\"en\">",
" <head>",
" <title>Title</title>",
" $BLOCK_COMMENT_START Required meta tags $BLOCK_COMMENT_END",
#!/bin/bash
ps aux | awk '{print $6/1024 " MB\t\t" $11}' | sort -rn | head -25
# Filter fail2ban untuk unsuccesfull MSSQL authentication
[INCLUDES]
before = common.conf
[Definition]
_daemon = mssqld
failregex = Login failed for user .* \[CLIENT: <HOST>\]
ignoreregex =
@erolj
erolj / comment_box_blacklist.txt
Last active January 13, 2019 03:51
Database kata, IP, URL, atau keyword yang di-blacklist untuk semua instalasi WP milik klien Ertomedia
5.188.210.4
5.188.210.6
5.188.210.8
5.188.210.9
23.95.86.47
46.166.143.100
70.169.150.122
84.201.18.197
84.54.58.113
104.223.30.152
@erolj
erolj / .htaccess
Created August 17, 2018 18:38 — forked from seoagentur-hamburg/.htaccess
UPDATE 2018: Perfect .htaccess file for highspeed and security. You can use it for every WordPress-Website without problems. Highspeed and Security - testet on hundreds of Websites. If you are using a WordPress Multisite, change the last part of this file.
########################################################################
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2018
########################################################################
# ----------------------------------------------------------------------
# Rewrite from HTTP to HTTPS - if you want to use it, comment it out
# ----------------------------------------------------------------------