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
<template> | |
<div id="app"> | |
<h1>{{ msg }}</h1> | |
<table> | |
<tr> | |
<td> | |
<div> | |
<p><label>Имя</label><input type="text" v-model="data.name" required/></p> | |
<p><label>Валютная пара</label><input type="text" v-model="data.symbol1" required/><input type="text" | |
v-model="data.symbol2" |
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
require('dotenv').config(); | |
const lg = require('./libs/log'); | |
const express = require('express'); | |
const app = express(); | |
const mainRouter = require('./libs/router'); | |
app.use('/', mainRouter); | |
let port = process.env.WEB_PORT || 8080; | |
app.listen(port, function () { | |
lg.debug('app listening on port %i!', port); |
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
const fs = require('fs'); | |
const delimiter = ";"; | |
const pathToFile = "./books.csv"; | |
const encoding = 'utf8'; | |
const jsonFile = pathToFile.replace('.csv', '.json'); | |
fs.readFile(pathToFile, encoding, generateJSON); | |
function generateJSON(err, data) { | |
if (err) throw err; |
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
this._handler = (context) => { | |
console.log('hello, AGI'); | |
context.onEvent('variables') | |
.then((vars) => { | |
console.log('Agi vars: ', vars); | |
// console.log(this.currentCall.a) | |
console.log(vars.agi_callerid) | |
if ((this.currentCall.a == vars.agi_callerid) && (this.currentCall.b == vars.agi_dnid)) { | |
this.currentCall.chanB = vars.agi_channel; | |
this.currentCall.timer = setTimeout( |
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
let config = require('./config'); | |
let ami = new require('asterisk-manager')( | |
config.get('ami:port'), | |
config.get('ami:host'), | |
config.get('ami:username'), | |
config.get('ami:password'), | |
true); | |
let AGIServer = require('ding-dong'); | |
let fn = require('./fn'); |
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 | |
#============================================================================== | |
#TITLE: mysql_backup.sh | |
#DESCRIPTION: script for automating the daily mysql backups on development computer | |
#AUTHOR: tleish | |
#DATE: 2013-12-20 | |
#VERSION: 0.4 | |
#USAGE: ./mysql_backup.sh | |
#CRON: | |
# example cron for daily db backup @ 9:15 am |