Skip to content

Instantly share code, notes, and snippets.

51114u9 /
Last active October 28, 2020 05:49
Script to change desktop background in XFCE desktop
#!/usr/bin/env bash
# -*- coding: utf-8 -*-
# make this script executable and add it to the folder /etc/cron.hourly
if [ -d "$path" ]; then
filename=$(find $path -type f | shuf -n 1)
51114u9 /
Last active October 6, 2020 20:41
Generate coordinate lines (lat & lon) for use in JOSM
# Written by Vincent de Philly (
# Improved by Marco Antonio Frias
# This script was sugguest written in help forum to answer the question "Coordinate lines in josm?"
51114u9 / pdf2png
Last active May 6, 2020 23:41
convert pdf to png files with inkscape
View pdf2png
inkscape ".pdf" -z --export-dpi=600 --export-area-drawing --export-png=".png
51114u9 /
Last active December 26, 2015 16:18
Record a video (ogv) using as input the screen and the audio channel available
FFMPEG=$(which ffmpeg)
# frame size, widthxheight (execute: xwininfo -root | grep 'geometry' | awk '{print $2;}')
# video codec
51114u9 / png2video
Created October 27, 2013 06:20
Create a video file using images and audio
View png2video
ffmpeg -i audio.wav -f image2 -r 1 -i stellarium_%02d.png -c:v libx264 -b:v 2000k -c:a aac -strict experimental -b:a 320k -r 30 video.mp4
51114u9 / speed_firefox
Last active October 6, 2020 20:13
Script to optimize the SQLite databases in Firefox
View speed_firefox
1. Close Firefox
2. Execute this:
find ~/.mozilla/firefox/ -type f -name '*.sqlite' -exec sqlite3 {} 'VACUUM;' \;