Skip to content

Instantly share code, notes, and snippets.

View aficiomaquinas's full-sized avatar

Víctor González aficiomaquinas

View GitHub Profile
@kevmo314
kevmo314 / why.md
Last active July 30, 2024 18:56
Please stop reinventing JSX

Please stop reinventing JSX

It really grinds my gears when I see this pattern, in particular navigation bars and sidebars seem to attract it:

const navItems = [
  {
    title: 'home',
    link: '/home',
 },
@mlow
mlow / erpnext.sh
Last active August 8, 2025 15:04
Simple ERPNext setup script
#!/bin/bash
# This script helps with getting Frappe/ERPNext running quickly using
# the upstream Compose specifications. Not intended for production.
#
# Usage:
#
# $ git clone https://github.com/frappe/frappe_docker
# $ cd frappe_docker
# $ curl -Lo erpnext.sh <URL to this raw gist>
#
@MaximilianKohler
MaximilianKohler / Listmonk-tutorial.md
Last active July 3, 2025 21:20
Complete Listmonk setup guide. Step-by-step tutorial for installation and all basic functions. Amazon EC2 & SES

Listmonk setup and usage guide

When I first set up Listmonk it was to use with Amazon SES. At the time Amazon would give you free 62,000 emails/mo if you sent them from an EC2 instance. So EC2 was the best server to use. In mid 2023 Amazon ended that, so now you can use whatever server you like, which makes things much easier. It shouldn't be too hard to convert these directions to another server host of your choice.

I used Hetzner with another build, and once my free EC2 year ended the AWS t2.micro cost me $14/mo. Hetzner has better specs and costs me $5/mo, so I added an nginx vhost and moved listmonk to the same server. Here's a $20 credit for Hetzner.

There is also the possibility to use the 1-click installers for their featured hosts: https://listmonk.app/ - listed under "Hosting providers". I'm not familiar with any of them but there are lots of new guides

@xlplugins
xlplugins / restore_user_data_on_checkout.php
Created April 15, 2021 14:30
Restore cart data on cartflows checkout
if(function_exists('BWFAN_Core')){
add_filter( 'cartflows_global_checkout_url', 'bwfan_passing_abandoned_args', 9.5, 1 );
if(!function_exists('bwfan_passing_abandoned_args')){
function bwfan_passing_abandoned_args( $link ) {
if ( ! isset( $_GET['bwfan-ab-id'] ) || empty( $_GET['bwfan-ab-id'] ) ) {
return $link;
}
$link = add_query_arg( array( 'bwfan-ab-id' => sanitize_text_field( $_GET['bwfan-ab-id'] ) ), $link );
Description: >
Script to create a SSL certificate, S3 bucket and Cloudfront distribution.
###############################################################################
Parameters:
###############################################################################
DomainName:
Type: String
Description: The domain name.
@xdavidhu
xdavidhu / converter.sh
Last active September 1, 2024 10:56
Converter.sh, a bash script to convert domain lists to resolved IP lists without duplicates
#!/bin/bash
# Converter.sh by @xdavidhu
# This is a script inspired by the Bug Hunter's Methodology 3 by @Jhaddix
# With this script, you can convert domain lists to resolved IP lists without duplicates.
# Usage: ./converter.sh [domain-list-file] [output-file]
echo -e "[+] Converter.sh by @xdavidhu\n"
if [ -z "$1" ] || [ -z "$2" ]; then
echo "[!] Usage: ./converter.sh [domain-list-file] [output-file]"
exit 1
@mutin-sa
mutin-sa / Top_Public_Recursive_Name_Servers.md
Last active August 23, 2025 04:40
List of Top Public Recursive Name Servers

DNS:

IPv4 Addr IPv6 Addr ASn Political Region Loc Svc Org
8.8.8.8 2001:4860:4860::8888 AS15169 US Worldwide (Anycast) Google Public DNS Google
8.8.4.4 2001:4860:4860::8844 AS15169 US Worldwide (Anycast) Google Public DNS Google
1.1.1.1 2606:4700:4700::1111 AS13335 US Worldwide (Anycast) Cloudflare-DNS Cloudflare/APNIC
1.0.0.1 2606:4700:4700::1001 AS13335 US Worldwide (Anycast) Cloudflare-DNS Cloudflare/APNIC
95.85.95.85 2a03:90c0:999d::1 AS199524 EU *W
@ajdruff
ajdruff / fix-git-line-endings
Last active August 10, 2025 11:48
Forces all line endings to LF in your git repo.
#####################
#
# Use this with or without the .gitattributes snippet with this Gist
# create a fixle.sh file, paste this in and run it.
# Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF)
# This Gist normalizes handling by forcing everything to use Unix style.
#####################
# Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF
@darth-veitcher
darth-veitcher / bash-pid.md
Created January 8, 2017 22:13
Bash Script PID file locking

Pattern below allows for a bash script to be called via, say, cron and check to see if it is already running.

Useful for things like rsync tasks.

PIDFILE=/var/run/myscriptname.pid

if [ -f $PIDFILE ]
then
 PID=$(cat $PIDFILE)