This file contains hidden or 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
var self = this; | |
self.db.begin(); | |
self.db.commit(); | |
return 'transaction'; |
This file contains hidden or 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
*filter | |
:ufw-user-input - [0:0] | |
:ufw-user-output - [0:0] | |
:ufw-user-forward - [0:0] | |
:ufw-before-logging-input - [0:0] | |
:ufw-before-logging-output - [0:0] | |
:ufw-before-logging-forward - [0:0] | |
:ufw-user-logging-input - [0:0] | |
:ufw-user-logging-output - [0:0] | |
:ufw-user-logging-forward - [0:0] |
This file contains hidden or 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
/** parameters | |
//inDate example: Wed, 04 May 2016 19:25:26 GMT | |
//inMonth example: 4 (which would month number of May if during May you new Date().getMonth()) | |
**/ | |
var strTime, utcDate; | |
utcDate = inDate.split(' '); | |
arrTime = utcDate[4].split(':'); |
This file contains hidden or 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
# prerequisites | |
# java 8 | |
# get the package | |
wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-2.3.2.deb | |
# unpack | |
sudo dpkg -i elasticsearch-2.3.2.deb |
This file contains hidden or 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
# instructions from https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04 | |
# Add the GPG key for the official Docker repository to the system | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
# Add the Docker repository to APT sources: | |
sudo apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main' | |
# Update the package database with the Docker packages from the newly added repo: | |
sudo apt-get update |
This file contains hidden or 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
# source https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-16-04 | |
# as of 23/4/2017 | |
#part 1 | |
# add build deps | |
sudo apt-get update | |
sudo apt-get -y install build-essential libssl-dev | |
# grab v0.33.1 (most recent) |
This file contains hidden or 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
# source https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-16-04 | |
sudo apt-get update | |
sudo apt-get install nginx | |
# options 'Nginx HTTP', 'Nginx HTTPS', 'Nginx Full' | |
sudo ufw allow 'Nginx HTTP' |
This file contains hidden or 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
var | |
WAIT_TIMER = 1750, // in MS | |
waitForItTimer, | |
waitForIt, whatYoureWaitingToInvoke; | |
whatYoureWaitingToInvoke = function _whatYoureWaitingToInvoke() { | |
alert(`what you're waiting for!!`); | |
}; | |
waitForIt = function _waitForIt() { |
This file contains hidden or 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
const _ = require( 'lodash' ), | |
async = require( 'async' ), | |
fs = require('fs') | |
; | |
var actions, base, result, states, subActions, template, toObject, types; | |
result = {}; | |
template = `module.exports = ${JSON.stringify(_.omit(result, 'any'), '', 4)}`; | |
base = [ '*' ]; |
This file contains hidden or 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
<script type="text/template" id="tmpl-cell"> | |
<div class="input mb-2"> | |
<input data-bind="value: character, attr: {id: 'clip-'+name(), 'data-clipboard-target':'#clip-'+name(), title: name()}" type="text" class="form-control box1" placeholder="" aria-label="" aria-describedby="basic-addon1"> | |
</div> | |
</script> | |
<script type="text/template" id="tmpl-snippet"> | |
<div> |