Skip to content

Instantly share code, notes, and snippets.

View fdv's full-sized avatar
🚀
Taking over the world

Fred de Villamil fdv

🚀
Taking over the world
View GitHub Profile
@fdv
fdv / main.yml
Last active August 29, 2015 14:06
Quick Ansible role to upgrade vulnerable Bash for the laziest
- name: Update apt DB
tags: fix_bash
sudo: yes
apt: update_cache=yes
- name: Update base packages
tags: fix_bash
sudo: yes
apt: pkg=bash state=latest
Premier coup :
FROM ubuntu:14.04
RUN echo build $(date)
RUN apt-get update
RUN apt-get install nagios-nrpre-server
RUN apt-get upgrade
CMD nagios-nrpe-server
Tu build ton container nrpe, et ensuite :
@fdv
fdv / sslvhost.conf
Created October 15, 2014 15:16
nginx SSL configuration for a A / A+ on ssl labs (depends on your key using SHA1 or not)
# nginx SSL configuration for a A / A+ on ssl labs (depends on your key using SHA1 or not)
ssl on;
ssl_certificate /usr/local/etc/nginx/ssl/cert.pem;
ssl_certificate_key /usr/local/etc/nginx/ssl/key.key;
ssl_dhparam /usr/local/etc/nginx/ssl/dh4096.pem;
ssl_session_timeout 10m;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'AES256+EECDH:AES256+EDH';
C'est l'histoire d'un gamin de 6 ans qui décide que les pauvres, les handicapés, les moches et les imbéciles ne devraient pas avoir le droit de se reproduire.
Et tu le suis tout au long de sa vie durant laquelle il va peu à peu faire accepter cette idée au monde entier (il monte un journal, en rachète, devient un magnat de la presse etc...) et au lieu de faire passer des lois, c'est la pression de la société à travers la manipulation des média (publicité + campagnes + reportages) qui transforme le monde en haras géant.
Et à la fin, il apprend qu'il est affecté d'une maladie génétique qui fait que ses enfants doivent se faire stériliser.
@fdv
fdv / gist:946f02260beee71e5229
Created May 2, 2015 12:25
Had this mail from a recruiter. Couldn't answer anything but LOL.
Hello,
I'm contacting you to offer you a uniq job opportunity. My client is a world class company looking for a R&D operations cloud engineer.
On an international perimeter, the collaborator will join a team of R&D experts that faces technical challenges and has to deliver innovations (WTF???)
I'm looking for someone with a first experience or a technical leader with dual development skills (Example: Python + Java) in a SOAP/REST environment and architecture / automation system deployment in the CLOUD who wants to work in a R&D team.
About the role:
- Very interesting salary
@fdv
fdv / backup.sh
Created September 11, 2015 15:02
#!/bin/bash -x
#Tue Jul 2 15:32:21 CEST 2013
#Made by Edward Z.
set -e #stops execution if a variable is not set
set -u #stop execution if something goes wrong
usage() {
echo "usage: $(basename $0) [option]"
echo "option=full: do a full backup of vinnie /var/lib/mysql using innobackupex, aprox time 6 hours."
echo "option=incremental: do a incremental backup"

Keybase proof

I hereby claim:

  • I am fdv on github.
  • I am fdevillamil (https://keybase.io/fdevillamil) on keybase.
  • I have a public key whose fingerprint is 3D32 E128 E5D6 4BD8 8CD6 7C1E 2605 FF1F 042D 9183

To claim this, I am signing this object:

@fdv
fdv / es-cheat-sheet.md
Last active February 2, 2021 14:44
An ElasticSearch management cheat sheet

These are the snippets I use most of the time when administrating my ES cluster

To be updated

Settings to change before you do something

Before restarting a data node

curl -XPUT 'http://escluster:9200/_cluster/settings' -d '{
@fdv
fdv / optimize.sh
Created February 20, 2016 16:27
Rolling optimize of an ElasticSearch cluster
#!/bin/sh
HOST=$1
CURL_BIN=$(which curl)
if [ -z "$HOST" ]; then
echo "Host is missing"
exit 1
fi
#!/bin/sh
HOST=$1
CURL_BIN=$(which curl)
if [ -z "$HOST" ]; then
echo "Host is missing"
exit 1
fi