Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Todo List</title> | |
| <link rel="stylesheet" href="style.css"> | |
| </head> | |
| <body> | |
| <h1>Todo List</h1> | |
| <input type="text" value="" id="add" placeholder="Add a new item and hit enter" name="add"> |
| /* | |
| v.js | |
| Is the version that I use ahead from the one I expected ? | |
| 123 bytes | |
| ## Usage | |
| v(actual, expected) | |
| e.g. | |
| v("1.2.3", "1.7.3") // false |
| /* | |
| paste it in your console | |
| */ | |
| (function(t,a,b){return(b=document.body),(a=(b.innerText||b.textContent).match(/\S+/g))&&t.replace("%",a.length)})("% words on this page") |
If you have issues with JavaScript floats :
.1 + .2
// 0.30000000000000004
.3 - .1
// 0.19999999999999998
.1 * .1
// 0.010000000000000002| function Animal(name, age){ | |
| var animal = this | |
| // animal is the object | |
| animal.name = name | |
| animal.age = age | |
| return animal | |
| } | |
| Animal.prototype.addYears = addYears | |
| function addYears(years){ |
More details here: https://developer.mozilla.org/en/docs/Simple_Firefox_build
Get Firefox' source code:
git clone https://github.com/mozilla/gecko-dev.git
git checkout fx-team
Install dependencies:
| // ES6 tl;dr; for beginners | |
| // 1. variables | |
| // `const` & `let` are scoped at the block level | |
| if(true) { | |
| let foo = "bar" | |
| } | |
| foo // ReferenceError | |