This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Generic function to add body classes | |
* Can take either a string of space-separated classes or an array | |
* | |
* Requires PHP 5.3 for access to closures | |
*/ | |
function es_add_body_class( $new_classes ) { | |
// Turn the input into an array we can loop through |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80 default_server; | |
server_name domain.com *.domain.com; | |
root /srv/www/domain.com/public; | |
access_log /srv/www/domain.com/log/access.log; | |
error_log /srv/www/domain.com/log/error.log; | |
location / { | |
index index.php; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Jetpack Subscribe | |
Description: Custom subscription UI for Jetpack | |
Version: 1.0 | |
Author: Evan Solomon | |
Author URI: http://evansolomon.me/ | |
*/ | |
class ES_Jetpack_Subscribe { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
someData: 'hello' | |
didReceiveAttrs() { | |
console.log('didReceiveAttrs') | |
}, | |
didUpdateAttrs() { | |
console.log('didUpdateAttrs') | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
actions: { | |
clearPersonData() { | |
this.set('person', null) | |
} | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin name: Capitalize category names on display | |
Description: Capitalize the first letter of a category name when it's displayed in the theme | |
*/ | |
function capitalize_category_names_on_display( $name ) { | |
return ucfirst( $name ); | |
} | |
add_filter( 'single_cat_title', 'capitalize_category_names_on_display' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Start a new pool named 'www'. | |
; the variable $pool can we used in any directive and will be replaced by the | |
; pool name ('www' here) | |
[www] | |
; Per pool prefix | |
; It only applies on the following directives: | |
; - 'slowlog' | |
; - 'listen' (unixsocket) | |
; - 'chroot' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
contentHtml: Ember.String.htmlSafe(` | |
<p>Hello <strong>world</strong></p> | |
<p>This content has html like images</p> | |
<p><img src="http://placekitten.com.s3.amazonaws.com/homepage-samples/408/287.jpg"></p> | |
`) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bash | |
# | |
# bash completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Optimizely | |
Description: Runs Optimizely experiments. | |
Author: koop, evansolomon | |
Version: 0.2 | |
*/ | |
class WPCOM_Optimizely { | |
public $version; |
NewerOlder