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 | |
require_once('tok3n.php'); | |
$response = tok3n_verify ("your_private_key", | |
$user_key, | |
$_POST["tok3n_otp_field"]); | |
if ($response -> is_valid) { | |
// Successful verification | |
} else { | |
// Failed verification |
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
curl https://my.tok3n.com/api/v1/otpValid | |
-d "ApiKey=HcI561xLCo4666st0871VP" | |
-d "UserKey=Ngfl6Gn2q15g8mR28vi2no" | |
-d "otp=123456" |
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 nestCollection(model, attributeName, nestedCollection) { | |
//setup nested references | |
for (var i = 0; i < nestedCollection.length; i++) { | |
model.attributes[attributeName][i] = nestedCollection.at(i).attributes; | |
} | |
//create empty arrays if none | |
nestedCollection.bind('add', function (initiative) { | |
if (!model.get(attributeName)) { | |
model.attributes[attributeName] = []; |
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
getTextMeasure = ( $elements ) -> | |
$elements.each -> | |
numLines = $( this ).height() / $( this ).css("line-height").replace( "px", "" ) | |
textLength = $( this ).text().length | |
$( this ).data("text-measure", textLength / numLines ) | |
$textMeasure = $( ".text-measure" ) | |
$( document ).ready -> | |
getTextMeasure( $textMeasure ) |
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
/* | |
aardvark.legs by Anatoli Papirovski - http://fecklessmind.com/ | |
Licensed under the MIT license. http://www.opensource.org/licenses/mit-license.php | |
URL: http://aardvark.fecklessmind.com/aal.css.txt | |
*/ | |
/* | |
Reset first. Modified version of Eric Meyer and Paul Chaplin reset | |
from http://meyerweb.com/eric/tools/css/reset/ | |
*/ |
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
<head> | |
<!-- a bunch of stuff in the head --> | |
</head> | |
<body> | |
<h1>Blog</h1> | |
<article class="blog-post"> | |
<h2>Blog Post</h2> | |
<p> |
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
// jQuery fix for Webkit SVG height bug. | |
// Documented here: https://bugs.webkit.org/show_bug.cgi?id=82489 & http://www.brichards.co.uk/blog/webkit-svg-height-bug-workaround | |
// Found via: http://stackoverflow.com/questions/7570917/svg-height-incorrectly-calculated-in-webkit-browsers | |
// Original Gist: https://gist.github.com/pfulton/4259378 | |
// Call the fix function on resize and/or ready | |
svgElements = $('svg') | |
function fixWebkitHeightBug(){ | |
svgElements.each(function() { | |
$(this).parent().height(this.prop('viewBox').baseVal / this.prop('viewBox').baseVal * $(this).parent().width() ) |
NewerOlder