Skip to content

Instantly share code, notes, and snippets.

@v0112358
v0112358 / mysql_memory_calculator.md
Last active September 9, 2024 09:34
MySQL Memory Calculator

MySQL 5.6

Base memory

SELECT ( @@key_buffer_size
+ @@query_cache_size
+ @@innodb_buffer_pool_size
+ @@innodb_log_buffer_size
+ @@innodb_additional_mem_pool_size )
/ (1024 * 1024 * 1024) AS BASE_MEMORY_GB;
@JerryLokjianming
JerryLokjianming / Crack Sublime Text Windows and Linux.md
Last active April 28, 2025 17:54
Crack Sublime Text 3.2.2 Build 3211 and Sublime Text 4 Alpha 4098 with Hex

How to Crack Sublime Text 3.2.2 Build 3211 with Hex Editor (Windows | Without License) ↓

  1. Download & Install Sublime Text 3.2.2 Build 3211
  2. Visit https://hexed.it/
  3. Open file select sublime_text.exe
  4. Offset 0x8545: Original 84 -> 85
  5. Offset 0x08FF19: Original 75 -> EB
  6. Offset 0x1932C7: Original 75 -> 74 (remove UNREGISTERED in title bar, so no need to use a license)
@tylergannon
tylergannon / RBTree.rs
Last active March 24, 2025 05:53
Red Black Tree written in Rust
#![allow(dead_code)]
extern crate rand;
use std::cmp::Ord;
use std::cmp::Ordering;
use std::fmt::Debug;
use std::iter::Iterator;
use std::iter::IntoIterator;
use rand::Rng;
@lukecav
lukecav / woocommerce.vcl
Last active February 12, 2024 19:20
Varnish v4 VCL for WooCommerce Stores - Beta
/* SET THE HOST AND PORT OF WooCommerce
* *********************************************************/
backend default {
.host = "127.0.0.1";
.port = "8080";
}
# SET THE ALLOWED IP OF PURGE REQUESTS
# ##########################################################
@TrafeX
TrafeX / caching.conf
Last active April 28, 2024 20:49
Nginx Wordpress caching
# The path to store the cache files, limit the folder to 100MB
fastcgi_cache_path /var/run/nginx-cache levels=1:2 keys_zone=WORDPRESS:100m;
# A unique request is defined by this cache key
fastcgi_cache_key "$scheme$request_method$host$request_uri";
# Show the cached version if upstream gives a timeout or a HTTP 500 error
fastcgi_cache_use_stale error timeout invalid_header http_500;
# Don't use the following headers to define the cache variables