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 plugin for drawing a svg line as you scroll. | |
@author Johan Brook, for Lookback (2014). | |
Options: | |
startAt: The reference point to start calculating from. Expects a selector. | |
speed: at which speed the line should draw. | |
offset: the offset of which the reference point should be. |
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
//retrieve the image | |
$image = Input::file('image'); | |
// initialize imageworkshop layer | |
$layer = PHPImageWorkshop\ImageWorkshop::initFromPath($image['tmp_name']); | |
if (File::is('jpg', $image['tmp_name'])) | |
{ | |
$exif = exif_read_data($image['tmp_name']); |
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 | |
// See: http://blog.ircmaxell.com/2013/02/preventing-csrf-attacks.html | |
// Start a session (which should use cookies over HTTP only). | |
session_start(); | |
// Create a new CSRF token. | |
if (! isset($_SESSION['csrf_token'])) { | |
$_SESSION['csrf_token'] = base64_encode(openssl_random_pseudo_bytes(32)); | |
} |
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
/* if portrait mode is detected, rotate the entire site -90 degrees to hint rotating to landscape */ | |
@media (orientation: portrait) { | |
body { | |
-webkit-transform: rotate(-90deg); | |
-moz-transform: rotate(-90deg); | |
-o-transform: rotate(-90deg); | |
-ms-transform: rotate(-90deg); | |
transform: rotate(-90deg); | |
} | |
} |
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
/* | |
Make the Facebook Like box responsive (fluid width) | |
https://developers.facebook.com/docs/reference/plugins/like-box/ | |
*/ | |
/* This element holds injected scripts inside iframes that in some cases may stretch layouts. So, we're just hiding it. */ | |
#fb-root { | |
display: none; | |
} |