with PM2 & Nginx
as a root, run below commands on server:
# adduser tomy
<template> | |
<ul> | |
<li v-for="item in levelItems"> | |
{{ item.title }} | |
<tree :items="items" | |
:left="item.left" | |
:right="item.right"> | |
</tree> | |
</li> | |
</ul> |
/* | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, routes = require('./routes') | |
, user = require('./routes/user') | |
, common = require('./routes/common') | |
, fs = require('fs') | |
, http = require('http') | |
, util = require('util') |
by alexander white ©
var uniqueArray = function(arrArg) { | |
return arrArg.filter(function(elem, pos,arr) { | |
return arr.indexOf(elem) == pos; | |
}); | |
}; | |
var uniqEs6 = (arrArg) => { | |
return arrArg.filter((elem, pos, arr) => { | |
return arr.indexOf(elem) == pos; | |
}); |
Handy helpers for controlling visibility of elements until Vue has compiled.
Use like:
<div v-cloak>
<h1>
<span class="v-cloak--inline">Loading...</span> <!-- Only displayed before compiling -->
<span class="v-cloak--hidden">{{ post.title }}</span> <!-- Hidden until compiling is finished -->
This is a quick script which creates a table consisting of State Names and their corresponding Abbreviations. I use this table when doing basic data quality checking and also standardizing state designations.
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
# 1. Install brew --> http://brew.sh/ | |
# 2. run the following commands in your Terminal | |
brew tap homebrew/dupes | |
brew tap homebrew/versions | |
brew tap homebrew/homebrew-php | |
brew install --with-openssl curl | |
brew install --with-homebrew-curl --with-apache php71 | |
brew install php71-mcrypt php71-imagick | |
# 3. Follow these instructions to make Apache and php-cli use the newer php executable and make the change persist after reboot. | |
brew info php71 |
function encrypt(text){ | |
var cipher = crypto.createCipher('aes-256-cbc','d6F3Efeq') | |
var crypted = cipher.update(text,'utf8','hex') | |
crypted += cipher.final('hex'); | |
return crypted; | |
} | |
function decrypt(text){ | |
var decipher = crypto.createDecipher('aes-256-cbc','d6F3Efeq') | |
var dec = decipher.update(text,'hex','utf8') |