Skip to content

Instantly share code, notes, and snippets.

View Jorbishiza.php
<?php
/*
Plugin Name: Jorbishiza
*/
add_filter( 'publishiza_format_post_content_for_twitter', 'jorbishiza_format_post_content_for_twitter', 10, 3);
function jorbishiza_format_post_content_for_twitter( $tweets, $text, $length ){
$tweets = array();
View use-hooks-not-globals.diff
Index: object-cache.php
===================================================================
--- object-cache.php (revision 1548389)
+++ object-cache.php (working copy)
@@ -374,9 +374,9 @@
else : // No APC
function apc_not_actually_running() {
$GLOBALS['_wp_using_ext_object_cache'] = false;
- unset( $GLOBALS['wp_filter']['all'][-100]['apc_not_actually_running'] );
+ remove_action( 'all', 'apc_not_actually_running', -100, 0 );
View badfile.php
<?php
namespace Symfony\Component\Yaml;
class Yaml
{
public static function dump()
{
die( 'Bad File' );
View time.js
let t1 = 1433116798; // 2 seconds before midnight d1
let t2 = 1433116799; // 1 second before midnight d1
let t3 = 1433116801; // 1 seoncd after midnight d2
let t4 = 1433203201; // 1 second after midnight d3
const DAY_IN_SECONDS = 86400;
let days_since_epoch = t => {
return Math.floor( t / DAY_IN_SECONDS );
}
View hello.php
<?php
/**
* @package Hello_Dolly
* @version 1.6
*/
/*
Plugin Name: Hello Dolly
Plugin URI: http://wordpress.org/plugins/hello-dolly/
Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen on every page.
Author: Matt Mullenweg
View module_import.sh
#!/bin/bash
set -e
git config -f .gitmodules --get-regexp '^submodule\..*\.path$' > tmpfile
while read -u 3 path_key path
do
url_key=$(echo $path_key | sed 's/\.path/.url/')
url=$(git config -f .gitmodules --get "$url_key")
View .travis.yml
sudo: false
language: php
matrix:
include:
- php: 5.6
before_install:
- WP_CORE_DIR=/tmp/wordpress/
- git clone https://github.com/WordPress/twentysixteen.git src/wp-content/themes/twentysixteen
- |
if [[ true ]]; then
@aaronjorbin
aaronjorbin / gist:9ac7c3730f0736d44f89
Created Jul 31, 2015
All the packages I needed to get php7 running
View gist:9ac7c3730f0736d44f89
sudo apt-get install libxml2-dev libpcre3-dev libbz2-dev libcurl4-openssl-dev libjpeg-dev libpng12-dev libxpm-dev libfreetype6-dev libmysqlclient-dev libt1-dev libgd2-xpm-dev libgmp-dev libsasl2-dev libmhash-dev unixodbc-dev freetds-dev libpspell-dev libsnmp-dev libtidy-dev libxslt1-dev libmcrypt-dev librecode-dev libt1-dev libgmp-dev bison bzip2 libbz2-dev libcurl4-openssl-dev libcurl4-openssl-dev libjpeg-dev libpng-dev libfreetype6-dev libgmp-dev libmcrypt-dev libmysqlclient-dev libpspell-dev
View js.js
jQuery( window ).off( 'beforeunload', wp.updates.beforeunload );
jQuery( window ).on( 'beforeunload', function(){
return 'always prompt'
});
~
~
~
~
~
View gist:a19fc1480660e1b4fc1c
Index: src/wp-admin/css/common.css
===================================================================
--- src/wp-admin/css/common.css (revision 31694)
+++ src/wp-admin/css/common.css (working copy)
@@ -1942,6 +1942,10 @@
display: block;
}
+#request-filesystem-credentials-dialog {
+ display: none;