Skip to content

Instantly share code, notes, and snippets.

View sambello247's full-sized avatar
🎯
Focusing

Sam Bello sambello247

🎯
Focusing
View GitHub Profile
@sambello247
sambello247 / Props
Created August 31, 2020 09:53 — forked from mynameispj/Props
Estimated reading time in PHP, by Brian Cray
Total props to Brian Cray: http://briancray.com/posts/estimated-reading-time-web-design/
@sambello247
sambello247 / gist:64730ff0ea870e03a03a446e0a0f53e1
Created January 28, 2019 13:48 — forked from molovo/gist:5514490
A simple AJAX download counter. Count is stored in a json file, and updated via PHP.
// 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();
@sambello247
sambello247 / 0_reuse_code.js
Created February 1, 2017 22:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console