Table of Contents generated with DocToc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
/** | |
* data - array of record | |
* hidecolumns, array of fields to hide | |
* usage : $("selector").generateTable(json, ['field1', 'field5']); | |
*/ | |
'use strict'; | |
$.fn.generateTable = function (data, hidecolumns) { | |
if ($.isArray(data) === false) { | |
console.log('Invalid Data'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo apt-key fingerprint 0EBFCD88 | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo apt-get update | |
sudo apt-get install docker-ce | |
sudo curl -o /usr/local/bin/docker-compose -L "https://github.com/docker/compose/releases/download/1.15.0/docker-compose-$(uname -s)-$(uname -m)" | |
sudo chmod +x /usr/local/bin/docker-compose | |
sudo service docker restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo docker rm -f $(sudo docker ps -a -q) | |
sudo docker rmi -f $(sudo docker images -a -q) | |
sudo docker volume rm $(sudo docker volume ls -f dangling=true -q) | |
sudo docker network rm -f $(sudo docker network ls | awk '$3 == "bridge" && $2 != "bridge" { print $1 }') | |
sudo service docker stop | |
sudo apt-get update | |
sudo apt-get purge docker-ce -y | |
sudo rm /usr/local/bin/docker-compose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int i = 0; | |
int j = 0; | |
const int W = 6; // white, 2 white connected to same pin | |
const int R2 = 3; // red | |
const int R1 = 11; // red | |
const int G1 = 10; // green | |
const int G2 = 5; // green |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function prompt_for_multiselect { | |
# little helpers for terminal print control and key input | |
GREEN='\033[00;32m' | |
YELLOW='\033[00;33m' | |
RESTORE='\033[0m' | |
ESC=$( printf "\033") | |
cursor_blink_on() { printf "$ESC[?25h"; } |