This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** http://dabblet.com/gist/5261343 | |
| * Named Pages - Print style sheets | |
| */ | |
| @page narrow { | |
| size: 9cm 18cm; | |
| } | |
| @page rotated { | |
| size: landscape; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * On-the-fly CSS Compression | |
| * Copyright (c) 2009 and onwards, Manas Tungare. | |
| * Creative Commons Attribution, Share-Alike. | |
| * | |
| * In order to minimize the number and size of HTTP requests for CSS content, | |
| * this script combines multiple CSS files into a single file and compresses | |
| * it on-the-fly. | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @-webkit-keyframes rainbow { | |
| 0% {border-color: hsl(0, 100%, 50%);} | |
| 100% {border-color: hsl(255, 100%, 50%);} | |
| } | |
| .rainbow_border{ | |
| border: 4px solid hsl(0, 100%, 50%); | |
| -webkit-animation: rainbow 5s infinite alternate; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function convert(geo){ | |
| var latlonrg = /(\d+(?:\.\d+)?)[\xb0\s]?\s*(?:(\d+(?:\.\d+)?)['\u2019\u2032\s])?\s*(?:(\d+(?:\.\d+)?)["\u201d\u2033\s])?\s*([SNEW])?/i; | |
| var m = String(geo).split(latlonrg), | |
| lat = m && +m[1] + (m[2] || 0) / 60 + (m[3] || 0) / 3600; | |
| if (m[4].toUpperCase() == "S") { | |
| lat = -lat; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //get artist photo | |
| function getArtistPhoto($artist, $size) { | |
| $artist = urlencode($artist); | |
| $xml = "http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist={$artist}&api_key=YOUR_KEY"; | |
| $xml = @file_get_contents($xml); | |
| if(!$xml) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //cleanup and sort elemets that have likes | |
| //cleanup for likes | |
| $(".LikesCount").each(function() { | |
| var num = Number($(this).text().trim().replace("likes", "").replace("like", "")); | |
| $(this).html(num); | |
| }); | |
| //sort | |
| var mylist = $('.pin'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //cleanup and sort elemets that have repins | |
| //grab all pins | |
| var mylist = $('.pin'); | |
| //find all pins that have repins | |
| var listitems = mylist.find('.RepinsCount'); | |
| //trim the contents of the repins element to just a number and compare them against each other to sort | |
| listitems.sort(function(a, b) { | |
| var compA = Number( $(a).text().trim().replace("repins", "").replace("repin", "") ); | |
| var compB = Number( $(b).text().trim().replace("repins", "").replace("repin", "") ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Template Name: Google+ Feed | |
| */ | |
| /** | |
| * A WordPress page template for a Google+ feed. | |
| * | |
| * @author Dominik Schilling |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ---------------------------------------------------------- | |
| // A short snippet for detecting versions of IE in JavaScript | |
| // without resorting to user-agent sniffing | |
| // ---------------------------------------------------------- | |
| // If you're not in IE (or IE version is less than 5) then: | |
| // ie === undefined | |
| // If you're in IE (>=5) then you can determine which version: | |
| // ie === 7; // IE7 | |
| // Thus, to detect IE: | |
| // if (ie) {} |