Skip to content

Instantly share code, notes, and snippets.

View navotera's full-sized avatar

Muhammad Hendra navotera

View GitHub Profile
@navotera
navotera / index.php
Created June 7, 2023 11:24
for maintenance index.php
<?php
/**
* Usage:
* Download and unzip the file then RENAME it to index.php
* Into the code find "your site name goes here" and put your Board's/Site's name in there.
* SAVE this file.
*
* Rename your (i.e.: www.mydomain.com/phpBB3/index.php) to something else you like (as a backup)
* Upload THIS renamed file to your Board's root (i.e.: www.mydomain.com/phpBB3/)
* Point your browser to i.e.: www.mydomain.com/phpBB3/index.php), once finished delete this
@navotera
navotera / gist:bc3c9a372ed4a2caff1e02c140f31ef9
Last active March 31, 2023 23:37
InstallOh-My-Posh-Windows10

InstallOh-My-Posh-Windows10

ALL THE PROCESS should be installed in the TERMINAL as Administrator (not Power Shell)

  1. Install scoop
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
  1. Install oh-my-posh using scoop
Include "/etc/nginx/modsec/main.conf"
# Allow jetpack (android blog post) and post view
SecRuleRemoveById 949110 959100;
# ------------------------------------------------------------------------
# OWASP ModSecurity Core Rule Set ver.3.0.2
# Copyright (c) 2006-2016 Trustwave and contributors. All rights reserved.
#
# The OWASP ModSecurity Core Rule Set is distributed under
@navotera
navotera / my.cnf
Created September 26, 2020 07:49 — forked from fevangelou/my.cnf
Optimized my.cnf configuration for MySQL/MariaSQL (on Ubuntu, CentOS etc. servers)
# Optimized my.cnf configuration for MySQL/MariaSQL
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated January 2020 ~
#
#
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@navotera
navotera / shmsetup.sh
Created September 22, 2020 07:48 — forked from jodell/shmsetup.sh
kernel shared memory calculator
#!/bin/bash
# http://archives.postgresql.org/pgsql-admin/2010-05/msg00285.php
# Output lines suitable for sysctl configuration based
# on total amount of RAM on the system. The output
# will allow up to 50% of physical memory to be allocated
# into shared memory.
# On Linux, you can use it as follows (as root):
#
# ./shmsetup >> /etc/sysctl.conf
@navotera
navotera / .htaccess
Last active January 28, 2019 12:02
.htaccess to allow only from indonesia
# -------------------------------------------------------
# Free IP2Location Firewall List by Country
# Source: https://www.ip2location.com/free/visitor-blocker
# Last Generated: 28 Jan 2019 11:37:05 GMT
# [Important] Please update this list every month
# -------------------------------------------------------
<Limit GET HEAD POST>
order deny,allow
allow from 2.255.251.216/32
allow from 14.102.152.0/22