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
curl -F 'client_id=[clientID]' -F 'client_secret=[clientSecret]' -F 'grant_type=authorization_code' -F 'redirect_uri=[redirectURI]' -F 'code=[code]' https://api.instagram.com/oauth/access_token |
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
https://api.instagram.com/oauth/authorize/?client_id=[clientID]&redirect_uri=[redirectURI]&response_type=code |
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
// base styles for the content container div | |
.content { | |
width: 100%; | |
margin: 0; | |
padding: 0 1.25em 1.25em 1.25em; | |
background-color: #fff; | |
float: left; | |
} | |
// break at 31.25em, builds on the base |
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
/********************************************************** | |
* jQuery-less version of Chris Coyier's | |
* Value Bubbles for Range Inputs | |
* http://css-tricks.com/value-bubbles-for-range-inputs/ | |
**********************************************************/ | |
function modifyOffset() { | |
var el, newPoint, newPlace, offset, siblings, k; | |
width = this.offsetWidth; | |
newPoint = (this.value - this.getAttribute("min")) / (this.getAttribute("max") - this.getAttribute("min")); |
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 | |
// require the ua-parser-php library | |
require_once("/path/to/UAParser.php"); | |
// parse the requesting user agent | |
$result = UA::parse(); | |
// redirect phones, to redirect tablets use isMobileDevice | |
if ($result->isMobile) { |
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
// any of the following can be used as the basis for your cron job. | |
// you shouldn't have to grab the regexes.yaml file more than once a day. | |
// the following examples will run at midnight each day | |
// update your regexes.yaml file with the following | |
0 0 * * * php /path/to/UAParser.php -get | |
// use the -silent flag to turn off status updates when grabbing latest regexes.yaml | |
0 0 * * * php /path/to/UAParser.php -get -silent |
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 | |
require("UAParser.php"); | |
$result = UA::parse(); | |
print $result->full; | |
// -> Chrome 16.0.912/Mac OS X 10.6.8 | |
print $result->browserFull; | |
// -> "Chrome 16.0.912" |
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 | |
require("UAParser.php"); | |
$result = UA::get(); | |
?> |
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 | |
require("UAParser.php"); | |
$result = UA::parse(); | |
print $result->full; | |
// -> Chrome 16.0.912/Mac OS X 10.6.8 | |
print $result->browserFull; | |
// -> "Chrome 16.0.912" |
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
// this code WON'T be run again with resize or orientationchange | |
// to start the snowflakes | |
var oncomplete = function() { snowflakes = new Snowflakes('container','snowflakesContainer'); snowflakes.create(40); }; | |
// set-up breakpoints | |
Modernizr.load([ | |
{ test: Modernizr.mq('only screen and (min-width: 320px)'), yep: 'css/320.css' }, | |
{ test: Modernizr.mq('only screen and (min-width: 600px)'), yep: 'css/600.css' }, | |
{ test: Modernizr.mq('only screen and (min-width: 600px)') && Modernizr.indexeddb, yep: 'css/600.indexeddb.css' }, |