Skip to content

Instantly share code, notes, and snippets.

@githubcom13
githubcom13 / README.md
Created April 22, 2025 17:19
Block Domains Locally on macOS using dnsmasq + Configuration Profile

🚫 Block Domains Locally on macOS using dnsmasq + Configuration Profile

This setup allows you to block domains locally on macOS using dnsmasq and enforce it system-wide with a DNS configuration profile.

✅ Features

  • Fast local DNS resolution with dnsmasq
  • Easily block thousands of domains
  • System-wide DNS routing to 127.0.0.1 using a .mobileconfig profile
  • Survives reboots via launchctl
The definition of what constitutes a datacenter (hosting provider) is quite lenient and includes all of the following categories:
- Standard hosting providers such as Hetzner.de or Leaseweb.com
- Large cloud providers such as Amazon AWS or Microsoft Azure
- Content Delivery Networks such as Cloudflare, Fastly or edg.io
- Anti-DDoS services such as qrator.net or ddos-guard.net
- IP leasing organizations such as ipxo.com or interlir.com
- Other SaaS, IaaS, or PaaS organizations such as fly.io or Heroku
Amazon.com, Inc.
@githubcom13
githubcom13 / Free_Disposable_ESP_Abuse_SPAM
Created October 30, 2024 18:23 — forked from drakodev/Free_Disposable_ESP_Abuse_SPAM
most comprehensive collection (183538) of free and disposable email provider domains, curated from multiple sources, including contributions from Okutbay and frankwarwick. This list has been further extended to include domains flagged as abusive, malware-associated, or considered risky by spam traps.
This file has been truncated, but you can view the full file.
# Email List Containing free and disposable email service providers.
# Some domains have been included as they have been trapped by SPAM, Anti-Malware Systems
# NOTE: Some domains may have stopped working
0-00.usa.cc
0-180.com
0-30-24.com
0-420.com
0-900.com
0-aa.com
@githubcom13
githubcom13 / gist:74798dc7ab846d970e1a2709aefd01c1
Created April 28, 2023 03:22
Solution for NGINX error 404 and "FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client:"
add the line fastcgi_param
root /var/html/www/my-website
location ~ \.php$ {
# return 200 $document_root$fastcgi_script_name; // uncomment and download the php file and read the link inside the file. Make the necessary corrections
# fastcgi_param SCRIPT_FILENAME /var/html/www/my-website/$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
@githubcom13
githubcom13 / readme.md
Last active June 6, 2023 01:09
Add Webhook Postmark support

I finished coding Webhook Postmark support.

Event webhooks (Bounce, Spam plain, SubscriptionChange) from Postmark to Mautic are supported with this change.

I'm using this code in production with Mautic 4.4.2 and it works like a charm.

I share here the portions of code to modify, I hope it will be useful to someone:

in file: /mautic/app/bundles/EmailBundle/Config/config.php

@githubcom13
githubcom13 / readme.md
Last active August 20, 2022 19:49
To Make an Offline Copy of a Website with Wget

To Make an Offline Copy of a Website with Wget

Advanced wget website mirroring

From time to time there is a need to prepare the complete copy of the website to share it with someone or to archive it for further offline viewing. Such an archive should contain anything that is visible on the site. This includes CSS style sheets, images, also attached documents such as PDF files. One of the useful tools to achieve this is wget – an application to retrieve files through HTTP, HTTPS, FTP, FTPS protocols. This is a very powerful tool, yet it requires some knowledge to take advantage of its possibilities.

“Basic” wget usage

The most common statement we are using to mirror the whole website is:

wget --mirror --convert-links --adjust-extension --page-requisites  http://www.mywebsite.com/
<?php
$b64 = '';
if ( !function_exists ( 'file_get_contents' ) )
{
function file_get_contents ( $file )
{
$fp = @fopen ( $file, 'rb' );
if ( !$fp ) exit ( 'Unable to open ' . $file );
$data = fread ( $fp, filesize ( $file ) );
fclose ( $fp );

Ikoula Monter des partitions sous Linux

Lors de l'utilisation de vote serveur dédié, vous pourrez êtres amenés à démarrer votre serveur sur système de secours (netboot).

Si l’on souhaite accéder à une partition LVM , sans manipulation, il n’est pas possible d’y accéder.

Voici donc les lignes de commandes à exécuter en mode secours :

Scan de la partition LVM :

sudo vgscan
@githubcom13
githubcom13 / Create_new_folder_for_each_file.md
Last active August 17, 2021 22:34
Create new folder for each file - Linux/MacOs

Create a folder based on the filename, but exclude the extension, then move the original item with the same name into the folder.

before:

Folder
|- File1.ext
|- File2.ext
|- File3.ext
|- File4.ext
@githubcom13
githubcom13 / goaccess.service
Created June 16, 2020 14:07 — forked from virtualdreams/goaccess.service
goaccess systemd service
[Unit]
Description=Goaccess Web log report.
After=network.target
[Service]
Type=simple
User=root
Group=root
Restart=always
ExecStart=/usr/local/bin/goaccess -a -g -f /var/log/nginx/access.log -o /srv/www/goaccess/index.html --real-time-html --ws-url <your url>