Skip to content

Instantly share code, notes, and snippets.

View keeev's full-sized avatar
🦦
probably designing, coding or eating

Kevin keeev

🦦
probably designing, coding or eating
View GitHub Profile
@keeev
keeev / Disable shadows for screenshots | Mac OS
Created September 29, 2018 13:44
Disable shadows for screenshots | Mac OS
defaults write com.apple.screencapture disable-shadow -bool TRUE
killall SystemUIServer
@keeev
keeev / pxtoem.less
Created November 23, 2015 15:03
Convert PX to EM (LESS)
/*------------------------------------*\
PX to EM Converter
Syntax: .em(45) => 2,81em
\*------------------------------------*/
@browser-default-font-size: 16; //px
.em (@value, @context: @browser-default-font-size) {
font-size: (@value/@context) + 0em;
@keeev
keeev / script.js
Created April 28, 2014 07:35
Make Bootstrap tooltips/popovers work everytime.
// tooltips
$('[data-toggle="tooltip"]').tooltip({'placement': 'top'});
// popovers
$('[data-toggle="popover"]').popover({trigger: 'hover','placement': 'top'});
@keeev
keeev / gist:7412937
Created November 11, 2013 13:08
this is the setting of the actual header.php
<?php
$seo_title = get_post_meta($post->ID, '_yoast_wpseo_title', true);
$seo_title = apply_filters('the_title', $seo_title);
if($seo_title == "") $seo_title = get_the_title();
?>
<title><?php if (!is_home()) { echo $seo_title; echo " - "; } echo str_replace("%s", "", get_bloginfo('name')); ?><?php # if (!is_home())
echo " ";
#get_the_title();#wp_title(); ?></title>
@keeev
keeev / Ancestor Pages
Created June 7, 2013 10:30
Get ancestor Pages to current page
<?php
$ancestors = get_post_ancestors($post);
if (count($ancestors) >= 1) { // add your hierarchy here
$parent = $ancestors[0];
}