Skip to content

Instantly share code, notes, and snippets.

@mattberjon
mattberjon / qr_code
Created March 25, 2018 15:03
Function to generate QR code for WIFI passwords
# -*- coding: utf-8 -*-
import qrcode
import qrcode.image.svg
def generate_qrcode(
ssid='ssid',
password='password',
password_type='WPA',
filename='output.svg'):
@mattberjon
mattberjon / slack_change.sh
Created November 27, 2017 21:39
Check if the slackware CHANGELOG has been modified and send an email
#!/bin/sh
#
# /etc/cron.daily
#
# last update: 05 June 2012
# author: matthieu berjon <matthieu.berjon@wavefield.fr>
# licence: WTFPL
#
# description: check the changelog according to the slackware version of the
# computer and send an email if changes appear.
@mattberjon
mattberjon / checkurl.list
Created November 27, 2017 21:37
Check if a webpage changed since the last time (if no RSS feed exists)
nginx http://nginx.org
octave http://www.gnu.org/software/octave/
slackware http://slackware.com/
markdown http://daringfireball.net/projects/markdown/
uzbl https://github.com/Dieterbe/uzbl/downloads
ffmpeg http://www.ffmpeg.org/download.html
echinus http://plhk.ru/
ourico http://plhk.ru/static/ourico/
tmux http://tmux.sourceforge.net
fakeroot http://packages.qa.debian.org/f/fakeroot.html
@mattberjon
mattberjon / sshr
Created November 27, 2017 21:32
Create or kill an SSH tunnel
#!/bin/sh
# ~/bin/sshr
#
# modified: 26 Jan 2012
# author: matthieu berjon <matthieu.berjon@wavefield.fr>
# licence: WTFPL
#
# description: create or kill a remote ssh tunnel
LOGIN=
@mattberjon
mattberjon / spkg.sh
Created November 27, 2017 21:31
Search for an installed Slackware package log file
#!/bin/sh
#
# Look for corresponding package into the slackware package log folder. This
# script is specific to the Slackware distribution.
#
# modified: 22 August 2012
# author: matthieu berjon <matthieu(dot)berjon(at)wavefield(dot)fr>
# licence: BSD
Search () {
@mattberjon
mattberjon / slk_version.sh
Created November 27, 2017 21:30
Create a Slackware VERSION file according to your current installation
#!/bin/sh
#
# Create a VERSION file according to the slackbuilds created
#
# modified: 22 August 2012
# author: matthieu berjon <matthieu(dot)berjon(at)wavefield(dot)fr>
# license: BSD
CUR_VERSION=13.37
SLACK_PATH=~/repo/slackware/slackware-$CUR_VERSION
@mattberjon
mattberjon / shut.sh
Created November 27, 2017 21:29
Check if all work have been commited in your repositories before shutting the computer
#!/bin/sh
# ~/bin/shut
#
# modified: 21 Oct 2011
# author: Matthieu Berjon <matthieu.berjon@wavefield.fr>
# licence: WTFPL
#
# description: check if repositories have been modify before shutdown.
# check the repo
@mattberjon
mattberjon / radio
Last active November 1, 2020 14:11
Minimalist CLI radio
#!/bin/bash
set -e
datetime=$(date "+%Y-%m-%d-%H-%M-%S")
radio_config_dir="$HOME/.config/radio"
radio_list="$radio_config_dir/list"
# Check if the config file exists and create it if it doesn't
if [ ! -d "$radio_config_dir" ]; then
@mattberjon
mattberjon / gpk.sh
Created November 27, 2017 21:24
Minimalist package manager for Slackware
#!/bin/sh
#
# Look on official mirror and Slackbuilds.org if a package is available.
#
# modified: 22 August 2012
# author: matthieu berjon <matthieu(dot)berjon(at)wavefield(dot)fr>
# licence: BSD
#
# TODO
#
@mattberjon
mattberjon / dualscreen.sh
Created November 27, 2017 21:23
A small bash dualscreen manager
#!/bin/sh
#
# ~/bin/dualscreen
#
# modified: 10 Dec 2011
# author: Matthieu Berjon <matthieu.berjon@wavefield.fr>
# licence: WTFPL
#
# description: help to configure dualscreen resolutions.