Skip to content

Instantly share code, notes, and snippets.

@thieryl
thieryl / cloudSettings
Last active July 24, 2018 12:56
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-07-24T12:56:07.324Z","extensionVersion":"v3.0.0"}
@thieryl
thieryl / block.conf
Last active July 18, 2018 17:58
Nginx Block config for unwanted user agent and contries and maintenance
## Block by user agent
if ($http_user_agent ~ (Purebot|Lipperhey|MaMa CaSpEr|libwww-perl|Mail.Ru|gold crawler)) {
return 403;
}
## Block by referrer keywords
if ($http_referer ~* (viagra|cialis|levitra) ) {
return 403;
}
@thieryl
thieryl / script.sh
Created July 19, 2018 08:39
[Bash Shell Script Template] # Simple bash script template
#!/bin/bash
######################################################################
# Author: Thiery Louison
# Email: [email protected]
# Date: yyyy-mm-dd
# Usage: script.sh [-a|--alpha] [-b=val|--beta=val]
# Description:
######################################################################
# Defaults #
@thieryl
thieryl / compile_nginx.sh
Last active July 20, 2018 10:56
[Nginx Compilation] Compile nginx fon Ubuntu and Debian #lessonlearn
# Install dependencies
#
# * checkinstall: package the .deb
# * libpcre3, libpcre3-dev: required for HTTP rewrite module
# * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module
apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \
mkdir -p ~/sources/ && \
# Compile against OpenSSL to enable NPN
@thieryl
thieryl / rsync_backup.py
Created July 19, 2018 11:50
[rsync] rsync wrapper scripts #linux
#!/usr/bin/python
import sys, os, subprocess
##
##RSYNC-BACKUP V1
#the script can be executed and by defualt the variables specified in the script will used, otherwise arguments may be passed to the script at runtime. This script can be used to sync remote files to a local directory or local files to a remote direcory specified at runtime.
##
##
#argument examples:
#":~$ rsync-backup.py -raz user@host:/some/dir/ /some/dir"
@thieryl
thieryl / 001_ansible _deep_dive.md
Last active July 27, 2018 11:43
[Yesterday I learned...] Continous learning #general

Diving deeper into Ansible


Sharing ideas about how to resolve issues is one of the best things we can do in the IT and open source world, so I went looking for help by submitting issues in Ansible and asking questions in roles others created.

Reading the documentation (including the following topics) is the best way to get started learning Ansible.

Getting started

Best practices

@thieryl
thieryl / redis.md
Created July 20, 2018 11:11
[Redis] Multiple Redis instance on same server #linux

FOR MULTIPLE REDIS INSTANCE INSTALLATION ON RHEL7+ USE THE FOLLOWING PATHS AND SETUP PROCESS:

  • create a new redis .conf file
$ cp /etc/redis.conf /etc/redis-xxx.conf
  • edit /etc/redis-xxx.conf, illustrated as below
@thieryl
thieryl / vagrant.md
Created July 20, 2018 11:12
[Vagrant] Vagrant and Virtualbox Installation on Fedora #linux

Vagrant and Virtualbox Installation on Fedora

This article explains how to install Vagrant and Virtualbox on Fedora 23/24 so you can build your development environments. Vagrant and Virtualbox provide an easy way to create, configure and distribute development environments.

This play is also working on the brand new Fedora 26 with just a glitch about few missing headers files, see my note at the end.

VirtualBox Installation Add VirtualBox repository and update your system:

@thieryl
thieryl / 01_aws_rbd_cli.md
Last active March 31, 2022 10:49
[AWS] Amazon Web Services #aws

AWS CLI RBD

White list office ip

aws allow-my-ip "Proxy-Cerebro" tcp 22 rbd_sys