Skip to content

Instantly share code, notes, and snippets.

Avatar

Tony Lee tungsheng

View GitHub Profile
@tungsheng
tungsheng / README-Template.md
Created Jul 14, 2018 — forked from PurpleBooth/README-Template.md
A template to make good README.md
View README-Template.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

View Pantone Fashion Colors - Spring 2016.markdown

Pantone Fashion Colors - Spring 2016

Table with colors (CMYK and HEX) of the Pantone Fashion Color Report Spring 2016.

A Pen by Bram de Haan on CodePen.

License.

@tungsheng
tungsheng / storagePolyfill.js
Created Jul 14, 2017 — forked from jarrodirwin/storagePolyfill.js
LocalStorage/SessionStorage Polyfill with Safari Private Browsing support.
View storagePolyfill.js
// 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) {
View html5.haml
!!! 5
%html
%head
%title Crazy Website
%meta{ :charset => "UTF-8" }
%meta{ "HTTP-equiv" => "Expires", :content => "0" }
%meta{ "HTTP-equiv" => "kiben", :content => "no-cache" }
%link{ :href => "css/reset.css", :rel => "stylesheet", :type => "text/css" }
%link{ :href => "css/style.css", :rel => "stylesheet", :type => "text/css" }
%body
View showColor.sh
for i in {0..255} ; do
printf "\x1b[38;5;${i}mcolour${i}\n"
done
@tungsheng
tungsheng / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.