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 | |
add_action( admin_head, 'return_meta' ); | |
function return_meta() { | |
get_user_meta_field_data ( 'drmc-department' ); | |
get_user_meta_field_data ( 'drmc-department', 'er' ); | |
} | |
function get_users_by_meta_data( $meta_key, $meta_value ) { | |
// Query for users based on the meta data |
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
// Try to stop the first event category from being added to the article classes | |
// (when the default page template is used) - Thanks Barry | |
add_filter('post_class', 'remove_tribe_cat_once', 1); | |
function remove_tribe_cat_once(array $classes) { | |
if ( class_exists('TribeEvents') ) { | |
// The Main Calendar Page or Calendar Category Page | |
if (( tribe_is_month() && !is_tax() ) || ( tribe_is_month() && is_tax() )) { | |
static $count = 0; | |
if ($count++ === 0) { |
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
add_action( 'wp_head', 'template_name' ); | |
function template_name() { | |
if ( class_exists( 'TribeEvents' ) ) { | |
if ( tribe_is_month() && !is_tax() ) { // The Main Calendar Page | |
$template = TribeEvents::getOption('tribeEventsTemplate'); | |
print_r( $template ); | |
} | |
} | |
} |
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 | |
if ( function_exists( 'tribe_get_ical_link' ) ) { | |
$calurl = tribe_get_ical_link(); | |
$icalurl = preg_replace('(https?://)', 'webcal://', $calurl ); | |
$gcalurl = 'https://www.google.com/calendar/render?cid=' . $calurl ; | |
} | |
?> | |
<a href="<?php echo $icalurl; ?>" title="Subscribe to this calendar using your favorite calendar program (iCal, Outlook, etc.)" class="ical">iCal Subscribe</a> | |
<a href="<?php echo $gcalurl; ?>" title="Subscribe to this calendar in your Google Calendar" class="gcal-add" target="_blank">Subscribe in Google Calendar</a> |
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
(* | |
Script for automatically extracting calendar items from meeting requests | |
and adding them into iCal. It will always extract into the first local calendar. | |
written by Andy Fragen <andy@thefragens.com> | |
modified to run from AppleScript menu | |
http://www.macosxhints.com/article.php?story=20060821073102694 | |
http://bbs.macscripter.net/viewtopic.php?id=17655 |
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
/*Another useful media feature is device-aspect-ratio.*/ | |
/*Note that the iPhone 5 does not have a 16:9 aspect ratio. It is in fact 40:71.*/ | |
/*iPhone < 5:*/ | |
@media screen and (device-aspect-ratio: 2/3) {} | |
/*iPhone 5:*/ | |
@media screen and (device-aspect-ratio: 40/71) {} |
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: New User Approve - Delete Deny | |
GitHub Plugin URI: https://gist.github.com/afragen/5624319 | |
Description: This plugin hooks into 'new_user_approve_user_denied' to delete the denied new user. | |
Requires at least: 3.1 | |
Tested up to: 3.6.1 | |
Version: 1.0.1 | |
Author: Andy Fragen |
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 | |
add_filter('tribe_get_events_title','my_custom_titles'); | |
function my_custom_titles($title) { | |
if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page | |
return 'JazzSchool Events'; | |
} elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages | |
return 'JazzSchool Events' . ' » ' . single_term_title('', false); | |
} elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List |
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
#!/usr/bin/env bash | |
# This script should only generate an email when the WAN IP has changed. | |
# run in launchd | |
#test for any parameter, true if debugging | |
test -n "$1" && dbg=$1 || dbg=false #;dbg=true | |
echo "Running $0" | |
my_ip=`curl -s http://checkip.dyndns.org | awk '{print $6}' | awk ' BEGIN { FS = "<" } { print $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
#!/usr/bin/env bash | |
# call with `mount.sh true` for debug messages | |
version="1.0" | |
dbg=false | |
home_vols=( "/Volumes/iTunes" "/Volumes/Drobo" ) # order is important | |
webdav_vols=( "/Volumes/user1" "/Volumes/user2" "/Volumes/user3" ) | |
home_router_mac="mac-address-here" | |
# how to grab drobo_ip based upon drobo mac address using `netstat -rnf inet` | |
drobo_mac="mac-address-here" |