Skip to content

Instantly share code, notes, and snippets.

View simonecorsi's full-sized avatar
🦄
Magic unicorn between machine and people

Simone Corsi simonecorsi

🦄
Magic unicorn between machine and people
View GitHub Profile
@simonecorsi
simonecorsi / blueGreenDeployment.js
Created November 10, 2020 11:31 — forked from brandonros/blueGreenDeployment.js
node.js + nginx + PM2 rolling release/blue green deployments (zero downtime)
const Promise = require('bluebird');
const fs = require('fs');
const execa = require('execa');
class BlueGreenDeployment {
constructor({appName, blueProxyPassPattern, greenProxyPassPattern, nginxConfigFile}) {
this.appName = appName;
this.blueProxyPassPattern = blueProxyPassPattern;
this.greenProxyPassPattern = greenProxyPassPattern;
this.nginxConfigFile = nginxConfigFile;
@simonecorsi
simonecorsi / sync-projects
Created July 30, 2018 09:42 — forked from nathanbrauer/sync-projects
Gitlab: Clone / Pull all projects in a group
#!/usr/bin/env bash
# Documentation
# https://docs.gitlab.com/ce/api/projects.html#list-projects
if [[ `whoami` == "root" ]]; then
echo "DO NOT run this program as root! Quitting."
exit 1
fi
@simonecorsi
simonecorsi / ffmpeg-compress-mp4
Created July 20, 2018 14:09 — forked from lukehedger/ffmpeg-compress-mp4
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@simonecorsi
simonecorsi / Caddyfile
Created June 27, 2018 12:30 — forked from electerious/Caddyfile
Most complete list of mime types in the correct format for the Caddy mime directive
mime {
.atom application/atom+xml
.json application/json
.map application/json
.topojson application/json
.jsonld application/ld+json
.rss application/rss+xml
.geojson application/vnd.geo+json
.rdf application/xml
.xml application/xml
{
"ab":{
"name":"Abkhaz",
"nativeName":"аҧсуа"
},
"aa":{
"name":"Afar",
"nativeName":"Afaraf"
},
"af":{