Skip to content

Instantly share code, notes, and snippets.

View isarmstrong's full-sized avatar

Ian Armstrong isarmstrong

View GitHub Profile
@davidpaulsson
davidpaulsson / wp-get_id_by_slug
Created February 26, 2014 06:20
WordPress: Get page ID from slug
// Usage:
// get_id_by_slug('any-page-slug');
function get_id_by_slug($page_slug) {
$page = get_page_by_path($page_slug);
if ($page) {
return $page->ID;
} else {
return null;
}
@Swader
Swader / .gitignore
Created November 21, 2013 15:18
A wildcard gitignore file
# Composer
vendor
vendor/*
!public/assets/js/vendor
!public/assets/js/vendor/*
!public/assets/css/vendor
!public/assets/css/vendor/*
composer.phar
composer.lock
@manuelcabral
manuelcabral / gist:6365383
Created August 28, 2013 12:17
Compass mixin to simulate text-stroke using text-shadow
@import "compass/css3/text-shadow";
@mixin text-stroke-with-shadow($thickness, $color, $blur) {
@include text-shadow( $thickness 0 $blur $color,
(-$thickness) 0 $blur $color,
0 $thickness $blur $color,
0 (-$thickness) $blur $color,
($thickness/2) ($thickness/2) $blur $color,
((-$thickness)/2) ((-$thickness)/2) $blur $color,
($thickness/2) ((-$thickness)/2) $blur $color,