This file contains 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 | |
/** | |
* CSV to SortTable: Add Header Row | |
* | |
* @param array $data | |
* @return array | |
*/ | |
function csv_to_sorttable_add_header_row( $data ) { | |
$header_row = array( 'Column 1', 'Column 2', 'Column 3' ); | |
array_unshift( $data, $header_row ); |
This file contains 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 | |
/** | |
* Usage: | |
* Send the url you want to access url encoded in the url paramater, for example (This is with JS): | |
* /twitter-proxy.php?url='+encodeURIComponent('statuses/user_timeline.json?screen_name=MikeRogers0&count=2') | |
*/ | |
// The tokens, keys and secrets from the app you created at https://dev.twitter.com/apps | |
$config = array( |
This file contains 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
@main-font-size: 16px; | |
.x-rem (@property, @value) { | |
// This is a workaround, inspired by https://github.com/borodean/less-properties | |
@px-fallback: @value * @main-font-size; | |
-: ~`(function () { return ';@{property}: @{px-fallback}'; }())`; | |
-: ~`(function () { return ';@{property}: @{value}rem'; }())`; | |
} |
This file contains 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://plugins.jquery.com/project/query-object | |
* jQuery.query - Query String Modification and Creation for jQuery | |
* Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com) | |
* Licensed under the WTFPL (http://sam.zoy.org/wtfpl/). | |
* Date: 2009/8/13 | |
* | |
* @author Blair Mitchelmore | |
* @version 2.1.7 | |
* |
This file contains 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
<head> | |
<style type="text/css"> | |
picture source { | |
src: image-set(url({filename}@2x.{ext} 2x high-bandwidth)); | |
} | |
@media screen and (min-width:321px){ | |
picture source { | |
src: image-set(url({filename}-m.{ext}), url({filename}-m@2x.{ext} 2x high-bandwidth)); | |
} | |
} |
This file contains 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
<picture alt="Alt tag describing the image represented"> | |
<!--<source src="photo-s.jpg"/>--> | |
<source src="photo-s.jpg"/> | |
<source src="[email protected]" media="-webkit-min-device-pixel-ratio:2, min-resolution:192dpi"/> | |
<!--<source src="photo-m.jpg" media="min-width:321px"/>--> | |
<source src="photo-m.jpg" media="min-width:321px"/> | |
<source src="[email protected]" media="min-width:321px and -webkit-min-device-pixel-ratio:2, min-resolution:192dpi"/> | |
<!--<source src="photo-l.jpg" media="min-width:641px"/>--> | |
<source src="photo-l.jpg" media="min-width:641px"/> | |
<source src="[email protected]" media="min-width:641px and -webkit-min-device-pixel-ratio:2, min-resolution:192dpi"/> |
This file contains 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
//run this script after jQuery loads, but before jQuery Mobile loads | |
//customize jQuery Mobile to let IE7+ in (Mobile IE) | |
$(document).bind("mobileinit", function(){ | |
$.extend( $.mobile , { | |
//extend gradeA qualifier to include IE7+ | |
gradeA: function(){ | |
//IE version check by James Padolsey, modified by jdalton - from http://gist.github.com/527683 | |
var ie = (function() { |
This file contains 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
sub, sup { | |
/* Specified in % so that the sup/sup is the | |
right size relative to the surrounding text */ | |
font-size: 75%; | |
/* Zero out the line-height so that it doesn't | |
interfere with the positioning that follows */ | |
line-height: 0; | |
/* Where the magic happens: makes all browsers position |