Andrew Nacin nacin

View attach.sh
1 2 3 4 5 6 7 8 9 10
#!/bin/sh
 
# In order for this to work, you needed to have committed to
# https://plugins.svn.wordpress.org and have this in your Mac OS X keychain.
 
# In lieu of a ticket number, it also accepts the format "12345.3.diff"
# which will replace a previous diff of that name.
 
# Edit this
SVN_USER='nacin'
View 1password.html
1 2 3 4 5 6 7 8 9 10
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
</head>
<body>
 
<form>
<input type="text" name="log" />
<input type="password" name="pwd" />
<input type="submit" />
View london-contribute.md
View auto-update.php
1 2 3 4 5 6 7 8 9 10
<?php
 
// Add this as a mu-plugin.
 
if ( isset( $_GET['wp_maybe_auto_update'] ) ) {
add_filter( 'automatic_updates_is_vcs_checkout', '__return_false' );
add_action( 'template_redirect', function() {
$time = date( 'r' );
echo "Starting... $time<br />";
delete_site_option( 'auto_core_update_failed' );
View functions.php
1 2 3 4 5 6 7
<?php
 
function nacin_remove_private_protected_from_titles( $format ) {
return '%s';
}
add_filter( 'protected_title_format', 'nacin_remove_private_protected_from_titles' );
add_filter( 'private_title_format', 'nacin_remove_private_protected_from_titles' );
View hacky-taxonomy-archives.php
1 2 3 4 5 6 7 8 9 10
<?php
/*
* Plugin Name: Hacky Taxonomy Archives
* Description: Don't use this on a live site, plz. Proof of concept for Aaron Holbrook.
* Author: Andrew Nacin
*/
 
add_action( 'template_redirect', function() {
global $wp_rewrite;
$taxonomy = 'fruits';
View gist:5533549
1 2 3 4 5 6 7 8 9 10
PemFTP
--------------------------------
File : wp-admin/includes/class-ftp.php:508
Reason : UseUndeclaredVariable
Snippet : $arg
Line : return $this->_list(($arg?" ".$arg:"").($pathname?" ".$pathname:""), "NLST", "nlist");
--------------------------------
File : wp-admin/includes/class-ftp.php:508
Reason : UseUndeclaredVariable
Snippet : $arg
View prying-eyes.php
1 2 3 4 5 6 7 8 9
<?php
 
//** Redirect if not logged in
add_action( 'template_redirect', function() {
if ( ! is_user_logged_in() ) {
wp_redirect( wp_login_url() );
exit;
}
} );
View trac-attach.sh
1 2 3 4 5 6 7 8 9 10
#!/bin/sh
 
# A script that leverages Trac XML-RPC (I know, I know) to upload patches.
#
# This script is written specifically for the Mac, in that it reads from
# your keychain to derive your SVN password. You can change the SVN_PASS
# line below if you wanted to pull from ~/.svn/ or what not.
#
# Basic usage: `trac-attach.sh 12345` uploads a patch to ticket #12345,
# using the name 12345.diff. If there exists a 12345.diff, the patch is
View glotpress_rosetta-roles.php
1 2 3 4 5 6 7 8 9
<?php
 
class GP_WPorg_Rosetta_Roles extends GP_Plugin {
var $id = 'wporg-rosetta-roles';
 
function __construct() {
parent::__construct();
$this->add_filter( 'pre_can_user', array( 'args' => 2, 'priority' => 9 ) );
}
Something went wrong with that request. Please try again.