Skip to content

Instantly share code, notes, and snippets.

@isaumya
isaumya / cf_cache_rules_implementation_guide_spcc.md
Last active May 13, 2025 12:10
Super Page Cache for Cloudflare — Guide for using Remove Cache Buster Query Parameter feature (when using Cache Everything page rule)

Implementation Guide for using "Remove Cache Buster Query Parameter" feature

The Super Page Cache for Cloudflare plugin has recently added the feature for using the Cache Everything pagerule withing the ?swcfpc=1 cache buster query paramater. This opens up so many new doors where users previously had to use the Cloudflare Workers to remove the cache buster.

With this new option now users are able to take advantage of Cloudflare Cache Everything page rule and take it to the next level by using the new Rulesets released by Cloudflare. Basically this is achived by taking advantage of the all new Cache Rules feature implemented by Cloudflare.


Setp 1 — Setting up the Cache Rules inside your Cloudflare Dashboard

The first thing that you need to do is, log-in to your Cloudflare Dahsbord and go to the domain/zone doe which you are setting up the [Super Page Cache for Cloudflare](https://wordpress.org/plug

@huksley
huksley / decodeGoogleNewsUrl.ts
Last active May 9, 2025 05:42
This script decodes Google News generated encoded, internal URLs for RSS items
/**
* This magically uses batchexecute protocol. It's not documented, but it works.
*
* Licensed under: MIT License
*
* Copyright (c) 2024 Ruslan Gainutdinov
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
@sxiii
sxiii / README-Remove-Locales.md
Last active September 12, 2024 12:59
Remove Unnecessary Locales Fedora

Small guide that helps to free up space by removing unneccessary locales from Fedora
With some additional information on how to make more space on your system (advices in the end)
Tried on Fedora 34, but should work on other distros as well (RPM-Based?)

Step 0. Bonus step -- check available space before procedure:

df -lh

Step 1. Enter the locales directory

cd /usr/share/locale/

Step 2. Check that there is files to remove

ls

@wmakeev
wmakeev / README.md
Last active August 16, 2021 06:36
Yandex SpeechKit #yandex #cloud #speechkit

Yandex SpeechKit links

API

Prices

Generate Token yc iam create-token

Convert MP3 to OPUS

git clone https://github.com/STS-Rosario/carpoolear_backend.git
Create vhost www.carpoolear-dev.com.ar pointing to carpoolear_backend/public
Add AllowOverride All between </Directory> inside the created vhost
Point www.carpoolear-dev.com.ar to 127.0.0.1 in hosts file.
composer install
cp .env.example .env
Change DB credentials
Change MAIL_DRIVER=smtp to MAIL_DRIVER=log for local development
chmod -R ugo+rw storage/
php artisan key:generate
@jasonyingling
jasonyingling / functions.php
Last active June 11, 2021 12:22
Remove Reading Time WP From Yoast og:desc
/**
* A Function to remove the auto generated Reading Time from Yoast og:desc
*
* This hooks into Yoast's `wpseo_opengraph_desc` filter and uses a regular
* expression to remove the reading time for the post
*
* @see Reading Time WP Plugin
* @link https://wordpress.org/plugins/reading-time-wp/
*
* @param string $ogdesc The excerpt grabbed by Yoast for output.
@jsn789
jsn789 / add-gtm-wp.php
Last active September 4, 2024 13:38
Add Google Tag Manager through functions.php in WordPress
/* Add Google Tag Manager javascript code as close to
the opening <head> tag as possible
=====================================================*/
function add_gtm_head(){
?>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
anonymous
anonymous / DocsMiner.MD
Created February 1, 2018 17:35

Эта инструкция собрана по крупицам анонов и призвана помочь всем тем, кто не знает как скачивать личные документы из вк. Часто возникает один вопрос:

Можно ли скачивать личные документы конкретного пользователя вк?

Да, можно и нужно. Читай подробнее инструкцию и поймешь как это сделать.

Поиск документов

  1. Заходим на vk.com/docs
@jamesckemp
jamesckemp / example.php
Created November 17, 2017 13:02
Enable custom field for specific products
<?php
/**
* Output engraving field.
*/
function iconic_output_engraving_field() {
global $product;
if ( $product->get_id() !== 1741 ) {
return;
}
@melvincabatuan
melvincabatuan / video_split_equally.bat
Created October 28, 2017 09:23
ffmpeg batch file to divide videos equally, i.e. segment time = 3 s
mkdir output
for %%a in ("*.mp4") do ffmpeg -i "%%a" -c copy -map 0 -segment_time 3 -f segment "./output/%%~na_%%05d.mp4"
pause