Skip to content

Instantly share code, notes, and snippets.

View kernoeb's full-sized avatar
📌
Working :)

kernoeb kernoeb

📌
Working :)
View GitHub Profile
@kernoeb
kernoeb / win10.sh
Last active April 11, 2021 15:35
Qemu KVM - Windows 10 + Virtio
#!/bin/bash
#########################
# QEMU KVM WIN10 #
# kernoeb #
#########################
# Installation
# 1) Create qcow2
qemu-img create -f qcow2 win10.img 35G
@kernoeb
kernoeb / docsify-markdown2pdf.sh
Created November 16, 2020 15:23
Build a PDF file from Docsify structure (markdown)
# Install deps
# sudo apt-get install -y texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
# sudo apt-get install -y texlive-xetex
# sudo apt install -y ghostscript
# wget https://github.com/jgm/pandoc/releases/download/2.9.2.1/pandoc-2.9.2.1-1-amd64.deb
# sudo apt install -y ./pandoc-2.9.2.1-1-amd64.deb
# rm ./pandoc-2.9.2.1-1-amd64.deb
#cp fonts/*.ttf ~/.fonts # I use Google Fonts (Roboto -> please see line 8)
cd book # directory where markdown files can be found
@kernoeb
kernoeb / apk_edit.sh
Last active September 20, 2020 00:04
Decompile, edit, rebuild and sign .apk files to accept https analyses (e.g. Charles Proxy)
#!/bin/bash
###########
# kernoeb #
###########
apk_dir=.apk_dir # name of the build apk
keystore=key.keystore # name of the keystore
apktool=apktool.jar # apktool.jar location
alias_name=alias_name # temporary alias name
@kernoeb
kernoeb / discord_status.py
Created September 19, 2020 19:43
Dynamically change the Discord status
import requests, time
from random import randint
headers = {
'authorization': 'mfa.XXXXX', # Discord token
'content-type': 'application/json',
}
a = [['This', '⚙️'], ['Is', '🔔'], ['Illegal', '➡️']]
@kernoeb
kernoeb / getAllGitStatus.sh
Created August 12, 2020 12:01
Get all git status in a directory, only if something's changed
#!/bin/bash
# Example :
# dir/
# | - repo1
# | - repo2
grepmsg="rien à valider" # if french
print_equals () {
@kernoeb
kernoeb / checkAllProjects.sh
Last active August 12, 2020 11:48
Check for new commits on GitLab with desktop notification (see tutorial.md)
#!/bin/bash
# @kernoeb
# PLEASE SEE tutorial.md
token="gitlab_token"
directory="/path/to/scripts/directory" # script directory
config="/home/USER/.config/checkAllCommits" # config directory
file="checkCommitsNotif.sh"
/bin/bash $directory/$file $config $directory $token repo name master # please write "master"
@kernoeb
kernoeb / lastCommits.sh
Last active June 29, 2020 11:42
Last GitLab commits
#!/bin/bash
dimstr="\e[2m"
bold="\e[1m"
normalstr="\e[0m"
green=$'\e[1;32m'
yellow=$'\e[1;33m'
cyn=$'\e[1;36m'
echo -e "${bold}BASH GitLab Commits :"
@kernoeb
kernoeb / pdf2odp.py
Last active August 19, 2020 12:25
pdf2odp : convert pdf files to LibreOffice Impress odp documents (pictures)
# Author: kernoeb
# pdf2odp.py
###########################
# Please install : #
# pip3 install odfpy #
# pip3 install pdf2image #
###########################
import os
import shutil
@kernoeb
kernoeb / keybase.md
Created May 22, 2019 18:44
just for keybase xd

Keybase proof

I hereby claim:

  • I am kernoeb on github.
  • I am kernoeb (https://keybase.io/kernoeb) on keybase.
  • I have a public key ASAnBfScom6rs811Ql4xB3KbleHxLo9T1PiA78Il14i3Ygo

To claim this, I am signing this object: