Skip to content

Instantly share code, notes, and snippets.

#see https://www.raspberrypi.org/forums/viewtopic.php?p=156529&sid=7e40f2ca13cc5c5579cf0f610a60016a#p156529
# Here are some aliases to put in ~/.bashrc to simplify the commands.
#
#
# Increase volume by 5%
alias volu='sudo amixer set PCM -- $[$(amixer get PCM|grep -o [0-9]*%|sed 's/%//')+5]%'
# Decrease volume by 5%
alias vold='sudo amixer set PCM -- $[$(amixer get PCM|grep -o [0-9]*%|sed 's/%//')-5]%'
@lagaisse
lagaisse / pdfpostermass
Last active June 22, 2017 15:55
manipulation of pdf files
#!/bin/bash
# by sputnick, modified by kla
# utilisation : ./pdfpostermass */*.pdf
ebookdir=./doc
shopt -s nocaseglob nullglob extglob
prename "s/ /_/g" "$@"
for f; do
#!/bin/sh
# Usage: ./remove_orphans.sh [-f]
# Remove orphans from the dlna mediaserver on synology
# from http://wacha.ch/wiki/synology
[ "$1" = "-f" ] && REMOVE=1
IFS='
'
for db in music video photo; do
#!/bin/sh
# Copyright 2015 Kevin Lagaisse
#
# Add lits of IP to be blocked in download station on my synology
#
sh /var/packages/DownloadStation/scripts/start-stop-status stop
cd /var/packages/DownloadStation/scripts/
sed -i -e 's|\(^\s*rm ${PACKAGE_DIR}/etc/download/settings.json\)|####LINE-REMOVED####|' ./start-stop-status
sox msg0000.wav --bits 16 --encoding signed-integer --endian little msg0001.raw
rtl_fm -f 101.9M -M fm -s 170k -A fast -r 32k -l 40 | play -r 32k -t raw -e s -b 16 -c 1 -V1 -
#listen to fm radio @ specific frequency and remove evrything below 1.8kHz
#need to tun gain (g) and squelch (l parameter) in accordance to gain
rtl_fm -f 467.675M -M fm -s 170k -A fast -r 32k -g 60 -l 10 | play -r 32k -t raw -e s -b 16 -c 1 -V1 - sinc -1.8k
@lagaisse
lagaisse / dts2aac.sh
Created July 10, 2015 20:17
Convert AC3 DTS audio to AAC with ffmpeg on Sinology NAS
#convert AC3 DTS audio to something compatible with portable devices, ie AAC (licence issue with DTS)
nohup ffmpeg -i yourmovie.mkv -c:v copy -ac 2 -c:a libfaac -b:a 128k themovieiwant.avi &