Skip to content

Instantly share code, notes, and snippets.

@lemajes
lemajes / SVG-TO-PNG.md
Last active January 19, 2023 11:31
[SVG to PNG] SVG to PNG #svgtopng #svg #to #png #debian #linux #inkscape
  • Install inkscape sudo apt install -y inkscape

  • Convert svg to png (with 1000x1000 size) inkscape -z -o out.png -w 1000 -h 1000 in.svg

@lemajes
lemajes / Slack-notifications.md
Last active January 16, 2023 01:46
[Slack notifications for long systems commands]
  • Put this in .bashrc and source it alias slackmessage='curl -XPOST -H "Content-Type: application/json" https://hooks.slack.com/services/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -d @-'

  • To send a message echo '{"text": "fart"}' | slackmessage

  • To send a message with variables echo "{'text': '$HOST'}" | slackmessage

@lemajes
lemajes / GlusterFS-101.md
Created January 10, 2023 14:06
[Glusterfs 101] Glsuterfs 101 #glusterfs #101

GlusterFS 101

@lemajes
lemajes / GO-101.md
Last active May 3, 2023 01:22
[GO-101] GO 101 #go #101 #debian #linux #install

GO 101

  • Installation
#!/bin/bash
wget https://dl.google.com/go/go1.19.4.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.19.4.linux-amd64.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin" | sudo tee -a /etc/profile
source $HOME/.profile
@lemajes
lemajes / backend.tf
Last active January 24, 2023 14:34
[Terraform Example] Terraform Example #debian #bash #terraform #example #openstack
terraform {
backend "http" {
address = "https://gitlab.xxx.xxx/api/v4/projects/xxx/terraform/state/xxx"
lock_address = "https://gitlab.xxx.xxx/api/v4/projects/xxx/terraform/state/xxx/lock"
lock_method = "POST"
password = "xxx"
retry_max = null
retry_wait_max = null
retry_wait_min = 5
skip_cert_verification = true
@lemajes
lemajes / espoofer.md
Created January 9, 2023 17:02
[espoofer] Mail Spoofer espoofer #bash #debian #espoofer #security #spf #dkim #dmarc
@lemajes
lemajes / VLC-101.md
Created December 24, 2022 09:05
[VLC 101] VLC 101 #debian #vlc #cli

VLC 101

  • Open folder recusively find Musique/Contents -type f -exec vlc -LZ '{}' +
@lemajes
lemajes / minikube.md
Created December 18, 2022 17:21
[Minikube] minikube

./minikube start --driver=qemu2

@lemajes
lemajes / Sysbench-101.md
Last active July 19, 2023 15:10
[Sysbench 101] Sysbench 101 #sysbench #101 #mysql #benchmark #test #workload
  • Install repository shell: curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.deb.sh | sudo bash

  • Install package apt install sysbench -y

  • Create needed test database mysql -e "create database sbtest;"

  • Grant privileges

@lemajes
lemajes / Install_centreon_2210_deb11.sh
Created December 8, 2022 23:02
[Install Centreon 22.10 Debian 11] Install Centreon 22.10 Debian 11 #debian #linux #install #centreon #nagios #monitoring
#!/bin/bash
#https://docs.centreon.com/docs/installation/installation-of-a-central-server/using-packages/
apt update && apt install lsb-release ca-certificates apt-transport-https software-properties-common wget gnupg2
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/sury-php.listwget -O- https://packages.sury.org/php/apt.gpg | gpg --dearmor | tee /etc/apt/trusted.gpg.d/php.gpg > /dev/null 2>&1
apt update
curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- --os-type=debian --os-version=11 --mariadb-server-version="mariadb-10.5"
echo "deb https://apt.centreon.com/repository/22.10/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/centreon.list
wget -O- https://apt-key.centreon.com | gpg --dearmor | tee /etc/apt/trusted.gpg.d/centreon.gpg > /dev/null 2>&1
apt update
apt install -y centreon