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
#!/usr/bin/ruby | |
require 'fileutils' | |
require 'enumerator' | |
# crée le livret à partir des fichiers svg double page contenus dans le répertoire PagesRep | |
# nécessite : | |
# - des doubles pages dans pages/, dont | |
# - une page de garde (à droite dans le fichier 0.svg) | |
# - un fichier 'pages_blanches.svg' contenant deux pages blanches | |
# |
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
zenity_with_options = 'zenity --progress --title="Working..." --text="Analyse des journaux de mail... --auto-close' | |
IO.popen(zenity_with_options.split(' '), 'w') do |io| | |
for i in 1..10 | |
io.puts(i * 10) | |
sleep(1) | |
end | |
end |
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
def custom_dict_reader(csv_filename, delimiter="\t"): | |
with open(csv_filename) as csv_file: | |
header = list(map(str.strip, csv_file.readline().split(delimiter))) | |
line_num = 2 | |
for line in csv_file.readlines(): | |
splitted = list(map(str.strip, line.split(delimiter))) | |
if len(splitted) != len(header): | |
print("WARNING: the number of rows in line ({}) doesn't match the number of elements in header ({}) ! Row will be truncated".format( | |
len(splitted), len(header) | |
)) |
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
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Tris *experimental* program tries to "re-hash" waves files in "good order" after deletion then recover with photorec | |
on a FAT SD card; recorded in 4 chanels mode with Zoom H2n. | |
Does the job, but probably not compatible with other situations. | |
""" | |
import sys |
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
#!/usr/bin/python | |
import re | |
import subprocess | |
on_command = "synclient TouchpadOff=0" | |
off_command = "synclient TouchpadOff=1" | |
# TouchpadOff = 2 | |
match = re.search("=\s(\d)", subprocess.check_output("synclient | grep TouchpadOff", shell=True)) |
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
function fish_prompt --description 'Write out the prompt' | |
# save last status | |
set -l last_status $status | |
# last status | |
set last_status_string "" | |
if [ $last_status -ne 0 ] | |
set last_status_string (set_color --bold $fish_color_error)"($last_status)" | |
end |
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
/* Red trailing whitespaces (https://gist.github.com/brunetton/a55c6e8735eeee68067b) */ | |
atom-text-editor::shadow .lines .line { | |
.trailing-whitespace { | |
color: #ff2a2a; | |
background: #342022; | |
} | |
// Disable highlight for lines with a cursor on them | |
&.cursor-line .trailing-whitespace { | |
color: inherit; |