Skip to content

Instantly share code, notes, and snippets.

@remyd1
remyd1 / .gitlab-ci-servers.yml
Created December 2, 2021 09:14
gitlab-ci saltstack masters test+synchronization
---
sync:saltmaster1:
extends: synchronize
tags:
- saltmaster1
sync:saltmaster2:
extends: synchronize
tags:
- saltmaster2
#!/bin/bash
#set -x
password=`awk '{ if ( $1 == "password:" ) {print $2;} }' lemmy.hjson |tr -d '"'`
host=`awk '{ if ( $1 == "host:" ) {print $2;} }' lemmy.hjson |tr -d '"'`
username=`awk '{ if ( $1 == "user:" ) {print $2;} }' lemmy.hjson |tr -d '"'`
database=`awk '{ if ( $1 == "database:" ) {print $2;} }' lemmy.hjson`
port=`awk '{ if ( $1 == "port:" ) {print $2;} }' lemmy.hjson |head -1`
@remyd1
remyd1 / letsencrypt.sh
Last active February 15, 2022 10:41
Package agnostic let's encrypt certificate renew bash script
#! /bin/bash
# Bash script to manage the letsencrypt renewals or the initial request.
# To insert into a ~cron for renewals (with no args)
# 0. Check if this is already managed through docker
# 1. check the web service
# 2. check if the host is hosting a gitlab service
# 3. check if certbot is installed
# 4. otherwise check if certbot has been installed from source (if so, you need to modify DIRS_TO_CHECK bellow)
@remyd1
remyd1 / docker-compose.yml
Created February 17, 2020 13:46
lemmy docker-compose bug
version: '3.3'
services:
lemmy_db:
image: postgres:12-alpine
environment:
- POSTGRES_USER=lemmy
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=lemmy
volumes:
@remyd1
remyd1 / update-ncbidb-dl.bash
Created June 7, 2019 14:11
Basic file to download ncbi DB using aria2 tool and pigz
#!/bin/bash
####################################
# This script needs pigz and aria2 #
# to speedup download and extracts #
# otherwise, edit it to use wget #
# and a basic tar #
####################################
# 20190307 Rémy Dernat.
@remyd1
remyd1 / ssl-cert-info.sh
Last active May 6, 2019 12:19
Shell script to check SSL certificate info like expiration date and subject. Taken from http://giantdorks.org/alain/shell-script-to-check-ssl-certificate-info-like-expiration-date-and-subject/
#!/bin/bash
usage()
{
cat <<EOF
Usage: $(basename $0) [options]
This shell script is a simple wrapper around the openssl binary. It uses
s_client to get certificate information from remote hosts, or x509 for local
certificate files. It can parse out some of the openssl output or just dump all
137,142d136
<
< /* ADD REMY SQL MISSING REQUESTS */
< $benef = grr_sql_query1("SELECT beneficiaire FROM ".TABLE_PREFIX."_entry WHERE id='".$id."'");
< $starttime = grr_sql_query1("SELECT start_time FROM ".TABLE_PREFIX."_entry WHERE id='".$id."'");
< /* END ADD REMY */
<
153,168d146
<
< /* START ADD JIMMY */
@remyd1
remyd1 / nvidia_gpus.py
Created September 19, 2018 14:35
ganglia module for nvidia cards
#!/usr/bin/env python
'''
ganglia/gmond python module to use nvidia-smi to inject some GPU info into ganglia.
Reference:
https://github.com/ganglia/monitor-core/blob/master/gmond/modules/python/README.in
'''
import subprocess
if "check_output" not in dir( subprocess ):
FROM fedora:27
RUN dnf -y update && dnf install -y skopeo
DKMS make.log for zfs-0.6.5.9 for kernel 3.10.0-693.5.2.el7.x86_64 (x86_64)
mer. nov. 22 16:07:52 CET 2017
make all-recursive
make[1] : on entre dans le répertoire « /var/lib/dkms/zfs/0.6.5.9/build »
Making all in include
make[2] : on entre dans le répertoire « /var/lib/dkms/zfs/0.6.5.9/build/include »
Making all in linux
make[3] : on entre dans le répertoire « /var/lib/dkms/zfs/0.6.5.9/build/include/linux »
make[3]: Rien à faire pour « all ».
make[3] : on quitte le répertoire « /var/lib/dkms/zfs/0.6.5.9/build/include/linux »