Skip to content

Instantly share code, notes, and snippets.

View eiannone's full-sized avatar

Emanuele Iannone eiannone

  • Italy
View GitHub Profile
@eiannone
eiannone / deltree.php
Created April 24, 2017 22:37
deltree e scansione file
function delTree($dir) {
$files = array_diff(scandir($dir), array('.','..'));
foreach ($files as $file) {
(is_dir("$dir/$file")) ? delTree("$dir/$file") : unlink("$dir/$file");
}
return rmdir($dir);
}
@eiannone
eiannone / tesla-token.mjs
Created December 29, 2020 22:30
Generatore di token per API Tesla
import {request} from 'https';
function errore(msg) {
console.log(msg)
process.exit(-1);
}
if (process.argv.length < 4) {
errore("Richiamare lo script passando username e password tesla separati da spazio");
}
@eiannone
eiannone / tesla-vehicle-id.mjs
Last active December 30, 2020 18:05
Script per ottenere il vehicle id di un'auto Tesla
import {request} from 'https';
function errore(msg) {
console.log(msg)
process.exit(-1);
}
if (process.argv.length < 3) {
errore("Richiamare lo script passando il token di accesso per le API Tesla");
}
@eiannone
eiannone / Dockerfile
Created March 28, 2021 19:11
Sylius su AWS
# the different stages of this Dockerfile are meant to be built into separate images
# https://docs.docker.com/compose/compose-file/#target
ARG PHP_VERSION=7.3
ARG NODE_VERSION=10
ARG NGINX_VERSION=1.16
FROM php:${PHP_VERSION}-fpm-alpine AS sylius_php
# persistent / runtime deps