Skip to content

Instantly share code, notes, and snippets.

Kevin LABECOT kevin39

Block or report user

Report or block kevin39

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kevin39
kevin39 / docker-compose.yml
Created Feb 15, 2019 — forked from tebeka/docker-compose.yml
HAProxy in front of Elasticsearch
View docker-compose.yml
elastic:
image: elasticsearch
haproxy:
image: haproxy
volumes:
- ${PWD}:/usr/local/etc/haproxy
links:
- elastic
ports:
View sysctl.conf
sysctl fs.inotify.max_user_instances=256
View sysctl.conf
sysctl fs.inotify.max_user_instances=256
View extract_lxc_list
pct list |awk 'FNR > 1 {print "VMID=" $1 " - " $3}'
@kevin39
kevin39 / apilist.txt
Created Apr 17, 2018 — forked from yoimbert/apilist.txt
list api Fibaro HC2
View apilist.txt
Signification des variables :
<LOGIN> = L'utilisateur autorisé à effectuer l'action (ex: admin)
<PASS> = Votre mot de passe
<IP> = L'adresse IP de votre Home Center, il est donc nécessaire de lui attribuer une IP fixe (via la rédervation de bail de votre box / routeur Internet)
<ID> = identifiant du module Z-Wave (comment trouver l'ID d'un module ?)
name = action (ex: turnOff, turnOn, setValue)
<Value> = valeur (ex: niveau de variation à 39 % --> arg1=39 )
Exemples :
@kevin39
kevin39 / cpu-numa-compatible
Created Jun 30, 2017
Check if CPU is numa compatible
View cpu-numa-compatible
$ numactl --hardware | grep available
# If greater than 2 : NUMA is supported
@kevin39
kevin39 / lvm-very-slow
Created May 23, 2017
LVM - Slow lvremove
View lvm-very-slow
Try to add --noudevsync
Example :
lvremove -v --noudevsync <path to volume>
@kevin39
kevin39 / search and replace in files
Last active May 18, 2017
Recursive find and replace
View search and replace in files
grep -rl "OLD STRING" /etc/iscsi/nodes/ | xargs sed -i "s/OLD STRING/NEW STRING/g"
View How to resize or shrink a container
pct restore <ct id> <archive> --rootfs <storage name>:<new size in gb>
@kevin39
kevin39 / ssh_reboot_forced_if_cmd_hangs
Created Apr 26, 2017
Forcer un redémarrage de Linux via SSH quand reboot ne marche pas
View ssh_reboot_forced_if_cmd_hangs
echo s > /proc/sysrq-trigger # Flusher les buffers d'IO pour ne pas perdre de données
echo u > /proc/sysrq-trigger # Démonter puis Remonter toutes les partitions en Read-Only
echo b > /proc/sysrq-trigger # Forcer le reboot de la machine
# Source : http://www.area51.fr/2011/10/31/forcer-redemarrage-linux-via-ssh/
You can’t perform that action at this time.