Skip to content

Instantly share code, notes, and snippets.

View dvddpl's full-sized avatar

Davide de Paolis dvddpl

View GitHub Profile
@dvddpl
dvddpl / package.json
Created March 27, 2019 12:43
Package.json and sls.yaml with setup for conventional commits linting tests and serverless deploy
{
"name": "my-project",
"private": true,
"version": "0.9.0",
"description": "what my project does",
"main": "index.js",
"scripts": {
"hunt.only": "dot-only-hunter tests",
"deploy:dev": "sls deploy -s dev -v",
"deploy:production": "sls deploy -v -s production",
@dvddpl
dvddpl / getlatestrelease.txt
Created November 20, 2017 07:54
Get Latest "official" release of a nmp package ( filters out prereleases or non-semver released version)
npm info NPM_PKG_MAME versions --json | grep -E "\d+.\d+.\d+\"" | tail -1 | sed -e 's/[ \"]//g'
<?php
unlink('/tmp/request.txt');
?>
<?php
$requests=file('/tmp/request.txt');
$lines = count($requests);
echo $lines;
?>
<?php
date_default_timezone_set ( "Europe/Berlin" );
$data = file_get_contents('php://input');
$timestamp = date('Y-m-d H:i:s');
$log = $timestamp . ' ' . $data;
file_put_contents("/tmp/request.txt", $log . "\n", FILE_APPEND);
echo $log