Skip to content

Instantly share code, notes, and snippets.

Paul Baptist Kaji01

Block or report user

Report or block Kaji01

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View woocommerce-send-custom-email-using-woo-template.php
<?php
/*
This script will allow you to send a custom email from anywhere within wordpress
but using the woocommerce template so that your emails look the same.
Created by craig@123marbella.com on 27th of July 2017
Put the script below into a function or anywhere you want to send a custom email
*/
@joashp
joashp / openssl_encrypt_decrypt.php
Created Sep 4, 2015
Simple PHP encrypt and decrypt using OpenSSL
View openssl_encrypt_decrypt.php
<?php
/**
* simple method to encrypt or decrypt a plain text string
* initialization vector(IV) has to be the same when encrypting and decrypting
*
* @param string $action: can be 'encrypt' or 'decrypt'
* @param string $string: string to encrypt or decrypt
*
* @return string
*/
@JustThomas
JustThomas / wordpress-multisite-internal-redirect-loop.md
Last active Sep 3, 2019
WordPress Multisite: How to fix error "too many redirects"
View wordpress-multisite-internal-redirect-loop.md

WordPress Multisite: How to fix error "Request exceeded the limit of 10 internal redirects"

I am running a WordPress multisite network with sub-directory setup. When I check my error.log file, it is full of entries like this one:

Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'Limit InternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

The problem was, in my case, one specific rewrite rule in the .htaccess file.

Problem description

View jluhacks.user.js
// ==UserScript==
// @name Japanese Language Stack Exchange Hacks
// @namespace stackexchange
// @description Furigana, pitch accent and Japanese font-related script for the Japanese Language Stack Exchange (http://japanese.stackexchange.com)
// @include http://*japanese.stackexchange.com/*
// @include http://*anime.stackexchange.com/*
// ==/UserScript==
/*
@petenelson
petenelson / admin_head_post_edit_check.php
Created Nov 1, 2012
WordPress admin action hooks for listing/adding/editing posts or pages
View admin_head_post_edit_check.php
/* actions fired when listing/adding/editing posts or pages */
/* admin_head-(hookname) */
add_action( 'admin_head-post.php', 'admin_head_post_editing' );
add_action( 'admin_head-post-new.php', 'admin_head_post_new' );
add_action( 'admin_head-edit.php', 'admin_head_post_listing' );
function admin_head_post_editing() {
echo 'you are editing a post';
}
@timw4mail
timw4mail / index.php
Created Aug 18, 2011
PHP Kana transliterator
View index.php
<?php
include("kana.php");
if(isset($_GET['in']) && isset($_GET['action']))
{
$in = $_GET['in'];
if($_GET['action'] == "to_hira")
{
$out = Kana::to_hiragana($in);
@jakebellacera
jakebellacera / ICS.php
Last active Jan 17, 2020
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
View ICS.php
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
You can’t perform that action at this time.