It is loaded by default by /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist.
If you run
launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist
| <?php | |
| /** | |
| * WordPress Emergency Tools v1.0 | |
| * | |
| * This is a tool to manually deactivate a theme and any plugins when you can not | |
| * access the admin panel due to WordPress theme or plugins bug etc. | |
| * Usage it please place this file in the same directory as "wp-config.php" and | |
| * access it directly from the browser. | |
| * Please delete this file promptly after use (If this file will remain, it will | |
| * be a serious security hole for your service). |
| add_action( 'template_redirect', 'wc_custom_redirect_after_purchase' ); | |
| function wc_custom_redirect_after_purchase() { | |
| global $wp; | |
| if ( is_checkout() && ! empty( $wp->query_vars['order-received'] ) ) { | |
| wp_redirect( '#' ); | |
| exit; | |
| } | |
| } |
It is loaded by default by /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist.
If you run
launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist
| #!/usr/bin/env php | |
| <?php | |
| date_default_timezone_set('GMT'); | |
| if (count($argv)<2) { | |
| echo $argv[0] . ' <token> <until>' . PHP_EOL; | |
| echo 'Example: ' . $argv[0] . ' abcd-12345678-123456789-12345 \'-3 months\'' . PHP_EOL; | |
| exit; | |
| } |
| wp_embed_register_handler( | |
| 'github-gist', | |
| '/https:\/\/gist\.github\.com\/([^\/]+)\/([^\/]+)/', | |
| function($matches, $attr, $url, $rawattr) { | |
| $embed = "<script src=\"{$url}.js\"></script>"; | |
| return apply_filters( | |
| 'embed_github_gist', | |
| $embed, | |
| $matches, |
| <?php | |
| /** | |
| * Modify query to remove a post type from search results, but keep all others | |
| * | |
| * @author Joshua David Nelson, josh@joshuadnelson.com | |
| * @license http://www.gnu.org/licenses/gpl-2.0.html GPLv2+ | |
| */ | |
| add_action( 'pre_get_posts', 'jdn_modify_query' ); | |
| function jdn_modify_query( $query ) { | |
| /** | |
| * Set custom upload directory | |
| * | |
| * Images => /img | |
| * PDF => /pdf | |
| * Misc => /misc | |
| * | |
| * Note: Doesn't work with 'browser uploader' | |
| * Note: Use with 'wp_update_attachment_metadata' hook if we want to define our own attachment metadata | |
| * Allowed file types: http://codex.wordpress.org/Uploading_Files#About_Uploading_Files_on_Dashboard |
| /** | |
| * Sanitize File name during upload | |
| * http://stackoverflow.com/questions/3259696/rename-files-during-upload-within-wordpress-backend | |
| */ | |
| function make_filename_hash($filename) { | |
| $info = pathinfo($filename); | |
| $ext = empty($info['extension']) ? '' : '.' . $info['extension']; | |
| $name = basename($filename, $ext); | |
| return md5($name) . $ext; | |
| } |
| #!/bin/bash | |
| # warmly.sh | |
| # A wget based, easy, poor man`s cache warmer script | |
| # https://gist.github.com/thomasfr/7926314 | |
| # The MIT License (MIT) | |
| # | |
| # Copyright (c) 2013,2014 Thomas Fritz <fritztho@gmail.com> (http://fritzthomas.com) | |
| # |
| #!/usr/bin/env bash | |
| echo "Setting $1 bounds to 720p" | |
| # 720p is 1280x720. | |
| # Bounds is startX, startY, endX, endY. Adjust size from starting position to account for this | |
| osascript -e "tell application \"$1\" to set the bounds of the first window to {250, 220, 1530, 940}" | |
| # activate the app, to bring it to the front | |
| osascript -e "tell application \"$1\" to activate" |