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 / move-var-part-ubuntu.md
Last active May 21, 2024 19:41 — forked from iambryancs/move-var-part-ubuntu.md
Move /var to another partition in Ubuntu

Move /var to another partition in Ubuntu

Create partition with fdisk or gdisk

fdisk -l
create a new GPT partition table by typing
gdisk /dev/sda
GPT fdisk (gdisk) version 1.0.5

Partition table scan:

Cut, copy, paste, and other common shortcuts

Shortcut Description
Command-X Cut the selected item and copy it to the Clipboard.
Command-C Copy the selected item to the Clipboard. This also works for files in the Finder.
Command-V Paste the contents of the Clipboard into the current document or app. This also works for files in the Finder.
Command-Z Undo the previous command. You can then press Command-Shift-Z to Redo, reversing the undo command. In some apps, you can undo and redo multiple commands.
Command-A Select All items.
Command-F Find items in a document or open a Find window.
@alsyundawy
alsyundawy / osx-software-update-urls-10.3-to-14.txt
Created March 23, 2024 21:57 — forked from b0gdanw/osx-software-update-urls-10.3-to-14.txt
URLs of the index files used by the software update client on OS X
10.3 (Panther):
https://swscan.apple.com/scanningpoints/scanningpointX.xml
10.4 (Tiger):
https://swscan.apple.com/content/catalogs/index.sucatalog
https://swscan.apple.com/content/catalogs/index-1.sucatalog
10.5 (Leopard):
https://swscan.apple.com/content/catalogs/others/index-leopard.merged-1.sucatalog
@alsyundawy
alsyundawy / PIHOLE+UNBOUND.md
Created January 29, 2024 23:46 — forked from bruvv/PIHOLE+UNBOUND.md
Setup Pihole + Unbound + DNS over TLS on ubuntu 20.02 LTS

Swap

First enable swap just incase

sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo cp /etc/fstab /etc/fstab.bak
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
sudo sysctl vm.swappiness=10
@alsyundawy
alsyundawy / clamav.pm
Created September 2, 2023 14:20 — forked from pmeulen/clamav.pm
A spamassassin plugin that calls clamav
## A spamassassin plugin for calling clamav
# Version 2.0 was downloaded from https://wiki.apache.org/spamassassin/ClamAVPlugin
#
# # version 2.0, 2010-01-07
# - use SA public interface set_tag() and add_header, instead of
# pushing a header field directly into $conf->{headers_spam}
#
# # version 2.1, 2017-09-09 (pmeulen):
# - Allow ClamAV::Client, which is provided by debian package libclamav-client-perl, to be used
# in addition to File::Scan::ClamAV

Server Build Guide: Ubuntu (20.04LTS) LNMP/LAMP

This is a living document which reflects the current process, accumulated and tuned over many years, that I use to set up a Ubuntu 20.04LTS LNMP/LAMP stack from scratch. It might not suit everyone, and probably isn't without its flaws, but it's a good foundation for any new server setup, one that I use for dev and production servers alike.

If you would like a quick, no-fuss, local LNMP stack, check out my ubuntu_lnmp_docker_vagrant repository.

@alsyundawy
alsyundawy / whois.php
Created July 13, 2023 11:40 — forked from kshitiz621/whois.php
PHP code to get WHOIS information of a domain
<?php
/*************************************************************************
php easy :: whois lookup script
==========================================================================
Author: php easy code, www.phpeasycode.com
Web Site: http://www.phpeasycode.com
Contact: webmaster@phpeasycode.com
*************************************************************************/
$domain = $_GET['domain'];
@alsyundawy
alsyundawy / README.md
Created March 26, 2023 19:44 — forked from alixaxel/README.md
Generating IPv6 PTR records from a Bind9 zonefile using Bash

Generating IPv6 PTR records from a Bind9 Zonefile using Bash.

The following script takes a Bind9 zonefile, gets all AAAA records from it and generated PTR records based on them.

What you need to do:

  1. Edit the Zone header in the script.
  2. Run the script with ./generate_v6_ptr.sh /path/to/zonefile.zone

This will output the zones on STDOUT. If you want to save this to a zonefile, you can use this example:

@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