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 | |
===============================================================================// | |
$to = "devsam247@gmail.com"; | |
//===============================================================================// | |
$firstname = $_POST['firstname']; |
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
var time1= "03:01"; | |
var time2= "01:19"; | |
function strToMins(t) { | |
var s = t.split(":"); | |
return Number(s[0]) * 60 + Number(s[1]); | |
} | |
function minsToStr(t) { | |
return Math.trunc(t / 60)+':'+('00' + t % 60).slice(-2); |
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
Total props to Brian Cray: http://briancray.com/posts/estimated-reading-time-web-design/ |
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 to update counter when button is clicked | |
$('#download').click(function(event) { | |
event.preventDefault(); | |
var redirectUrl = $(this).attr('href'); | |
$.ajax({ | |
url: "downloads.php", | |
success: function(response) { | |
if (response = 'success') { | |
// The counter file has been updated in the background, but we should update the results on screen to tell the user | |
var count = $('#count').html(); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |