Skip to content

Instantly share code, notes, and snippets.

View corentinbettiol's full-sized avatar

Corentin Bettiol corentinbettiol

View GitHub Profile
@corentinbettiol
corentinbettiol / Favicons for HN & Lobsters (updated).md
Last active August 4, 2022 07:14 — forked from frabert/COPYING
Display small, low-opacity favicons of links on HN & Lobsters pages & comments.

Display favicons next to HN & Lobsters posts (and comments)

Fork of this gist.

Main differences:

  • Does not add another favicon when you go back in your history and re-show a hn page,
  • Display favicons on comments links too,
  • Favicons are smaller (12x12px),
  • Favicons are displayed with a opacity = 0.6 (help do not be disturbed by flashy favicons)
@corentinbettiol
corentinbettiol / create-testrepo.sh
Last active May 16, 2022 15:01
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.
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 testrepo/test folder
cd test
@corentinbettiol
corentinbettiol / zsh-agnoster.md
Last active January 22, 2022 23:42
Install agnoster theme in zsh in docker from vscode console.
  1. Install the fonts on your computer:

    git clone https://github.com/powerline/fonts.git
    cd fonts
    ./install.sh
    cd .. && rm -rf fonts
  2. Then, open the settings (ctrl+p > "settings json" > enter) in vscode.

@corentinbettiol
corentinbettiol / README.md
Last active November 4, 2021 15:00
Display an arrow.

Display this in your term:

arrow.gif

May be useful for running loops? Idk.

I found the chars here.

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 / create_djangocms_plugin.md
Last active August 16, 2021 09:41
Easy creation & installation of a new djangocms-plugin!

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 / access.rc
Created March 23, 2021 21:10
goaccess config file for reading apache's access.log
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 March 23, 2021 21:09
goaccess config file for reading apache's other_vhosts_access.log
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 / README.md
Last active January 13, 2021 19:14
Homemade timetracking in its simplest form.

What ?

It's a very simple timetracking tool for linux users that use systemd services & zenity.

screenshot (source)

How to install

  1. Put timetracking.sh on your computer.
@corentinbettiol
corentinbettiol / install.sh
Created December 13, 2020 22:06
Instal NBTExplorer on linux with wine and mono
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