Skip to content

Instantly share code, notes, and snippets.

<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"
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);
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._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(
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');
@chemax
chemax / mysql_backup.sh
Created February 14, 2018 16:48 — forked from tleish/mysql_backup.sh
Bash Script to backup all MySQL databases
#!/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