Skip to content

Instantly share code, notes, and snippets.

Avatar

Corentin Bettiol corentinbettiol

View GitHub Profile
@corentinbettiol
corentinbettiol / README.md
Last active Nov 4, 2021
Display an arrow.
View README.md

Display this in your term:

arrow.gif

May be useful for running loops? Idk.

I found the chars here.

View meteo.md

Afficher la météo avec zenity & wttr.in:

Créer un fichier meteo.desktop quelque part sur votre ordinateur, contenant ceci :

[Desktop Entry]
Encoding=UTF-8
Version=0.0.1
Type=Application
Terminal=false
Exec=bash -c "zenity --text-info --html --url='https://wttr.in/$(zenity --entry --title='Météo' --text='Entrez le nom de la ville :' --entry-text='chateaudouble')?1&F' --width=920 --height=355"
@corentinbettiol
corentinbettiol / wacom.sh
Last active Jul 23, 2021
Utility used to select the screen to link to all devices of wacom bamboo tablets connected to the computer.
View wacom.sh
#!/bin/sh
# Author: Corentin Bettiol
# Contact: corentin [at] 244466666 [dot] xyz
# Version: v230721
# License: WTFPL2 (https://wtfpl2.com/)
# Source: https://gist.github.com/corentinbettiol/de6cbeb7a9286d06339b4a80d64a7876
echo "Utility used to select the screen to link to all devices of wacom bamboo tablets connected to the computer."
@corentinbettiol
corentinbettiol / access.rc
Created Mar 23, 2021
goaccess config file for reading apache's access.log
View access.rc
time_format %H:%M:%S %Z
date_format %d/%b/%Y
log_format %h - - [%d:%t] "%r" %s %b "%R" "%u"
@corentinbettiol
corentinbettiol / other_vhosts_access.rc
Created Mar 23, 2021
goaccess config file for reading apache's other_vhosts_access.log
View other_vhosts_access.rc
time_format %H:%M:%S %Z
date_format %d/%b/%Y
log_format %h %l %u [%d:%t] "%r" %>s %O "%{Referer}i" "%{User-Agent}i"
#log_format %v %h - - [%d:%t] "%r" %s %b "%R" "%u"
@corentinbettiol
corentinbettiol / create_djangocms_plugin.md
Last active Aug 16, 2021
Easy creation & installation of a new djangocms-plugin!
View create_djangocms_plugin.md

It's a doc for easily creating a new djangocms plugin.

step 1: create a new dev djangocms site

Just follow steps here.

step 2: create a new folder or download your newly created repo for your django-cms plugin

mkdir ~/djangocms-plugin
@corentinbettiol
corentinbettiol / create-testrepo.sh
Created Feb 18, 2021
This tiny script will init a new git repo in a folder, and then will "clone" this repo in another folder, allowing us to test things with git-related commands in a temporary folder.
View create-testrepo.sh
mkdir testrepo && cd testrepo # create folder
mkdir git && cd git && git init --bare # create new git repo in testrepo/git folder
cd .. && git clone git test # will clone git repo from testrepo/git folder to changelog/test folder
cd test
@corentinbettiol
corentinbettiol / install.sh
Created Dec 13, 2020
Instal NBTExplorer on linux with wine and mono
View install.sh
sudo apt install mono-complete
wget https://dl.winehq.org/wine/wine-mono/5.1.1/wine-mono-5.1.1-x86.msi
WINEPREFIX=NBTExplorer wine msiexec /i wine-mono-5.1.1-x86.msi
wget https://github.com/jaquadro/NBTExplorer/releases/download/v2.8.0-win/NBTExplorer-2.8.0.msi
WINEPREFIX=NBTExplorer wine msiexec /i NBTExplorer-2.8.0.msi
WINEPREFIX=NBTExplorer wine NBTExplorer/drive_c/Program\ Files\ \(x86\)/NBTExplorer/NBTExplorer.exe
View poetry-cheatsheet.md

List of commands here.

poetry lock && poetry install

Update lock & install dependencies.

poetry show --tree

Output a nice tree of dependencies.

poetry install --remove-untracked

Remove dependencies that are no longer in lock file.

@corentinbettiol
corentinbettiol / bouchons.py
Last active Oct 29, 2020
Get traffic jams numbers from Ile de France in real time as notifications!
View bouchons.py
#!/usr/bin/python3
from bs4 import BeautifulSoup
from requests import get
from os import system
from time import sleep
km = "0"
while 1: