Dyndns ddclient (Readynas addon) configuration file

replace emailaddress, username, password, servername1, servername2, servername3 accordingly.
/c/webroot/ddclient/ddclient.conf:

daemon=600
pid=/var/run/ddclient.pid
cache=/ramfs/ddclient.cache
#do not activate ssl
ssl=yes
syslog=yes
mail-failure=emailaddress # Mail failed updates to user
use=web, web=checkip.dyndns.com/, web-skip=’IP Address’
#uncomment the line bellow
#enlever le # sur les lignes suivantes :
login=username
password=password
protocol=dyndns2
server=servername1,servername2,servername3
#wildcard=YES

Advertisements

Use an SOCKS5 proxy through an SSH tunnel

From calomel.org

ssh and direct connect (SOCKS5) :

The following line will start the ssh client and connect to username@remote_machine.com.

Port 8080 on localhost (127.0.0.1) will listen for requests and send them to the remote machine.

The remote machine will then send the packets out as if they originated from itself.
ssh -C2qTnN -D 8080 username@remote_machine.com
Leave it running. And just configure the SOCKS5 proxy in the browser (localhost:8080)

My Picard file naming scheme

This is my MusicBrainz Picard file naming scheme.
See this page for details.
$noop(Various Artist Albums)
$if($eq(%compilation%,1),
$if2(%albumartist%,%artist%)/
$left($if2(%originaldate%,%date%),4) %album%/
$if($gt(%totaldiscs%,1),$if(%discsubtitle%,CD %discnumber%: %discsubtitle%/, CD %discnumber%/),)
$num(%tracknumber%,2). %artist% - %title%,

$noop(Single Artist Albums)

$firstalphachar($if($eq($left($lower(%artist%),4),the ),
$right($upper(%artist%),$sub($len(%artist%),4)),$upper(%artist%)))/

$noop(Artist)
$if2(%albumartist%,%artist%)/

$if(%album%,
$noop(Album Tracks)
$if($eq($or(%originaldate%,%date%),1),
$left($if2(%originaldate%,%date%),4) %album%/,
%album%)/
$if($gt(%totaldiscs%,1),$if(%discsubtitle%,CD %discnumber%: %discsubtitle%/, CD %discnumber%/),)
$num(%tracknumber%,2). %title%,

$noop(Non-Album Tracks)
%title%
)

)

Find 2nd level directories without files with a certain extension

I have a lot of directories and subdirectories like:

abc/123/

abc/456/

def/789/

Some of them have jpeg files on them:

abc/123/

abc/456/foo.jpg

abc/456/bar.jpg

def/789/foo.jpg

I want to find the one that are missing a jpg

Learning from here I was able to get what I wanted with:

find . -mindepth 2 -maxdepth 2 -type d ‘!’ -exec sh -c ‘ls -l “{}”|egrep -i -q “*\.jpg$”‘ ‘;’ -print