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
version: '3' | |
services: | |
portainer-ce: | |
image: portainer/portainer-ce | |
ports: | |
- "9443:9443" | |
volumes: | |
- /run/podman/podman.sock:/var/run/docker.sock:Z | |
privileged: true |
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 { get, map, replace } = require('lodash'); | |
const { readFile, writeFile, utils } = require('xlsx'); | |
const { format } = require('date-fns'); | |
const workBook = readFile('./nadiajka_koha_excel.xlsx'); | |
const sheetName = workBook.SheetNames[1]; | |
const sheetData = utils.sheet_to_json(workBook.Sheets[sheetName], { | |
blankrows: true, | |
defval: undefined | |
}); |
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
git tag -d [tag]; | |
git push origin :[tag] |
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 exec = require('child_process').exec, | |
url = "http://google.com/", | |
timeout = "3", | |
data="?q=test"; | |
var time = process.hrtime(); | |
exec('curl --max-time ' + timeout + ' -d \'' + data + '\' ' + url, function (error, stdout, stderr) { | |
var diff = process.hrtime(time); | |
//console.log('stdout: ' + stdout); | |
//console.log('stderr: ' + stderr); |
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
/* main class */ | |
var Adder = function(a, b){ | |
this.a = a || 1; | |
this.b = b || 2; | |
}; | |
Adder.prototype.add = function() { | |
return this.a + this.b; | |
}; |
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 pool = { | |
query: function(sql, callback) { | |
process.nextTick(function() { | |
var result = [ | |
{0:12345, 1:'EUR/USD', 2:1.2234, 3:1.2221, 4:1.2240, length: 5}, | |
{0:12345, 1:'EUR/USD', 2:1.2234, 3:1.2221, 4:1.2240, length: 5 }, | |
{0:12345, 1:'EUR/USD', 2:1.2234, 3:1.2221, 4:1.2240, length: 5}] | |
callback(null, result); | |
}); | |
} |
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
function parseRequestForMultipartFiles(req, arg, callback){ | |
var form = new formidable.IncomingForm(); | |
fs.mkdir(GLOBAL.basePthToSave + arg, function(e) { | |
form.uploadDir = GLOBAL.basePthToSave + arg; | |
form.parse(req, function(err, fields, files){ | |
callback(files); |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset=utf-8> | |
<title>title</title> | |
<link rel="stylesheet" href="normalize.css"> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
<div> |
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
/* | |
YUI 3.4.0 (build 3928) | |
Copyright 2011 Yahoo! Inc. All rights reserved. | |
Licensed under the BSD License. | |
http://yuilibrary.com/license/ | |
*/ | |
html{color:#000;background:#FFF}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal}li{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}q:before,q:after{content:''}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:text-top}sub{vertical-align:text-bottom}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit}input,textarea,select{*font-size:100%}legend{color:#000} |
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 Controller = function(req, res) { | |
var DB = require("./db").DB; | |
this._db = new DB(); | |
this._req = req; | |
this._res = res; | |
console.log(new Date() + ' : ' + req.url); | |
}; | |
Controller.HTTP_OK_CODE = 200; |
NewerOlder