Skip to content

Instantly share code, notes, and snippets.

@tomhayes
tomhayes / MySQL WordPress Migration Database URL update
Last active March 30, 2016 08:19
MySQL WordPress Migration Database URL update
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
@tomhayes
tomhayes / Defer WP Scripts to Footer
Last active January 19, 2017 19:13
Defer WP Scripts to Footer
.amp {
font-family: Baskerville, 'Goudy Old Style', Palatino, 'Book Antiqua', serif;
font-style: italic;
font-weight: normal;
}
a {
position: relative;
padding-bottom: 2px;
text-decoration: none;
}
a:hover::after {
content: "";
position: absolute;
bottom: 2px;
.fade {
opacity: 1;
transition: opacity .25s ease-in-out;
-moz-transition: opacity .25s ease-in-out;
-webkit-transition: opacity .25s ease-in-out;
}
.fade:hover {
opacity: 0.5;
}
@media
(-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
/* Retina-specific stuff here */
}
tbody tr:nth-child(odd) {
background-color: #ccc;
}
body {
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight: 300;
}
<?php
$path = getcwd();
echo "Your Absolute Path is: ";
echo $path;
?>