Skip to content

Instantly share code, notes, and snippets.

View lajlev's full-sized avatar

Michael Lajlev lajlev

View GitHub Profile
@lajlev
lajlev / mediaqueries.scss
Created April 11, 2012 16:12
Sass - Media queries made simple
//
// sass - Media queries made simple
//
// @require sass-3.2 (you need eventually to do "sudo gem install sass --pre")
//
// Inspired by Maxime Thirouin & Mason Wendell
/* How to use it?
.class-name {
@include mq(phone) { color:pink }
<header>
<h1><?php echo $json->TrustScore->Human; ?></h1>
<img src="<?php echo $json->TrustScore->StarsImageUrls->large; ?>" alt="stars"/>
<p class="review-count"><?php echo $json->ReviewCount->Total; ?> customers has written a review on Trustpilot</p>
</header>
<?php
// The JSON feed is gzipped. This is needed to unpack it before using
require('inc/gzdecode.php');
// Get the JSON feed and gzunpack
$file = gzdecode( file_get_contents("http://s.trustpilot.com/tpelements/917278/f.json.gz") );
// JSON decode the string
$json = json_decode($file);
?>