This file contains hidden or 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
# Go away | |
defaults write "$(mdfind kMDItemCFBundleIdentifier = 'com.skype.skype')/Contents/Info.plist" "LSUIElement" -string "1" && killall Skype | |
# Come back | |
defaults write "$(mdfind kMDItemCFBundleIdentifier = 'com.skype.skype')/Contents/Info.plist" "LSUIElement" -string "0" && killall Skype | |
# If you get any requests to use the keychain, they should go away the next time you restart your mac. You may be asked to sign into Skype again. |
This file contains hidden or 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
define('WP_DEBUG', true); | |
if (WP_DEBUG) { | |
/** | |
* Log errors to wp-content/debug.log | |
* Don't forget to delete this when you're finished, | |
* as it may be publicly accessible. | |
*/ | |
define('WP_DEBUG_LOG', true); |
This file contains hidden or 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
jQuery(function($){ | |
$('section a').click(function(e){ | |
e.preventDefault(); | |
$('html,body').animate({ | |
scrollTop: $('#' + $(this).attr('href').split("#").slice(-1)[0] ).offset().top - $('header').height() | |
},700 ,'swing'); | |
}); | |
}); |
This file contains hidden or 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 | |
function auto_tag_on_sale( $meta_id, $post_id, $meta_key) { | |
if ('mp_is_sale' != $meta_key){ | |
return; | |
} | |
$meta = get_post_custom($post_id); | |
$on_sale = false; |
This file contains hidden or 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: Escalate to Super Admin | |
Plugin URI: https://gist.github.com/rohmann/7159907 | |
Description: Tool to convert normal admin to super admin. | |
Place in mu-plugins folder. Then visit /wp-admin with a normal admin account. Next, go to the network dashboard to test it. Finally, delete this plugin to prevent abuse | |
Author: Alexander Rohmann | |
Author URI: https://gist.github.com/rohmann | |
Version: 1.0 | |
*/ |
This file contains hidden or 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 | |
class View { | |
public static function __callStatic($name,$parameters) { | |
try { | |
//Get template name from method call | |
$fname = TEMPLATES_DIR . implode('/', explode("_",$name) ).'.php'; |
This file contains hidden or 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', 'custom_admin_css'); | |
function custom_admin_css() { ?> | |
<style> | |
label[for=siteurl], input[name=siteurl], label[for=home], input[name=home], input[name=home] + p.description { | |
display: none; | |
} | |
</style> | |
<?php |
This file contains hidden or 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('wpmu_activate_blog','remove_user_from_primary_site',999,5); | |
function remove_user_from_primary_site($blog_id, $user_id, $password, $title, $meta){ | |
remove_user_from_blog($user_id,1); | |
} |
This file contains hidden or 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 | |
function remove_signup_option(){ | |
//Predefine what kind of registration is happening. wp-signup.php won't show the option if one is declared | |
global $active_signup; | |
$active_signup='blog'; | |
} | |
add_action('signup_hidden_fields','remove_signup_option'); |
This file contains hidden or 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 | |
//Only allow requests from Github (see: https://gist.github.com/webtekk/6326465) | |
if (!githubOrigin()) die('Unauthorized'); | |
$data = json_decode($_POST['payload'],true); | |
//Only continue if this commit is on the master branch | |
if (!$data['ref'] == 'refs/heads/master') die('Not a master branch commit'); |