Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View tungsheng's full-sized avatar

Tony Lee tungsheng

  • Cisco
  • San Jose
View GitHub Profile
@tungsheng
tungsheng / README-Template.md
Created July 14, 2018 08:47 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@tungsheng
tungsheng / storagePolyfill.js
Created July 14, 2017 08:06 — forked from jarrodirwin/storagePolyfill.js
LocalStorage/SessionStorage Polyfill with Safari Private Browsing support.
// Refer to https://gist.github.com/remy/350433
try {
// Test webstorage existence.
if (!window.localStorage || !window.sessionStorage) throw "exception";
// Test webstorage accessibility - Needed for Safari private browsing.
localStorage.setItem('storage_test', 1);
localStorage.removeItem('storage_test');
} catch(e) {
(function () {
var Storage = function (type) {
@tungsheng
tungsheng / 0_reuse_code.js
Last active August 29, 2015 14: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