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 | |
namespace Kfriend\Data; | |
use Closure; | |
class Proxy extends \ArrayObject | |
{ | |
public function __invoke($item, $default = null) | |
{ |
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
escapeHTML = (function() { | |
var entities = { | |
'&': '&', | |
'<': '<', | |
'>': '>', | |
'"': '"', | |
"'": ''', | |
'/': '/' | |
}; |
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('nav_menu_css_class', function($classes, $item) { | |
switch (get_query_var('post_type')) { | |
case 'custom_post_type_name': | |
if ($item->object_id == THE_ID_FOR_THE_NAV_ITEMS_TARGET_PAGE) { | |
$classes = array_diff($classes, array('current_page_parent')); | |
} | |
break; | |
} |
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/local/psa/admin/sbin/mailqueuemng -D |
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
RewriteEngine On | |
RewriteCond %{REQUEST_URI} ^/wp-content/uploads/.* | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule (.*) http://www.production.com/$1 [R=301,L] |
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
find . -type d -name .svn -exec rm -rf {} \; |
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 | |
// ============================================================================= | |
// Array helpers | |
// ============================================================================= | |
/** | |
* Array splice, associatively | |
* | |
* Splices a value into an array by targeting a key, instead of an offset. |
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
VBoxManage modifyvm "VM name" --natdnshostresolver1 on |
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 | |
function compare_versions( | |
$version, $compareVersion, $lookup = array('greater' => 1, 'equal' => 0, 'less' => -1) | |
) | |
{ | |
$version = explode('.', $version); | |
$compareVersion = explode('.', $compareVersion); | |
$count = max(count($version), count($compareVersion)); |
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 | |
function select_12_hour() | |
{ | |
$return = ''; | |
for ($i = 0; $i < 24; $i++) | |
{ | |
$period = ($i < 12) ? 'a.m.' : 'p.m.'; |
OlderNewer