Skip to content

Instantly share code, notes, and snippets.

View dotsh's full-sized avatar
👾

Mathieu V dotsh

👾
  • ZQA
View GitHub Profile
@dotsh
dotsh / spam_decode.py
Created January 17, 2022 10:38 — forked from lkraider/spam_decode.py
X-OVH-SPAMCAUSE decoder
def decode(msg):
text = []
for i in range(0, len(msg), 2):
text.append(unrot(msg[i: i + 2]))
return str.join('', text)
def unrot(pair, key=ord('x')):
offset = 0
for c in 'cdefgh':
@dotsh
dotsh / fractal.sh
Created June 24, 2021 13:07
install fractal from source with flatpak
sudo -i
cat > fractal.sh << EOF
apt install -y flatpak flatpak-builder git tmux
flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak remote-add --user --if-not-exists gnome-nightly https://nightly.gnome.org/gnome-nightly.flatpakrepo
flatpak install --assumeyes --user gnome-nightly org.gnome.Sdk org.gnome.Platform
flatpak install --assumeyes --user flathub org.freedesktop.Sdk.Extension.rust-stable//20.08
git clone https://gitlab.gnome.org/GNOME/fractal.git
@dotsh
dotsh / newclient.sh
Created April 15, 2021 16:01
Wireguard - script to add new client
#! /bin/bash
clientname=$1
serverconf="wg0.conf"
subnet24="172.20.1."
dns1=176.103.130.130
dns2=176.103.130.131
@dotsh
dotsh / reinstall_VPS_from_inside.sh
Last active April 3, 2024 14:36
DIY install debian on Oracle Cloud Infrastructure ( Free Tier )
# should works on any cloud-init enabled hypervisor (openstack.. )
# start from a ubuntu minimal install
# we need to shrink down the used space to move it in a tmpfs of 700MB
# make sure we are on the highest kernel, so we can delete all the others ...
sudo apt update && sudo apt upgrade -y && reboot
# ... reconnect
sudo apt install lsof
@dotsh
dotsh / simple_openLDAP_CentOS.sh
Last active October 3, 2018 15:37
openldap simple install on CentOS
exit
## !!! ne pas executer comme un script !!! ##
### j'ai mis "exit" en haut pour eviter ça.
# il faut copier /coller chaque bloc de texte ci dessous dans un shell après avoir bien lu et compris
# il est préférable d'afficher ce document en RAW ( cf bouton sur la droite ) et de copier coller les here-documents en un bloc.
# un here-document c'est ce genre de chose :
#cat > truc << EOF
#blabla
#EOF
@dotsh
dotsh / gist:7e647e2f4fec06d085a6902ea0f0a4cb
Last active March 28, 2021 12:03
Zorin Linux Lite install on Lenovo Miix 310
download Zorin Lite and use etcher.io or dd to create a liveUSB
boot the liveUSB
hit the "e" key to modify the kernel parameters in Grub
add "pwm-lpss pwm-lpss-platform" to the line : "linux ......"
cat > paysage.sh << EOF
@dotsh
dotsh / CM5
Last active October 6, 2017 15:06
cd
sudo su -c 'for i in $(lxc-ls) ; do lxc-stop --name $i ; lxc-destroy --name $i ;done'
mkdir cloudera-manager-cluster
cd cloudera-manager-cluster
## restart here with this command if any problem ## sudo su -c 'for i in $(lxc-ls) ; do lxc-stop --name $i ; lxc-destroy --name $i ;done' ; rm Vagrantfile
@dotsh
dotsh / CDH5.sh
Last active November 3, 2017 15:16
# works from ubuntu 16.04.3 LTS
sudo apt-get update
sudo apt-get install -y lxc bridge-utils vim
url="https://releases.hashicorp.com"
latest=$(wget -qO- ${url}/vagrant/ | grep -o -P '/vagrant/[^"]*' | head -n 1)