Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
body#-webkit-web-inspector #main{background-color:#002b36!important}body#-webkit-web-inspector #main .panel.network,body#-webkit-web-inspector #main .panel.timeline,body#-webkit-web-inspector #main .panel.profiles,body#-webkit-web-inspector #main .panel.audits,body#-webkit-web-inspector #main .panel.extension{background-color:#fff!important}body#-webkit-web-inspector #console-messages a:hover,body#-webkit-web-inspector #console-messages .console-formatted-function,body#-webkit-web-inspector #console-messages .console-formatted-object{color:#93a1a1!important}body#-webkit-web-inspector #console-prompt,body#-webkit-web-inspector #console-messages a,body#-webkit-web-inspector #console-messages .console-message,body#-webkit-web-inspector #console-messages .console-group-messages .section .header .title{color:#839496!important}body#-webkit-web-inspector #console-messages .console-formatted-null,body#-webkit-web-inspector #console-messages .console-formatted-undefined{color:#657b83!important}body#-webkit-web-inspect |
<?php | |
/** | |
* Text Field | |
* | |
* A simple text field callback to use with the Settings API. Don't forget to pass in | |
* the arguments array. Here's an example call to add_settings_field() : | |
* | |
* add_settings_field( 'my_option', __( 'My Option' ), 'foo_field_text', 'theme_options', 'general', array( | |
* 'name' => 'my_theme_options[my_option]', | |
* 'value' => $options['my_option'], // assuming $options is declared |
<?php | |
add_action( 'save_post', 'clear_many_sites_transient', 10, 1 ); | |
add_action( 'edit_post', 'clear_many_sites_transient', 10, 1 ); | |
function clear_many_sites_transient( $post_id ){ | |
$post = get_post( $post_id ); | |
if( 'page' === $post->post_type ) | |
delete_transient( 'many_sites_in_one' ); |
<?php | |
// No, Thanks. Direct file access forbidden. | |
! defined( 'ABSPATH' ) AND exit; | |
// INIT | |
add_action( 'after_setup_theme', array( 'unavailable_post_status', 'init' ) ); | |
class unavailable_post_status extends wp_custom_post_status | |
{ | |
/** |
<?php | |
/** | |
* Return posts with maximum age of one year. | |
* | |
* Usage: | |
* add_filter( 'posts_where', 'wp_query_filter_max_one_year_old' ); | |
* $my_query = new WP_Query( array( ... ) ); | |
* remove_filter( 'posts_where', 'wp_query_filter_max_one_year_old' ); | |
* | |
* @param string $where |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
<?php | |
/* | |
Plugin Name: WP Invite Codes | |
Plugin URI: http://pmg.co/ | |
Description: Makes wordpress an invite only community. | |
Version: n/a | |
Author: Christopher Davis | |
Author URI: http://pmg.co/people/chris | |
*/ |
<?php | |
/** | |
* Plugin Name: APC Object Cache | |
* Description: An object cache implementation that uses APC. | |
* Author: Christopher Davis | |
* Author URI: http://christopherdavis.me | |
* Version: 0.1 | |
* | |
* Based on Mark Jaquith's APC object cache | |
* http://txfx.net/wordpress-plugins/apc/ |
#Introduction If you're a php developer on ubuntu, there comes the time where you have to install/reinstall your system. I did it already a few times and i decided to write down the steps for a typical web developer stack with php. This is for a developer machine and not for a live environment!
I hope it helps you too!
fyi @mheiniger and me started with an installer here: https://github.com/mheiniger/webdev-setup
<?php | |
/** | |
* Plugin Name: Ratcache | |
* Description: An advanced caching plugin that uses an external object cache to store full pages. | |
* Author: Christopher Davis | |
* Author URI: http://christopherdavis.me | |
* Version: 0.1 | |
* | |
* Place this file in your `wp-content` directory and add | |
* `define('WP_CACHE', true)` to your wp config file. |