Skip to content

Instantly share code, notes, and snippets.

Avatar
👾

Mathieu V dotsh

👾
  • ZQA
View GitHub Profile
@dotsh
dotsh / spam_decode.py
Created Jan 17, 2022 — forked from lkraider/spam_decode.py
X-OVH-SPAMCAUSE decoder
View spam_decode.py
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 Jun 24, 2021
install fractal from source with flatpak
View fractal.sh
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 Apr 15, 2021
Wireguard - script to add new client
View newclient.sh
#! /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 Sep 29, 2022
DIY install debian on Oracle Cloud Infrastructure ( Free Tier )
View reinstall_VPS_from_inside.sh
# 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 Oct 3, 2018
openldap simple install on CentOS
View simple_openLDAP_CentOS.sh
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 Mar 28, 2021
Zorin Linux Lite install on Lenovo Miix 310
View gist:7e647e2f4fec06d085a6902ea0f0a4cb
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
View CM5
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
View CDH5.sh
# 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)