Skip to content

Instantly share code, notes, and snippets.

View dominicgan's full-sized avatar

Dominic Gan dominicgan

View GitHub Profile
@kevinSuttle
kevinSuttle / meta-tags.md
Last active May 30, 2025 13:08 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@juliocesar
juliocesar / best-localStorage-polyfill-evar.js
Created April 18, 2011 23:19
This is the best localStorage polyfill in the world
// I mean, seriously, localStorage is supported even by your mum. How about instead of
// casing the feature out, you give users in-memory (stale) storage instead?
// If they close your application, they deserve to lose data anyway.
// if (!('localStorage' in window)) {
if (!Modernizr.localstorage) {
window.localStorage = {
_data : {},
setItem : function(id, val) { return this._data[id] = String(val); },
getItem : function(id) { return this._data.hasOwnProperty(id) ? this._data[id] : undefined; },