Skip to content

Instantly share code, notes, and snippets.

View andrearufo's full-sized avatar
🖖
Live long and prosper

Andrea Rufo andrearufo

🖖
Live long and prosper
View GitHub Profile
@andrearufo
andrearufo / wordpress-time-to-read.php
Last active January 21, 2021 23:54
A simple function to calculate the estimate reading time of a Wordpress post (article or page or custom post). Easy to use inside the loop code.
<?php
/**
* Return the string with infos
* about the reading time of the post
*
* @return String computed reading time
*
* @author Andrea Rufo <www.andrearufo.it>
* @version 20210122
@andrearufo
andrearufo / index.html
Last active September 6, 2020 10:47
Make input password to text
<a href="javascript: (function () { var jsCode = document.createElement('script'); jsCode.setAttribute('src', 'showpassword.js'); document.body.appendChild(jsCode); }());">
Show hidden password
</a>
@andrearufo
andrearufo / Timer.js
Created September 5, 2022 11:49
Javascript Timer Class
export class Timer {
constructor() {
this.offset = 4692;
this.seconds = 0;
this.interval = null;
this.running = false;
this.history = []
}