Skip to content

Instantly share code, notes, and snippets.

View Nyalab's full-sized avatar
🤢
reviewing php code

Sébastien Balayn Nyalab

🤢
reviewing php code
View GitHub Profile
@ziadoz
ziadoz / awesome-php.md
Last active May 8, 2025 07:37
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@bloodyowl
bloodyowl / index.html
Created November 12, 2012 14:00
Todo List using Craft.js and localStorage
<!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">
@bloodyowl
bloodyowl / gist:4340751
Last active April 20, 2016 17:53
Smallest HTML5 shim ever

Smallest HTML5 shim ever

130 bytes, that's what it takes.

Script

"header footer section aside nav article figure figcaption hgroup time main".replace(/\w+/g,function(a){document.createElement(a)})
@bloodyowl
bloodyowl / gist:5320462
Last active December 15, 2015 20:41
v.js
/*
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
@bloodyowl
bloodyowl / gist:5412612
Last active December 16, 2015 09:19
Tweet sized word counter
/*
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")
@bloodyowl
bloodyowl / README.mkd
Created April 18, 2013 14:38
Float issues ?

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){
@paulrouget
paulrouget / ff.md
Last active May 14, 2024 02:30
Hacking Firefox
@bloodyowl
bloodyowl / gist:5d8adcf50e890ebafb95
Last active September 30, 2023 16:49
ES6 tl;dr; for beginners
// ES6 tl;dr; for beginners
// 1. variables
// `const` & `let` are scoped at the block level
if(true) {
let foo = "bar"
}
foo // ReferenceError