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
FROM node:9-alpine | |
RUN apk update && apk add --no-cache bash git tzdata | |
ENV NODE_ENV="production" | |
COPY package.json ./ | |
RUN npm cache clean -f | |
RUN npm install |
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
Prequeties: | |
- Nodejs | |
- Git | |
- Docker | |
Windows: https://store.docker.com/editions/community/docker-ce-desktop-windows | |
Ubuntu: | |
curl -fsSL get.docker.com -o get-docker.sh | |
sh get-docker.sh |
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 | |
# | |
# Author: Jacer Omri | |
# Description: | |
# text to speech engine using google | |
## a function to encode urls | |
rawurlencode() { | |
local string="${1}" | |
local strlen=${#string} |
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
<?php | |
class GoogleTranslate { | |
public $lastResult = ""; | |
private $langFrom; | |
private $langTo; | |
private static $urlFormat = "http://translate.google.com/translate_a/t?client=t&text=%s&hl=en&sl=%s&tl=%s&ie=UTF-8&oe=UTF-8&multires=1&otf=1&pc=1&trs=1&ssel=3&tsel=6&sc=1"; | |
public function __construct($from = "en", $to = "ka") { |
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
var restify = require('restify'), | |
mongoose = require('mongoose'); | |
var server = restify.createServer({ | |
name: 'mongo-api' | |
}) | |
server.listen(7000, function () { | |
console.log('%s listening at %s', server.name, server.url) | |
}) | |
db = mongoose.connect("mongodb://localhost/example-api"); |
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 | |
# | |
# Author: Mike Herwig | |
# Enhanced: Jacer Omri | |
# Description: | |
# Simple voice control demonstration using google's speech-api | |
if [ -z "$1" ] | |
then | |
echo "No language supplied, using en\n" |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<script src="js/jquery.js"></script> | |
<script src="js/jquery.progressbar.min.js"></script> | |
</head> | |
<body> | |
<?php | |
ini_set('error_reporting', E_ALL); | |
ini_set('display_errors', 1); |