Install Requirements Packages
opkg update && opkg install ca-certificates zsh curl git-http
Install oh-my-zsh
FROM ubuntu | |
RUN apt-get update | |
RUN apt-get install -y curl | |
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - | |
RUN apt-get upgrade -y | |
RUN apt-get install -y nodejs | |
COPY package.json package.json | |
COPY package-lock.json package-lock.json |
function deepCopy(obj) { | |
var copy; | |
// Handle three simple types, null, and undefined | |
if (obj == null || typeof obj != "object") { | |
return obj; | |
} | |
// Handle Date |
/** | |
* Archive to test of ordination and median | |
* | |
* | |
* @author Felipe Oliveira <felipe@chatnizer.com> OR <felipe.wget@gmail.com> | |
* @version 0.1 | |
*/ | |
var objSamples = [ | |
{ |
// TimeElapsed constructs an object for use in determining | |
// time elapsed in milliseconds | |
// constructor: | |
function TimeElapsed(){ | |
var start, elapsed; | |
function getstamp(){ return (new Date().getTime());} | |
this.get = function(){ |
function getPath(obj, key) { | |
paths = [] | |
function getPaths(obj, path) { | |
if (obj instanceof Object && !(obj instanceof Array)) { | |
for (var k in obj){ | |
paths.push(path + "." + k) | |
getPaths(obj[k], path + "." + k) | |
} | |
} |
function fun(data, ...args) { | |
const res = JSON.stringify(data) | |
console.log(res) | |
const t = new Function('console.log("huhaoran")') | |
args.map(item => { | |
const tfun = new Function(`return ${res}.${item}`) | |
console.log(tfun()) | |
}) | |
} |
var overScrollable = false, scrollSpeed = 150; | |
function updateScroll(state){ | |
var overflow = state.e.parent().outerHeight() - state.e.prop('scrollHeight'); | |
if(state.deltaY < 0){ | |
state.scrollPos += scrollSpeed; | |
if(state.scrollPos > 0) state.scrollPos = 0; | |
state.e.css({"transform": "translateY(" + state.scrollPos + "px)"}); | |
} | |
else if(overflow < 0) { |