Skip to content

Instantly share code, notes, and snippets.

View JacerOmri's full-sized avatar

Jacer OMRI JacerOmri

View GitHub Profile
@JacerOmri
JacerOmri / Dockerfile
Created February 20, 2020 22:50
Adonis simple API dockerfile
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
@JacerOmri
JacerOmri / transcript
Created March 4, 2018 16:25
Build your carrer git node docker session
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
#!/bin/bash
#
# Author: Jacer Omri
# Description:
# text to speech engine using google
## a function to encode urls
rawurlencode() {
local string="${1}"
local strlen=${#string}
@JacerOmri
JacerOmri / GoogleTranslate.class.php
Last active December 19, 2015 23:58
a wrapper class to use google translate
<?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") {
@JacerOmri
JacerOmri / app.js
Last active December 19, 2015 22:48
This is a simple API created using Node.js, restify and mongoose with MongoDB.
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");
#!/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"
@JacerOmri
JacerOmri / curlaxeltest.php
Created March 12, 2012 19:06
CurlAxel test
<!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);