Skip to content

Instantly share code, notes, and snippets.

@51114u9
51114u9 / change_background.sh
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
path="/media/data/background"
if [ -d "$path" ]; then
filename=$(find $path -type f | shuf -n 1)
@51114u9
51114u9 / josm_gridlines.sh
Last active October 6, 2020 20:41
Generate coordinate lines (lat & lon) for use in JOSM
#!/bin/sh
# Written by Vincent de Philly (https://help.openstreetmap.org/users/867/vincent-de-phily)
# Improved by Marco Antonio Frias
#
# This script was sugguest written in help forum to answer the question "Coordinate lines in josm?"
# https://help.openstreetmap.org/questions/9273/coordinate-lines-in-josm
file=gridlines.gpx
@51114u9
51114u9 / pdf2png
Last active May 6, 2020 23:41
convert pdf to png files with inkscape
inkscape ".pdf" -z --export-dpi=600 --export-area-drawing --export-png=".png
@51114u9
51114u9 / recorddesktop.sh
Last active December 26, 2015 16:18
Record a video (ogv) using as input the screen and the audio channel available
#!/bin/sh
FFMPEG=$(which ffmpeg)
# frame size, widthxheight (execute: xwininfo -root | grep 'geometry' | awk '{print $2;}')
SIZE="1600x900"
# video codec
VCODEC=libtheora
@51114u9
51114u9 / png2video
Created October 27, 2013 06:20
Create a video file using images and audio
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
51114u9 / speed_firefox
Last active October 6, 2020 20:13
Script to optimize the SQLite databases in Firefox
1. Close Firefox
2. Execute this:
find ~/.mozilla/firefox/ -type f -name '*.sqlite' -exec sqlite3 {} 'VACUUM;' \;