Skip to content

Instantly share code, notes, and snippets.

View alsyundawy's full-sized avatar
🏠
WFH | Kaum Rebahan Garis Keras Dan Militas

༺ Initial H ༻ alsyundawy

🏠
WFH | Kaum Rebahan Garis Keras Dan Militas
View GitHub Profile
@alsyundawy
alsyundawy / sysctl.conf
Created August 14, 2021 06:58 — forked from voluntas/sysctl.conf
Sysctl configuration for high performance
### KERNEL TUNING ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
@alsyundawy
alsyundawy / Python2.7-CentOS6.10.sh
Last active April 26, 2023 01:57 — forked from mchiocca/Python2.7-CentOS6.8.sh
Install Python 2.7.18 on CentOS 6.10
#!/bin/bash
# Install external dependencies.
sudo yum install -y gcc make openssl-devel libffi-devel
# Download and install Python 2.7.18.
# Note that there are newer release versions available.
wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz
tar xzf Python-2.7.18.tgz
cd Python-2.7.18
@alsyundawy
alsyundawy / aria2.conf
Created June 19, 2022 03:32 — forked from qzm/aria2.conf
Best aria2 Config
### Basic ###
# The directory to store the downloaded file.
dir=${HOME}/Downloads
# Downloads the URIs listed in FILE.
input-file=${HOME}/.aria2/aria2.session
# Save error/unfinished downloads to FILE on exit.
save-session=${HOME}/.aria2/aria2.session
# Save error/unfinished downloads to a file specified by --save-session option every SEC seconds. If 0 is given, file will be saved only when aria2 exits. Default: 0
save-session-interval=60
# Set the maximum number of parallel downloads for every queue item. See also the --split option. Default: 5
@alsyundawy
alsyundawy / ufw-denier.sh
Created July 6, 2022 19:09 — forked from Ekultek/ufw-denier.sh
A script to download bad IP addresses and deny them with UFW
#!/bin/bash
TMP_DIR="/tmp"
URL_LINKS=$"http://www.blocklist.de/lists/ssh.txt
http://www.blocklist.de/lists/apache.txt
http://www.blocklist.de/lists/asterisk.txt
http://www.blocklist.de/lists/bots.txt
http://www.blocklist.de/lists/courierimap.txt
http://www.blocklist.de/lists/courierpop3.txt
http://www.blocklist.de/lists/email.txt
@alsyundawy
alsyundawy / regex.custom.pm
Created July 6, 2022 19:12 — forked from ethanpil/regex.custom.pm
Custom regex rules for CSF/LFD and NginX plus Wordpress fail2ban plugin
#!/usr/bin/perl
###############################################################################
# Copyright 2006-2015, Way to the Web Limited
# URL: http://www.configserver.com
# Email: [email protected]
###############################################################################
sub custom_line {
my $line = shift;
my $lgfile = shift;
@alsyundawy
alsyundawy / fix_centos_network.sh
Created July 16, 2022 22:14 — forked from DBezemer/fix_centos_network.sh
Fix CentOS 6 network after VM clone
#!/bin/bash
# Annoying bug in vmware guest centos6
# eth0 doesn't exist
ifconfig eth0 2>/dev/null >/dev/null
if [ $? -ne 0 ] ; then
# Rename eth1 with eth0
echo "UDEV Config..."
rm /etc/udev/rules.d/70-persistent-net.rules
# Change ifcfg-eth0 with hostname address (in /etc/hosts)
echo "Changing eth0 address..."
@alsyundawy
alsyundawy / glibc-2.17_centos6.sh
Created July 18, 2022 00:45 — forked from jhult/glibc-2.17_centos6.sh
update glibc to 2.17 for CentOS 6
#!/bin/bash
# update glibc to 2.17 for CentOS 6
GLIBC=glibc
OS=el6
SERVER=https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6
VERSION=2.17-55
FULL_VERSION=$GLIBC-$VERSION.fc20
X64=x86_64
@alsyundawy
alsyundawy / blocklist.sh
Created November 11, 2022 22:49 — forked from mudge/blocklist.sh
A Bash script to generate an Unbound configuration to block all domains on The Firebog's "The Big Blocklist Collection" and allow all domains on Anudeep's list
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Download all ticked blocklists from The Firebog's "The Big Blocklist
# Collection" [0] and block access to them with Unbound by redirecting traffic
# to 0.0.0.0.
#
# [0]: https://firebog.net
(
@alsyundawy
alsyundawy / mac_setup.md
Created December 19, 2022 06:34
When you buy a new Mac…

A New Mac

Computer name

  • scutil --set ComputerName "name"
  • scutil --set HostName "name"
  • scutil --set LocalHostName "name"

OS updates

@alsyundawy
alsyundawy / BrewBindInstallAndSetupMacOS.sh
Last active February 18, 2023 17:50 — forked from Ikkyusan1/BrewBindInstallAndSetupMacOS.sh
Install and setup bind (named) on MacOS 11 Big Sur with brew
#!/bin/bash
# MacOS 11.7 Big Sur
# Homebrew 4.0.1
# bind: stable 9.18.12
# Local caching NS server
# 1) INSTALL BIND