Some useful (or not) scripts
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
gardouille 365544d343
Add tiny sample script to display upgrades
4 weeks ago
debian Symlink bat to /usr/bin/batcat 1 year ago
dmenu Add some scripts for dmenu. To rewrite :) 9 years ago
games Add Ori and the Will… backup 1 year ago
github Ignore alpha|beta version for Jellyfin 1 year ago
greasemonkey Add some useful greasemonkey scripts. 9 years ago
update-motd.d Add tiny sample script to display upgrades 4 weeks ago
.gitignore Add `fd` version 6.1.0. 6 years ago
ApacheDirectoryStudio Add symlink to Apachedirectorystudio 4 years ago
README.md Add pomodorrior. 6 years ago
SoustitreDownloader.php Change screen position 7 years ago
TODO.md Add Bash_quote, firewall and Flac_to_mp3 documentation. 8 years ago
actions Add some scripts for dmenu. To rewrite :) 9 years ago
ansible.vault.101010.sh Script to auto open/use vault for 101010 4 years ago
ansible.vault.ipr.sh Rename the vault script 5 years ago
apt-fast Add apt-fast script. 8 years ago
backup_config.sh Change screen position 7 years ago
backup_pirate_usb.sh Change screen position 7 years ago
bash_quote Add a timeout to avoid infinite connection 2 years ago
bashblock Change screen position 7 years ago
bat Symlink bat to /usr/bin/batcat 1 year ago
bemoji Bemoji symlink to git repository 6 months ago
bepo_azerty.sh A script to switch my keyboard and WM configuration bépo <-> azerty 9 years ago
bkp_cluster_file Change screen position 7 years ago
btrfs.clean.snapshot.sh Symlink bat to /usr/bin/batcat 1 year ago
change_git_user.sh Use github script to change commit's author 7 years ago
commandes_utiles Change screen position 7 years ago
compile_latex Change screen position 7 years ago
cue.to.flac.sh small script to split flac+cue to flac tracks 2 years ago
dl_plowshare.sh Change screen position 7 years ago
doku2moin.sh Change screen position 7 years ago
download_lirescan.sh Change screen position 7 years ago
download_online_manga.sh Change screen position 7 years ago
ecran Use loaded var if available 2 years ago
emy_sms.py Change screen position 7 years ago
exa Update exa to v0.10.1 2 years ago
exa-linux-x86_64-0.10.1 Update exa to v0.10.1 2 years ago
explorer.exe Add explorer.exe backend possibilities 1 year ago
ext.add.sh Script to add extension to a list of files 2 years ago
ext.delete.sh Script to delete the extension of a list of files 2 years ago
fd Symlink fd to /usr/bin/fdfind 1 year ago
ff.extract.subs.sh New ffmpeg scripts 6 months ago
ff.to.x265.sh New ffmpeg scripts 6 months ago
firewall Firewall: Add a rule for HP printers on port 9100 8 years ago
flac_to_mp3 Correct variables name in flac_to_mp3 script: error if the variable 9 years ago
fpm Change screen position 7 years ago
git-loc Add some other scripts from Ivan Tikhonov. 9 years ago
gotop Add gotop 5 years ago
idok-x86_64 Change screen position 7 years ago
jolla_connect Change screen position 7 years ago
jolla_mount Change screen position 7 years ago
jolla_usb_tethering.sh Change screen position 7 years ago
keyboard.sh Manage Dell laptop keymap 2 years ago
km Disable debug and add short link (km) 3 years ago
kmail.sh Search contact with first arg and grep with second 3 years ago
kodi.controller.sh Try to start Kodi only for localhost command 3 months ago
kodi.youtube Allow to set IP Addr as argument 1 year ago
launch_thyme Add a tiny script to launch Thyme in some case 6 years ago
log_zenity_generator.log Change screen position 7 years ago
loran_warez.sh Upgrade to exa v0.9.0-dev from repos. 6 years ago
make_win_usb make_win_usb: Need a FAT32 FS on the USB key to be able to install 8 years ago
manette360 Add scripts to manage Wii and Xbox 360 gamepad. 9 years ago
mangareader.net_download.rb Download scan from mangareader.net 5 years ago
move.pulseaudio.sink Pulseaudio script to move stream to choosen sink 4 years ago
mpd.controller.sh Support rofi|menu commands to start mpd.rofi.sh 4 weeks ago
mpd.rofi.sh Set "auto" as default behaviour if not argument 1 year ago
mpv.clipboard.sh Start a mpv with socket from clipboard content 4 months ago
mpv.controller.sh Manage next/previous track 3 months ago
ms-sys Update ms-sys to version 2.7.0 3 years ago
multimedia.controller.sh Fix MPV IPC socket path regex 5 months ago
netaddr Upgrade to exa v0.9.0-dev from repos. 6 years ago
netboot.c Add some other scripts from Ivan Tikhonov. 9 years ago
num_circle Add num_circle script to transform a number into a digit with a circle. 8 years ago
pomo Short link to pomodorrior 3 years ago
pomodoro pomodoro: Also toggle the sound after the break 8 years ago
pomodorrior Unmute|mute and pause current player 4 weeks ago
printscreen Kill flameshot process once screen captured 3 years ago
procstat.c Add a script to show informations of a process. 9 years ago
pubkey.sh Change screen position 7 years ago
qb Update rofi options 1 year ago
qutebrowser Move Qutebrowser bin selection to dedicated script 3 years ago
qutebrowser-git Update qutebrowser command from git repo 2 years ago
remount Change screen position 7 years ago
remove_pdf_watermark.sh Ensure to remove temp files. 7 years ago
rename_meurice_podcast rename_meurice_podcast : now also manage file as first argument. 7 years ago
resize_img A script to resize images with convert. 9 years ago
rocketchat-desktop Add rocketchat-desktop symlink to /opt install 2 years ago
rofi-pass TERM_EMULATOR is now defined in ZSH config files 4 months ago
rofi-pulse-sink.sh Set description and update rofi command 1 year ago
rofi-task.sh Task: Use delimiter to search tasks 1 month ago
rubygems-cabin-test Change screen position 7 years ago
save.battery.sh Decrease brightness 3 years ago
save_qutebrowser_buffers.py Add save_buffers script for Qutebrowser 3 years ago
scdl Change screen position 7 years ago
screen.to.0x0 Kill flameshot process once screen captured 3 years ago
screenshot Add screenshot symlink to printscreen 3 years ago
script_shell Change screen position 7 years ago
sed_expression.exemple Change screen position 7 years ago
seeksinglucky.py Change screen position 7 years ago
send.to.0x0.sh Disable debug for 0x0 script 3 years ago
send_to_kodi Change screen position 7 years ago
setup.vpn.sh Symlink to a script to setup VPN 4 months ago
shell_color.sh Add shell_color.sh a tiny script to show how to use color with a shell 8 years ago
sleep.to.disk.sh Add scripts for all sleep mode 2 years ago
sleep.to.freeze.sh Add scripts for all sleep mode 2 years ago
sleep.to.mem.sh Add scripts for all sleep mode 2 years ago
sms.py An old script to send sms from a gmail account. Probably not working but 9 years ago
snapsend.sh Snapsend: 9 years ago
ssl.date.sh Script to get SSL cert's dates from URLs 2 years ago
sslsrv Symlink bat to /usr/bin/batcat 1 year ago
sync_config_file.sh Change screen position 7 years ago
synchro_wiki.sh Rename depot to repos. 6 years ago
tag_photo.sh New script to add the directory name as an exif tag to images 7 years ago
tagmail.post Rename tagmail script. 6 years ago
tagmail.pre Rename tagmail script. 6 years ago
test_ssl3 Add test_ssl3 script to check if an LDAP server support SSLv3. 8 years ago
thyme Add Thyme bin https://github.com/sourcegraph/thyme 6 years ago
tsclient Add short link to ts3client run script 3 years ago
turtl Add turtl symlink. 6 years ago
update_iso.sh Update versions 5 years ago
update_repo_git.sh Rename depot to repos. 6 years ago
upload-http-server.py New python webserver script for upload 4 months ago
url.shortme.sh Disable debug mode 3 years ago
veille.sh Update lock script 1 month ago
vimmanpager Add a "vim" pager (need a less.vim macro). 8 years ago
virtualenv Change screen position 7 years ago
weblink Add weblink script to easily share some files with a small webserver. 8 years ago
wget_list Change screen position 7 years ago
wiimote Add scripts to manage Wii and Xbox 360 gamepad. 9 years ago
winboot Exit on failure and refactoring 3 years ago
wol Add jdell host 8 months ago
youtube.embed Small script to open a given Youtube URL in embed mode 2 years ago
zenity_generator.sh Add a script to generate windows with zenity and bash. 9 years ago
zfSnap.sh Add zfSnap script from the legacy branch of the github project: 9 years ago
zsh_doc Change screen position 7 years ago

README.md

Scripts

Description:

Some useful scripts (for me) that can be added to $PATH :)

List:

  • apt-fast: Script for faster package downloading with 'axel'.
  • bash_quote: Get a random quote from http://danstonchat.com
  • droopy: Small webserver to allow upload on your machine.
  • firewall: A script shell to set some iptables rules.
  • update-dynmotd.d/: scripts to update the motd (via the /etc/update-motd.d directory).
  • flac_to_mp3: convert all flac files of a directory into mp3.
  • launch_thyme: Launch Thyme - apps tracker.
  • num_circle: Transform a number into a digit with a circle.
  • pomodorrior: A tiny pomodoro's timer for Taskwarrior.
  • pomodoro: Print a task and a timer in a file. Try to apply Pomodoro Technique!
  • snapsend.sh: Send a ZFS snapshot to a remote host.
  • tag_photo.sh: Add an exif tag to images.
  • test_ssl3: Test if a website supportes the SSLV3 protocol.
  • thyme: Automatically track which applications you use and for how long.
  • turtl: Symlink to my Turtl app (evernote alternative).
  • veille.sh: Kill every sensitive process and files then lock the screen.
  • vimmanpager: Tiny script can be used as PAGER, it will call VIM!
  • weblink: Tiny Python script that run a small webserver to share files.
  • winboot: Reboot the system to a windaube partition.
  • wol: Send WakeOnLan/magic packets to remote host.
  • zenity_generator: Script to generate zenity window.
  • zfSnap.sh: Take snapshot of a ZFS pool.

Apt-fast

Speed-up APT packages downloading with 'axel' (light command line download accelerator). Juste use it like aptitude/apt/apt-get.

sudo apt-fast full-upgrade

Bash_quote

Get a random quote from http://danstonchat.com with 'lynx'.

Droopy

Run a small webserver and allow user to upload files to a local directory:wq

### Firewall A shell script to apply some Iptables rules.

  • Rules are automatically apply only for the UP interfaces.
  • If it's detect some softwares (eg. Apache2), Iptables rules for ports 80/443 are automatically apply.
  • Special rules allow all traffic throught a VPN:
firewall vpn
  • If a local file exists (firewall.local) it will also apply it. For personnal rules for example.

Flac_to_mp3

Convert FLAC audio files to MP3 with 'avconv'.

  • Convert a directory:
flac_to_mp3 /media/data/bisounours_land_v2
  • Convert a file:
flac_to_mp3 /media/data/makarena.flac

Launch_thyme

A tiny script to launch Thyme (apps tracker) to be sure to avoid recording when the screen is lock,…

Num_circle

Tiny Bash script that take a number between 0 and 20 as argument and transform it into a digit with into a circle.

num_circle 18

Pomodorrior

A tiny timer to use the Pomodoro technique with Taskwarrior.

The script will:

  • Create the task if it doesn't exists.
  • Start the task for 25 minutes (default time).
  • Start a break time for 5 minutes (default time).

All informations will be printed in the Taskwarrior's directory: ${HOME}/.task/.current.task so you can then parse and print the content of this file into your systray, tmux's statusbar,…

Pomodoro

My implementation of the Pomodoro Technique (https://en.wikipedia.org/wiki/Pomodoro_Technique).

You can simply launch it with:

pomodoro "Work my french kiss"

Then the script will:

  • Create a ~/.pomodoro directory to store current task (current.task) and a summary of each week (eg week-42-2015.txt).
  • First, it's put task name and a timer (for $WORK_TIME) to the current task file.
  • Once the $WORK_TIME has been reached:
    1. Log task name and worked time to the weekly log file
    2. Toggle the sound to mark a pause
    3. It's put a pause/break message for 5/20 minutes as current task
    4. Delete the current task file

Disavantages

  • Must run the script every ~30 minutes
  • …?

Advantages

  • I can display my current task and it's timer wherever i want (tmux, herbstluftwm, …)
  • Written to work with /bin/sh

rename_meurice_podcast

I download some podcast from a RSS flux (http://www.franceinter.fr/emission-le-moment-meurice) but i don't like:

  • the filename
  • the title tag

So it's a tiny script to correct this. I get the date and the "real" title from the "title" tag and:

  • The filename become "$date_$realtitle.mp3"
  • The title tag become "$date_$realtitle"

"Le moment Meurice": http://www.franceinter.fr/emission-le-moment-meurice

The script manage both a directory and a file as first argument.

tag_photo.sh

The main goal is to have a solution to know the "subject" of a picture without to open it and no really good name. It can happen if you delete your pictures and get it back with photorec or foremost. For this i use the Exif metadata.

You can simply launch the script with your pictures directory:

tag_photo.sh /tmp/Images

Then the script will:

  • List all subdirectories.
  • Get the basename of each directory and add it as the value of the Exif "description" tag for each images.

To see the result, you can display the tags "File Name" and "Description" of you images:

find /tmp/Images -type f -iregex '.*\.\(jpg\|gif\|png\|jpeg\)$' -exec exiftool {} -FileName -Description \;

Test_ssl3

Redhat's script to test if an LDAP server support SSLv3.

You could also use a nmap command:

nmap --script ssl-enum-ciphers -p 443 ldap.tld.org | grep "SSLv3: No supported ciphers found"

Thyme

A tracker to know which applications you use and for how long. It's just the binary from the Github's repository.

I launch it with launch_thyme to avoid to record when the screen is lock. Everything is called with a Systemd unit (service and timer).

Turtl

Simple symlink to my turtl app.

See Turtl's official website for more informations.

Python program that run a small webserver (BaseHTTPServer) to easily share some files.

  • eg:
weblink /tmp/goodbye.file
HTTP server running at http://localhost:8888/
^C^C received, shutting down server
  • With a password:
weblink --pass=die /tmp/kitty.file
HTTP server running at http://localhost:8888/die

Winboot

Tiny script to reboot the system to a windaube partition.

Be sure to set the correct value to WIN_GRUB variable which must be the number of the windoze partition in Grub. Be careful, the grub's entries start at 0.

  • The script will also modify the grub configuration:
    • Set Grub in "saved" mode.
    • Ensure to set the previous default entry with grub-set-default.
  • Then for the reboot:
    • Choose the grub entry for the next reboot.
      • Reboot the system with systemctl.