Skip to content

Instantly share code, notes, and snippets.

View gripenk's full-sized avatar

Gripen Kwok gripenk

  • HKU ITS
  • Hong Kong
View GitHub Profile
@reifman
reifman / default.vcl
Last active February 4, 2025 22:08
Example Varnish VCL Configuration e.g. /etc/varnish/default.vcl
# Default backend definition. Set this to point to your content server.
backend default {
.host = "127.0.0.1";
.port = "8080";
.connect_timeout = 60s;
.first_byte_timeout = 60s;
.between_bytes_timeout = 60s;
.max_connections = 800;
}
@fevangelou
fevangelou / default.vcl_PREFACE.md
Last active December 7, 2024 16:44
The perfect Varnish configuration for WordPress, Joomla, Drupal & other (common) CMS based websites

The perfect Varnish configuration for WordPress, Joomla, Drupal & other (common) CMS based websites

Updated on December 15th, 2021

IMPORTANT: Read this before implementing one of the configuration files below (for either Varnish 3.x or 4.x+).

USE: Replace the contents of the main Varnish configuration file located in /etc/varnish/default.vcl (root server access required - obviously) with the contents of the configuration you'll use (depending on your Varnish version) from the 2 examples provided below.

IMPORTANT: The following setup assumes a 180 sec (3 minute) cache time for cacheable content that does not have the correct cache-control HTTP headers. You can safely increase this to 300 sec (or more) for less busier sites or drop it to 60 sec or even 30 sec for high traffic sites. It obviously depends on your use case.

@section-io-gists
section-io-gists / varnish-anonymous-wordpress.vcl
Created September 11, 2017 15:49
This Varnish configuration is meant for Wordpress sites where site users are always anonymous.
# Please note: There is an underlying default Varnish behavior that occurs after the VCL logic
# you see below. You can see the bultin code here
# https://github.com/varnishcache/varnish-cache/blob/5.1/bin/varnishd/builtin.vcl
#
# See the VCL chapters in the Users Guide at https://www.varnish-cache.org/docs/
# and http://varnish-cache.org/trac/wiki/VCLExamples for more examples.
# Marker to tell the VCL compiler that this VCL has been adapted to the
# new 4.0 format.
vcl 4.0;
@sys0dm1n
sys0dm1n / 000-HAproxy-Varnish-Apache-Wordpress-Letsencrypt
Last active May 15, 2023 13:16
HAproxy, Varnish and Apahce configuration files compatible for Wordpress with Apache webserver with Let's Encrypt
Configuration files to setup Wordpress with Apache2 webserver, Varnish caching server and HAproxy for loadbalancing with support for Lets Encrypt
@carceneaux
carceneaux / remove_gitlab_artifacts.sh
Last active March 29, 2025 22:48
Script for removing GitLab Job Artifacts.
#!/bin/bash
#
# Written by Chris Arceneaux
# GitHub: https://github.com/carceneaux
# Email: [email protected]
# Website: http://arsano.ninja
#
# Note: This code is a stop-gap to erase Job Artifacts for a project. I HIGHLY recommend you leverage
# "artifacts:expire_in" in your .gitlab-ci.yml
#
---
source: https://www.google.com/maps/d/viewer?mid=1Z1dI8hoBZSJNWFx2xr_MMxSxSxY&&ll=54.784654126394415%2C-8.91870626273581&z=3
last_update: Jul 23, 2019
contribute: http://bit.ly/2d13csJ
ios: http://apple.co/2b7BatI
android: http://bit.ly/2dDeaaN
how_to_update: 1. open the source in a browser
2. open browser console and type in `_pageData` to print the content of the variable
3. copy-paste all the content in a file
4. keep interesting lines with: `grep -e "name" -e "description" > new_file`
@darconeous
darconeous / tesla-key-card-protocol.md
Last active April 8, 2025 23:28
Tesla Key Card Protocol

Tesla Key Card Protocol

Researched by Robert Quattlebaum [email protected].

Last updated 2020-02-03.

Image of Tesla Key Card Image of Tesla Model 3 Key Fob

Environment

Jetpack 4.6, Jetson Xavier, Ubuntu 18.04

prepare

apt install -y curl jq runc iptables conntrack nvidia-container-runtime nvidia-container-toolkit

crio

Install crio