Skip to content

Instantly share code, notes, and snippets.

View lvaylet's full-sized avatar
🔥
Learning

Laurent Vaylet lvaylet

🔥
Learning
  • Google, Inc
  • Paris, France
View GitHub Profile
@lvaylet
lvaylet / install-flynn.sh
Last active January 1, 2018 17:19
Install script for single node Flynn Cluster on Ubuntu 16.04 box
#!/bin/bash
# This script sets up a single node Flynn Cluster on your linux box.
# Fresh Flynn install with domain provided by the xip.io service.
#
# @date 1 Jan 2018
# @author Laurent Vaylet <laurent.vaylet@gmail.com>
#
# References:
# https://flynn.io/docs/installation/manual#bootstrap-flynn (Flynn documentation)
@lvaylet
lvaylet / gist:0ec898dd7745172daa83ee732d9ac7b8
Last active January 5, 2018 16:11
How to setup networking on XS35V2
# Ubuntu Server 16.04 LTS x64
- La carte Ethernet n'est pas reconnue pendant l'installation.
- La procédure 12.04 ne fonctionne pas. Dû à l'architecture x64 ?
- Les outils WiFi ne sont pas installés par défaut.
=> impossible de se connecter. Partir d'une 14.04, configurer le WiFi et faire l'upgrade vers 16.04 manuellement.
Ensuite, suivre les instructions de ce billet pour activer l'interface `p*p1` (anciennement eth0) : https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1310798
@lvaylet
lvaylet / atlassian-jira-docker-compose.yml
Created January 15, 2018 21:26
docker-compose for JIRA with MySQL
version: '3'
services:
jira:
depends_on:
- mysql
container_name: jira
restart: always
image: cptactionhank/atlassian-jira:7.7.0
ports:
@lvaylet
lvaylet / cross-compile_filebeat_arm.md
Last active September 13, 2021 08:01 — forked from anis-campos/cross-compile_filebeat_arm.sh
Cross-compile Elastic Filebeat for ARM with docker. Works on Raspberry Pi 2 and 3.

Elastic does not provide Filebeat binaries for ARMv7. Luckily, Filebeat can easily be cross-compiled with:

# ----- Instantiate an immutable Go container for cross-compilation ----- #
mkdir build && cd $_
docker run -it --rm -v `pwd`:/build golang:1.9 /bin/bash

# ----- Inside Go container ----- #
go get github.com/elastic/beats
cd /go/src/github.com/elastic/beats/filebeat/

Compile Apache MiNiFi 0.4.0 C++ for alpine-based image on Raspberry Pi 3.

# ----- Instantiate an immutable Debian container for compilation ----- #
# Bind mount a shared volume to store the binary once it is built.
docker run -it --rm -v `pwd`:/build resin/raspberrypi3-debian /bin/bash

# ----- Inside the Debian container ----- #
apt update && apt install git build-essential
git clone https://github.com/apache/nifi-minifi-cpp
@lvaylet
lvaylet / alphabet.py
Created October 18, 2019 09:15
Generate an alphabet pattern for buffer overflow exploits
"""
>>> python alphabet.py
AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHHIIIIJJJJKKKKLLLLMMMMNNNNOOOOPPPPQQQQRRRRSSSSTTTTUUUUVVVVWWWWXXXXYYYYZZZZ
"""
import string
alphabet = ''.join([c*4 for c in string.ascii_uppercase])
print(alphabet)
@lvaylet
lvaylet / main.tf
Created February 18, 2020 21:30
Terraform 12 - for_each with list of objects
/*
Usage:
$ tfenv install 0.12.19
$ tfenv use 0.12.19
$ terraform init
$ terraform plan
$ terraform apply -auto-approve
$ terraform destroy
Reference: https://github.com/hashicorp/terraform/issues/22516
@lvaylet
lvaylet / recursive_git_pull.sh
Last active July 11, 2020 17:13
Recursive git pull
# When you want to update all of your git repositories with a single command
find . -type d -name .git -exec sh -c "cd \"{}\"/../ && pwd && git pull" \;
@lvaylet
lvaylet / install_hashicorp_tools.sh
Last active July 12, 2020 15:02
Install Hashicorp tools with sethvargo/hashicorp-installer
cd ~/.local/bin
docker run -v $(pwd):/software sethvargo/hashicorp-installer terraform 0.12.28
docker run -v $(pwd):/software sethvargo/hashicorp-installer vault 1.4.3
# Then make sure ~/.local/bin is added to $PATH in .profile, .bashrc or .zshrc
@lvaylet
lvaylet / 15_xmonad_xmobar.md
Last active January 26, 2024 06:59
Install XMonad and Xmobar on Ubuntu with Distrotube's config

15 - XMonad and Xmobar

From a fresh installation of Ubuntu 20.04 (ubuntu-20.04.2.0-desktop-amd64.iso), install the base XMonad package, extra libraries/modules from the community as well as xterm and dmenu with:

sudo apt install xmonad libghc-xmonad-contrib-dev xterm dmenu

Log out, click your user, select XMonad from the cog at the bottom right and type your password to log in using XMonad instead of the default window manager. The black screen you get is suckless to the extreme and completely expected :-) No wallpaper, no menu, no panel...