Skip to content

Instantly share code, notes, and snippets.

@johnbillion
johnbillion / wp_mail.md
Last active July 7, 2025 13:21
WordPress Emails

WordPress Emails

This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.

This documentation has moved here: https://github.com/johnbillion/wp_mail

@CMCDragonkai
CMCDragonkai / http_streaming.md
Last active August 20, 2025 07:49
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

@ajaegers
ajaegers / git-move-files-in-subfolder.md
Last active August 25, 2025 09:51
Git: move files in an subfolder keeping history

Change structure of project folder with Git

I have this structure:

 project-folder/
     .git
     wp-admin/
     wp-content/
     wp-includes/

.htaccess

@andreybleme
andreybleme / dandelion.yml
Created April 4, 2015 21:06
Dandelion s3 adapter for AWS buckets
adapter: s3
bucket_name: queen-fantasia
access_key_id: my_key_id
secret_access_key: my_secret_access_key
host: s3-sa-east-1.amazonaws.com
exclude:
- .gitignore
- dandelion.yml
@apollolm
apollolm / nginx-ssl-config
Last active January 12, 2023 14:47
Nginx Configuration with multiple port apps on same domain, with SSL.
# the IP(s) on which your node server is running. I chose port 3000.
upstream app_geoforce {
server 127.0.0.1:3000;
}
upstream app_pcodes{
server 127.0.0.1:3001;
}
@addyosmani
addyosmani / package.json
Last active December 28, 2024 12:07
npm run-scripts boilerplate
{
"name": "my-app",
"version": "1.0.0",
"description": "My test app",
"main": "src/js/index.js",
"scripts": {
"jshint:dist": "jshint src/js/*.js",
"jshint": "npm run jshint:dist",
"jscs": "jscs src/*.js",
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js",
@mathetos
mathetos / ssl-for-images.php
Last active July 3, 2018 08:21
Force http/s for images in WordPress
/**
*
* Force http/s for images in WordPress
*
* Source:
* https://core.trac.wordpress.org/ticket/15928#comment:63
*
* @param $url
* @param $post_id
*
@andybeak
andybeak / xssTest.php
Last active April 23, 2020 16:17
PHPunit test for a permissive xss routine
<?php
/**
*
* There are use cases where using filter_var( FILTER_SANITIZE_STRING ) is not desireable because it is too greedy.
* In the event that you have written a more permissive xss cleaning routine this unit test can be used to test your
* cleaning routine. The list of attack vectors is not comprehensive but should give you a good start.
*
* The detection routine below is based on https://github.com/symphonycms/xssfilter/blob/master/extension.driver.php
* and on https://gist.github.com/mbijon/1098477
jQuery( function () {
My_Object.init();
} );
(function ( $, app ) {
/**
* Bootstrap
*/
app.init = function() {

List developed by the attendees at WordCamp Philly 2014 Contributor Day

Steps to Reproduce

  • List of steps

Enviornment

  • Browser Version
  • PHP Version
  • MySql Version
  • WordPress Version