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( 'pre_get_posts', '_custom_post_status_query' ); | |
/** | |
* As of WordPress API for custom post statuses is still in developement. | |
* This method is a workaround to allow you to query posts by custom post | |
* status, without registering it with register_post_status(); | |
* | |
* @param $query |
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
After renaming table names: | |
1. | |
UPDATE {$new_prefix}options SET option_name = "{$new_prefix}user_roles" WHERE option_name = "{$old_prefix}user_roles"; | |
2. | |
UPDATE {$new_prefix}usermeta SET meta_key = "{$new_prefix}capabilities" WHERE meta_key = "{$old_prefix}capabilities"; | |
3. | |
UPDATE {$new_prefix}usermeta SET meta_key = "{$new_prefix}user_level" WHERE meta_key = "{$old_prefix}user_level"; |
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
CATransform3D transformation = CATransform3DIdentity; | |
// x line | |
transformation.m11 = 1; // 20% less wide wall | |
transformation.m12 = 0; //-1 / 10.0; // skews left up, right down if >0 | |
transformation.m13 = 0; // extends sideways for a short time | |
transformation.m14 = 0;// // 1 / 5000 = left side towards viewer, right side away from viewer | |
// y line | |
transformation.m21 = 0; //-1 / 2.0; // skews bottom left, top right if <0 | |
transformation.m22 = 1; // .8 - 20% less tall | |
transformation.m23 = 0; // extends upward for a short time |
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
/** | |
* This script requires jQuery to be included. | |
* TODO: Fix non-jQuery or insert jQuery. | |
* | |
* It also encrypts messages with your key so that only | |
* you and people you shared the key via other medias like | |
* Facebook or phone can read the messages. | |
*/ | |
// Help (: |
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
-- | |
-- Change domain and update all links | |
-- | |
-- @param prefix - Table prefix | |
-- @param old - Old URL including http://, used to search for links in posts, etc. | |
-- @param new - The new URL including http:// | |
-- | |
SET @prefix = 'wp_'; | |
SET @old = 'http://'; | |
SET @new = 'http://'; |
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/sh | |
# | |
# Local virtual host manager script for Mac (nginx edit) | |
# | |
# How to install: | |
# 1. Save this script somewhere on your disk (/var/www) | |
# 2. Set $user, $servers and $document_root | |
# 3. Create symbolic link: ln -s /path/to/vh.sh /usr/local/bin/vh | |
# 4. Run 'vh -h' for instructions | |
# |
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
sudo rm -rf /usr/local/lib/node_modules | |
sudo rm -rf /usr/local/include/node | |
sudo rm -rf /usr/local/bin/node | |
sudo rm -rf /usr/local/bin/npm | |
sudo rm -rf /usr/local/share/man/man1/node.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 | |
/** | |
* PSR-4 compliant autoloader, updated for PHP7+ | |
* | |
* @param $class | |
*/ | |
spl_autoload_register( function( $class ) { | |
require "vendor/autoload.php"; | |
if( defined( 'NAMESPACE_PREFIX' ) ) { |
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
; Disable <?hh | |
hhvm.hack.lang.look_for_typechecker = false | |
; Enable all PHP7 features | |
hhvm.php7.all = true | |
; Disable caching for static files | |
hhvm.server.expires_default = 1 | |
; Make errors pointing to index.php |
OlderNewer