Skip to content

Instantly share code, notes, and snippets.

@Clement-TS
Clement-TS / autossh.init.sh
Created August 1, 2016 18:13
Autossh init script (Ubuntu) for ssh tunneling
#! /bin/sh
# author: Clément Désiles
# date: 01/08/2016
# source: https://gist.github.com/suma/8134207
# source: http://stackoverflow.com/questions/34094792/autossh-pid-is-not-equal-to-the-one-in-pidfile-when-using-start-stop-daemon
### BEGIN INIT INFO
# Provides: autossh
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
---
- name: Prepare
hosts: all
gather_facts: false
tasks:
- name: Install python3
apt:
name: "{{ packages }}"
vars:
packages:
# http://editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
@Clement-TS
Clement-TS / check-missing-images.sh
Last active January 31, 2019 14:59
Check docker images availability of a docker-compose file
#!/bin/bash
# author: Clément Désiles aka Jokester
# date: 2019-09-30
#
# requires: lstags, jq and yq
# install hints:
# $ sudo apt install -qqy jq && pip install yq
# $ wget -O /tmp/lstags.tar.gz https://github.com/ivanilves/lstags/releases/download/v1.1.2/lstags-linux-v1.1.2.tar.gz
# $ tar -xvf /tmp/lstags.tar.gz && rm -f /tmp/lstags.tar.gz
# $ mv lstags $HOME/.local/bin
#!/bin/bash
# author: Clément Désiles aka Jokester
# date: 2019-09-30
#
# requires: lstags, jq and yq
# install hints:
# $ sudo apt install -qqy jq && pip install yq
# $ wget -O /tmp/lstags.tar.gz https://github.com/ivanilves/lstags/releases/download/v1.1.2/lstags-linux-v1.1.2.tar.gz
# $ tar -xvf /tmp/lstags.tar.gz && rm -f /tmp/lstags.tar.gz
# $ mv lstags $HOME/.local/bin

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@Clement-TS
Clement-TS / mongo.yml
Created August 16, 2016 15:40
Mongodb docker-compose
version: '2'
services:
mongo:
image: mongo
container_name: mongo
networks:
telecomsante.loc:
aliases:
- mongo.telecomsante.loc
networks:
@Clement-TS
Clement-TS / proxy.yml
Created August 16, 2016 15:27
Proxy docker-compose
version: '2'
services:
proxy:
image: nginx:stable
container_name: proxy
ports:
- 80:80
- 443:443
restart: always
@Clement-TS
Clement-TS / .jshintignore
Created August 4, 2016 09:52
Files to ignore while performing jshint
www/bower_components/
www
node_modules/
test/
coverage/
@Clement-TS
Clement-TS / .jshintrc
Created August 4, 2016 09:51
A jshint configuration file
{
"strict": true,
"node": true,
"browser": true,
"mocha":true,
"laxbreak": true,
"laxcomma": true,
"lastsemic": true,
"nomen": true,
"white": true,