Skip to content

Instantly share code, notes, and snippets.

View bmarshall511's full-sized avatar

Ben Marshall bmarshall511

View GitHub Profile
<?php
$api = new Mozscape_API_Class( 'accessId', 'secretKey' );
$url_metrics = json_decode($api->urlMetrics( 'http://www.benmarshall.me', 133714411517 ) );
<?php
// Include the Mozscape API Class
require_once( 'class.MozscapeAPIClass.php' );
// Initialize the class by providing it with your Access Id and Secret Key, see http://www.seomoz.org/api/keys
$api = new Mozscape_API_Class( 'accessId', 'secretKey' );
// Get website metrics using the URL Metrics API, see http://apiwiki.seomoz.org/url-metrics
$url_metrics = json_decode( $api->urlMetrics( 'http://www.benmarshall.me', 133714411517 ) );
@media print {
header h1:after {
content: url(https://chart.googleapis.com/chart?cht=qr&amp;chs=150x150&amp;chl=<?=$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"] ?>&amp;choe=UTF-8);
position: absolute;
top: 0;
right: 0;
}
}
@media print {
header h1:after {
content: url(https://chart.googleapis.com/chart?cht=qr&amp;chs=150x150&amp;chl=http://www.knowgifts.com&amp;choe=UTF-8);
position: absolute;
top: 0;
right: 0;
}
}
a:not(:local-link):after {
content: " <" attr(href) "> ";
}
a[href^="#"]:after {
content: "; // Kills the expanded links on anchor tags
}
<p>With the holidays coming around the corner, many people are looking for <a href="http://www.knowgifts.com">unique gift ideas</a> to surprise their loved ones.</p>
@media print {
a[href^=http]:after {
font-style: italic;
content: &quot; &lt; &quot; attr(href) &quot; &gt; &quot;;
}
}
@media print and (color) {
* {
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
}