Skip to content

Instantly share code, notes, and snippets.

View EtienneM's full-sized avatar
🏠
Working from home

Étienne M. EtienneM

🏠
Working from home
View GitHub Profile
@cmvanb
cmvanb / catt-subtitles
Last active December 20, 2022 17:15
Automatically extract subtitles using `ffmpeg` to work with Cast All The Things. Original author: https://github.com/EtienneM
#!/bin/bash
# set -x
print_usage() {
echo "$0 [--map=0:3] video_file" >&2
echo "" >&2
echo "With video_file the path to a file like mkv which embeds the subtitles" >&2
echo "--map: use the specified embedded subtitle." >&2
echo "" >&2
@Soulou
Soulou / child-app-gitlab.rb
Last active July 26, 2019 01:04
Deploy a child app on Scalingo from a Gitlab private repository
#!/usr/bin/env ruby
require 'json'
require 'restclient'
auth_token = ENV["AUTH_TOKEN"]
api_url = ENV["SCALINGO_API_URL"] || "https://api.scalingo.com/v1"
auth_url = ENV["SCALINGO_AUTH_URL"] || "https://auth.scalingo.com/v1"
app = ENV["APP"]
@renchap
renchap / README.md
Last active October 12, 2022 17:14
One-line certificate generation/renews with Letsencrypt and nginx

Prerequisites : the letsencrypt CLI tool

This method allows your to generate and renew your Lets Encrypt certificates with 1 command. This is easily automatable to renew each 60 days, as advised.

You need nginx to answer on port 80 on all the domains you want a certificate for. Then you need to serve the challenge used by letsencrypt on /.well-known/acme-challenge. Then we invoke the letsencrypt command, telling the tool to write the challenge files in the directory we used as a root in the nginx configuration.

I redirect all HTTP requests on HTTPS, so my nginx config looks like :

server {