This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .bashrc | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# Uncomment the following line if you don't like systemctl's auto-paging feature: | |
# export SYSTEMD_PAGER= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Display options | |
set background=dark | |
set nu | |
set rnu | |
set ruler | |
set showcmd | |
" tabs and spaces and tabs and spaces | |
set expandtab | |
set tabstop=2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Lock the session if a bluetooth device is too far away. | |
# /!\ Use MAC address as identifier. | |
# Adapted from https://github.com/karulis/pybluez/blob/master/examples/advanced/inquiry-with-rssi.py | |
from subprocess import check_output, call, CalledProcessError | |
import sys | |
import struct | |
import bluetooth._bluetooth as bluez | |
import bluetooth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for i in "$@"; do : | |
if [ -f "$i" ]; then | |
printf "==========\nFile: %s\n" "$i" | |
tee >(md5sum - | awk '{print "MD5: "$1}') \ | |
>(sha1sum - | awk '{print "SHA1: "$1}') \ | |
> >(sha256sum - | awk '{print "SHA256: "$1}') < "$i" \ | |
| sort | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#License CC-BY-NC-SA for the code. | |
#This script converts all flac files in a directory into 320kpbs mp3 files, and then move them into another directory, | |
#set as the first argument. The occurences of words Flac and FLAC will be replace in the name of the working director.y | |
#considering wd is /path/nameOfDirectory-FLAC, the new directory will be $1/nameOfDirectory-mp3. | |
#Needs 1 parameter : the path to save the directory containing the mp3 files. | |
var2=`pwd` | |
var1=${var2##*/} | |
var=${var1//FLAC|Flac/mp3} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#License CC-BY-NC-SA for the code, 4Chan licence for any 4Chan related content. | |
#This script downloads all pictures from a 4chan.org/ thread. | |
#Needs 2 parameters : first the link of the thread, the second the name of the folder where the pictures will be saved. | |
curl -L -s $1 | grep -o "\<a\ href\=\"//i.4cdn.[^ ]*\"" | cut -d"\"" -f2 | sed 's/^/https\:/' | xargs wget -P $2 |