Skip to content

Instantly share code, notes, and snippets.

@labynocle
labynocle / howto-ubuntu-encrypted-disk.md
Last active June 24, 2022 13:15
Ubuntu :: Check if disk is encrypted

To be able to give a proof to your IT when you ecrypted your disk during the installation process (cf: Ubuntu 22.04 Enable full disk encryption )

First list all your current disk:

$ lsblk --fs
NAME                  FSTYPE      FSVER    LABEL UUID                                   FSAVAIL FSUSE% MOUNTPOINTS
loop0                 squashfs    4.0                                                         0   100% /snap/bare/5
@labynocle
labynocle / tp_datavisualization.md
Last active April 19, 2024 12:41
TP/Projet de datavisualization

TP/Projet DataViz avec la stack ELK

Objectif

L'objectif de ce TP/Projet est de prendre en main la stack ELK afin de mener un projet de bout en bout de collecte et de représentation de data.

Le rendu attendu sera :

  • un document décrivant le workflow/architecture de votre projet
  • l'ensemble des scripts, fichiers de configurations, etc...que vous avez produit
FROM debian:latest
RUN apt-get update && apt-get install -y openssh-server
RUN mkdir /var/run/sshd
RUN echo 'root:plop' | chpasswd
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
# SSH login fix. Otherwise user is kicked off after login
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
@labynocle
labynocle / main.yml
Last active July 1, 2017 08:18
Ansible for java 8 on Ubuntu
---
- name: Add Java repository
apt_repository:
repo: "ppa:webupd8team/java"
become: yes
- name: Force apt cache update
apt:
update_cache: yes
become: yes
#!/usr/bin/env python
import httplib
import socket
import xmlrpclib
import sys
import supervisor.xmlrpc
proxy = xmlrpclib.ServerProxy('http://127.0.0.1',
transport=supervisor.xmlrpc.SupervisorTransport(
@labynocle
labynocle / kopf.md
Last active March 16, 2016 11:16
Using Kopf to manage your ES 2.* cluster

Basic tuto to install a local copy of kopf to manage your brand new ES 2.* cluster. kopf will be provided by an Apache vhost.

install kopf

cd /data/vhost/k/
git clone git://github.com/lmenezes/elasticsearch-kopf.git kopf.plop.com
cd kopf.plop.com
git checkout 2.0

create your Apache vhost

@labynocle
labynocle / diff-highlight.md
Last active August 29, 2015 14:01
Git: diff-highlight and usual configuration

diff-highlight is a very useful script to enhance git log and git diff commands.

This is just a little memo on how I use it.

diff-highlight

cd ~
[[ ! -e "~/bin" ]] && mkdir bin
cd bin
wget https://raw.githubusercontent.com/git/git/master/contrib/diff-highlight/diff-highlight