View 5 minute local Kubernetes Cluster on Mac
# Reference:
# install homebrew and cask
ruby -e "$(curl -fsSL"
# install virtualbox
brew cask install virtualbox
# install dockertoolbox
View GistList!.md

##alt text GistList: TODO for coders alt text

View unixtime.js
// return the date as a unix time timestamp.
Date.prototype.getUnixTime = function() { return this.getTime()/1000|0 };
if(! = function() { return new Date(); }
Date.time = function() { return; }
var currentUnixTime = Date.time();
currentUnixTime =; // same as above
// Parse a date and get it as Unix time
View popular.css
View index.html
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Service status">
<meta name="robots" content="index, follow">
<link href="" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
# remove exited containers:
docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v
# remove unused images:
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi
# remove unused volumes:
find '/var/lib/docker/volumes/' -mindepth 1 -maxdepth 1 -type d | grep -vFf <(
View demo.php
// in this sample, we are using the originating IP, but you can modify to use API keys, or tokens or what-have-you.
$rateLimiter = new RateLimiter($_SERVER["REMOTE_ADDR"]);
$limit = 100; // number of connections to limit user to per $minutes
$minutes = 1; // number of $minutes to check for.
View time
function toUserTimeZone(utc_date, offset){
if (utc_date.slice(-3) !== "UTC") {
utc_date += " UTC";
var local_date = new Date(utc_date);
var local_offset = local_date.getTimezoneOffset() * 60000;
var utc_time = local_date.getTime() + local_offset;
return new Date(utc_time + (3600000 * offset));
View todo.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>React Tutorial</title>
<link rel="stylesheet" href="css/base.css" />
<script src=""></script>
<script src=""></script>
<script src=""></script>
<script src=""></script>
View queue.js
/* Creates a new queue. A queue is a first-in-first-out (FIFO) data structure -
* items are added to the end of the queue and removed from the front.
function Queue(){
// initialise the queue and offset
var queue = [];
var offset = 0;
// Returns the length of the queue.