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 | |
$email = isset( $_GET['email'] ) ? $_GET['email'] : 'null'; | |
$salt = isset( $_GET['salt'] ) ? $_GET['salt'] : ''; | |
// hash email, split it up | |
$hash = str_split( sha1( $email . $salt ), 2 ); | |
// use first 3 values for foreground | |
$foreground = "{$hash[0]}{$hash[1]}{$hash[2]}"; |
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
class UnlimitedICalFeed { | |
public static function setup() { | |
add_action( 'pre_get_posts', array( __CLASS__, 'pre_get_posts' ), 75 ); | |
} | |
public static function pre_get_posts( WP_Query $query ) { | |
if ( ! $query->tribe_is_event_query ) return self::shutdown(); | |
if ( ! isset($_GET['ical'] ) || 'all' !== $_GET['ical'] ) return self::shutdown(); | |
$query->set( 'posts_per_page', -1 ); | |
} |
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 | |
/** | |
* Load Ember templates in WordPress | |
*/ | |
public static function load_views() { | |
$iterator = new \DirectoryIterator( plugin_dir_path( __FILE__ ) . 'views' ); | |
foreach ( $iterator as $file ) { | |
/** | |
* @var \SplFileInfo $file |
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
<h2 class="nav-tab-wrapper"> | |
Plugin Settings | |
<a href="#" class="nav-tab nav-tab-active">Tab 1</a> | |
<a href="#" class="nav-tab">Tab 2</a> | |
</h2> |
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
App.collectionController = Em.ArrayProxy.create(Ember.PaginationSupport, { | |
content: [], | |
fullContent: App.store.findAll(App.Job), | |
totalBinding: 'fullContent.length', | |
didRequestRange: function(rangeStart, rangeStop) { | |
var content = this.get('fullContent').slice(rangeStart, rangeStop); | |
this.replace(0, this.get('length'), content); | |
} | |
}); |
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
Data.Model = Backbone.Model.extend({ | |
toJSON: function(){ | |
var clone = _.clone(this.attributes); | |
_.each(clone, function (attr, idx) { | |
if(attr.toJSON){ | |
clone[idx] = attr.toJSON(); | |
} | |
}); | |
return clone; | |
} |
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
# get param | |
$url = $_POST["url"]; | |
$host = $_POST["host"]; | |
$ip = "127.0.0.1"; | |
$port = "80"; | |
$timeout = 1; | |
$verbose = 1; | |
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
if ( function_exists( 'wpcom_is_vip' ) && wpcom_is_vip() ) { | |
wpcom_vip_load_helper_wpcom(); | |
} else { | |
require_once( WP_CONTENT_DIR . '/themes/vip/plugins/vip-do-not-include-on-wpcom/vip-local-development-helper/vip-local-development-helper.php' ); | |
require_once( WP_CONTENT_DIR . '/themes/vip/plugins/vip-do-not-include-on-wpcom/vip-powered-wpcom/vip-powered-wpcom.php' ); | |
} | |
wpcom_vip_load_helper(); | |
wpcom_vip_load_plugin( 'easy-custom-fields' ); |
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
#!/bin/bash | |
# | |
# provision.sh | |
# | |
# This file is specified in Vagrantfile and is loaded by Vagrant as the primary | |
# provisioning script whenever the commands `vagrant up`, `vagrant provision`, | |
# or `vagrant reload` are used. It provides all of the default packages and | |
# configurations included with Varying Vagrant Vagrants. | |
# By storing the date now, we can calculate the duration of provisioning at the |
OlderNewer