View EncryptCookies.php
<?php namespace App\Http\Middleware;
use Illuminate\Contracts\Encryption\DecryptException;
use Illuminate\Cookie\Middleware\EncryptCookies as BaseMiddleware;
use Symfony\Component\HttpFoundation\Cookie;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
// The first two functions are identical to the originals in the parent class
// other than the sections marked "MOD". The third function is a new helper
View cf7-campaignmonitor.php
Plugin Name: Contact Form 7 - Campaign Monitor Addon
Plugin URI:
Description: Add the power of CampaignMonitor to Contact Form 7
Author: Joshua Bettigole
Author URI:
Version: 1.06 (Modified)
View amfe.php
Plugin Name: Add more files extensions
Plugin URI:
Description: Add more files extensions with a new field in your <a href="options-media.php">Media Settings</a>.
Version: 0.2
Author: Arthur Lacoste
Author URI:
# This is a script I used to download my live site database onto my development
# server when I used a web host that used cPanel, but didn't give me access to
# mysqldump over SSH (because they had Jailshell enabled).
# Note: The database name (DBNAME) excludes the account name prefix - i.e.
# "dbname" not "sitename_dbname".
curl http://USERNAME:PASSWORD@HOSTNAME:2082/getsqlbackup/DBNAME.sql.gz \

How to add a simple "star" flag to posts (a la Gmail).

This works by adding the "Starred" category to the post when the Star button is clicked, and removing it when Unstar is clicked. It was written for a private, single-user site - it doesn't support multiple users having different sets of starred posts.

It uses ajax, so it is fast and doesn't require a page reload.

Tested against WordPress 3.0.3.

Also see:

View filosofo-comments-preview-count-fix.php
// Filosofo Comments Preview [1] is a WordPress plugin that lets you preview
// comments on your blog before you submit them.
// In the current version (1.5) it doesn't increment the number of posts, so it
// still says "there are no comments" when you click Preview, even though the
// previewed comment is directly under it.
// This little addition to the plugin will correct that - or you can put this in
View starred-posts-widget.php
// This is a modification to the theme's functions.php that adds a widget to
// list all of the posts in the "Starred" category.
// Also see: Toggle "Starred" Category -
// It has no user-configurable options, because I just wanted it to do this one
// thing. (There may be plugins that do this and more, but I didn't take the
// time to search.)
View set-options-for-all-blogs.php
// I used this code snippet as part of a WordPress Multisite plugin, to allow me
// to quickly set some options for all the blogs on a WordPress Multisite
// installation.
// Also see: Automatically enable plugins in new WordPress Multisite blogs -
View force-categories.php
// On one WordPress blog I have categories for "Starred" and "Archived", in
// addition to the "real" categories. (They should probably be tags really...
// But it's easier to select categories in the admin than tags.)
// I hacked this together to make sure the posts would still go into
// "Uncategorised" as well.
# Every now and then you need to work out if a script is running in Cygwin. It's
# very simple really.
# I can't remember what I used this code for, but I just came across it while
# clearing out some old files!
# Source:
case "$(uname)" in
CYGWIN*) cygwin=1 ;;