Skip to content

Instantly share code, notes, and snippets.

View brandomeniconi's full-sized avatar

Brando Meniconi brandomeniconi

  • Treedom
  • Florence, Italy
  • 22:50 (UTC +01:00)
View GitHub Profile
@brandomeniconi
brandomeniconi / settuning.sh
Created November 23, 2023 14:42 — forked from mcollina/settuning.sh
m3medium config
#!/bin/bash
sysctl net.core.rmem_default=268435456
sysctl net.core.wmem_default=268435456
sysctl net.core.rmem_max=268435456
sysctl net.core.wmem_max=268435456
sysctl net.core.netdev_max_backlog=100000
sysctl "net.ipv4.tcp_rmem=4096 16384 134217728"
sysctl "net.ipv4.tcp_wmem=4096 16384 134217728"
sysctl "net.ipv4.tcp_mem=786432 1048576 268435456"
@brandomeniconi
brandomeniconi / cf-wp-cache-worker.js
Last active September 20, 2024 09:22
Basic Cloudflare Worker that allows efficient page caching for Wordpress websites
// Version 1.4
const DAY_IN_SECONDS = 60*60*24;
const BLACKLISTED_URL_PARAMS = [
'fbclid', // Google Ads click Id
'gclid', // Facebook click Id
'msclkid', // Micorosft Ads Click Id
];
addEventListener('fetch', event => {
@brandomeniconi
brandomeniconi / deploy.sh
Last active February 19, 2018 16:43
GCP Wordpress Deploy
#!/usr/bin/env bash
GCLOUD_REGION="europe-west3"
GCLOUD_ZONE=$GCLOUD_REGION-c
projectID=$(gcloud config list --format 'value(core.project)')
echo "Preparing hosting environment for project: $projectID in zone $GCLOUD_ZONE\n"
read -p "Press enter to continue.."
@brandomeniconi
brandomeniconi / css-fade-gallery.php
Created June 13, 2016 15:20
Native CSS3 Cross Fade Gallery
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">