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 | |
/** | |
* View queries generated by ElasticPress | |
*/ | |
function ep_log_query_to_screen( $formatted_args, $args, \WP_Query $wp_query ) { | |
static $count; | |
$count ++; | |
if ( ! $wp_query->is_search() || $count > 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
import bpy | |
import re | |
def rename_all_bones(): | |
armature = bpy.context.active_object | |
bones = armature.data.bones | |
for bone in bones: | |
new_name = rename_bone(bone.name) | |
if new_name is not "": |
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
{ | |
"name": "jesgs/wordpress-project", | |
"type": "project", | |
"repositories": [ | |
{ | |
"type": "composer", | |
"url": "https://wpackagist.org" | |
} | |
], | |
"require": { |
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
{ | |
"listen": ["127.0.0.1", 7890], | |
"relay": [null, 7891], | |
"verbose": true, | |
"color": { | |
"gamma": 2.5, | |
"whitepoint": [1.0, 1.0, 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 | |
/** | |
* Add page attributes to post | |
*/ | |
function mytheme_add_post_attributes() | |
{ | |
add_post_type_support('post', 'page-attributes'); | |
} | |
add_action('init', 'mytheme_add_post_attributes', 500); |
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
SELECT | |
table_name AS `Table`, | |
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` | |
FROM information_schema.TABLES | |
WHERE table_schema NOT IN ('performance_schema', 'mysql', 'information_schema') | |
ORDER BY (data_length + index_length) DESC; |
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
git config --global user.email "your@email_address.tld" | |
git rebase -i | |
git commit --amend --reset-author | |
git rebase --continue | |
git push |
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
.control-extend { | |
&__label { | |
display: none; | |
@media only screen and (min-width: 768px) { | |
display: inline-block; | |
font-weight: 800; | |
cursor: pointer; | |
color: black; | |
&:hover { |
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
<div class="wrapper"> | |
<header class="row"> | |
<h1 class="h h1">MoonPhase App</h1> | |
</header> | |
<div class="row"> | |
<ul class="data-table h3"> | |
<li> | |
<strong class="label">Current Date</strong><span class="value js-current-date-value"></span> | |
</li> |
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 | |
/** | |
* Pull in options | |
*/ | |
$group_comics = MangaPress_Bootstrap::get_instance()->get_option('basic', 'group_comics'); | |
$group_by_parent = MangaPress_Bootstrap::get_instance()->get_option('basic', 'group_by_parent'); | |
/** | |
* @link https://github.com/mangapress/mangapress/blob/master/includes/functions.php#L234 | |
*/ |
NewerOlder