Wednesday, January 5, 2011

Example Dyndns Config file

/etc/ddclient.conf file

# Configuration file for ddclient generated by debconf
#
# /etc/ddclient.conf

#comment out next line if you don't run a mail server
mail=root

daemon=300
pid=/var/run/ddclient.pid

protocol=dyndns2
use=web
#, web=checkip.dyndns.com, web-skip='IP Address'

server=members.dyndns.org
login=login-name
password='replace-with-real-password'

mydomainname.dyndns.org

Monday, December 20, 2010

Automatically backup a Rivendell database

I have just discovered that there is a Rivendell Macro for backing up
a database as often as you wish.

DATABASE BACKUP

Mnemonic: DB
Syntax:
DB !
Create a backup copy of the active Rivendell database in .

On my set up I made a new macro called back up database. It has only 2
lines in it.

DB /home/geoff/Downloads/RivendellBackUp/RD-Backup.sql!
RN /home/geoff/Downloads/RivendellBackUp/datestamp.sh!

The first line makes a new sql file called RD-backup.sql
The second line runs a shell script that renames the backup sql file
to the current day's date.

#!/bin/bash

#Special program to rename the current database back up with todays date.

#NOTE If sharing created files with windows users Colons eg : cannot be in filenames
#I suggest doing the date variable creation like this.
# currentdate=`date +%F-%H.%M.%S`
currentdate=`date +%F-%X`

sleep 30
mv ~/Downloads/RivendellBackUp/RD-Backup.sql
~/Downloads/RivendellBackUp/RD-$currentdate.sql


Note
I found that sometimes the Rivendell macros crash rdairplay so I now run from a command line the following script..... 


#!/bin/bash

currentdate=`date +%F-%X`

echo $currentdate

mysqldump -u rduser -pletmein --lock-tables=false Rivendell > /home/geoff/rivendell-backup/RD-$currentdate.sql



You can set up this macro to run daily weekly or whenever.

Rivendell Time Pips at the Top of Hour by Frederick JH

These instructions were written by Frederick JH and are very good

I made a pips tone audio file using Audacity. Using Generate>Tone from the
Audacity menu, I made a 800Hz, 3 seconds long audio file. I then used the
envelope tool to make 4 pips by pulling the audio level to nothing. The
first three pips are 150ms long starting on the 0 seconds, 1 second and 2
second marks. The fourth started at 2600ms and continued to the end of the
3 seconds.

Go into RDLibrary and create a macro cart. Call it something like "Pips
fade down and up". Then add the following three lines:

MD 1 -9 500!
SP 3000!
MD 1 0 1!



Then go into RDCatch and schedule this macro cart each hour at ??:59:57
Then again in RDCatch schedule a playback of your pips audio cart each
hour at ??:59:57

You need to have a playback output setup in RDAdmin>Manage Hosts> select
your host >Edit>RDCatch>Play Deck Setup a Play Deck to the same Card: and
Port: numbers as one of the Main Log outputs in RDAdmin>Manage Hosts>
select your host >Edit>RDAirplay

What is not real obvious is that you can setup more than one playback deck
for RDCatch. Just select another Play Deck number from the drop down then
set the Card: and Port: numbers to some thing other that None.

Explanation of the RML commands


MD 1 -9 500! => Deck fade Main Log(1) to -9dbFs in 500ms
SP 3000! => Sleep for 3 seconds (3000ms)
MD 1 0 1! => Deck fade Main Log(1) to 0dbFs in 1ms

One other tip, as you may be dreading making all those 48 events in
RDCatch there is a way to "copy" events. Make your original event save it,
then open it again to edit it. Next make the need changes for the new
event, in this case change the hour on the start time, then click the
"Save as New" button.


http://rivendell.tryphon.org/wiki/How_to_play_time_tone_pips_and_fade_the_currently_playing_audio

Tuesday, January 19, 2010

Backup, Repairing and Reinstalling GRUB

1. Boot your computer up with Ubuntu Live CD
2. Open a terminal window or switch to a tty.
3. Change to SuperUser (that is, type "sudo -s"). Enter root passwords as necessary.
4. Type "grub"
5. Type "find /boot/grub/stage1". You'll get a response like "(hd0,1)". Use whatever your computer spits out for the following lines.
6. Type "root (hd0,1)", or whatever your hard disk + boot partition numbers are for Ubuntu.
7. Type "setup (hd0)", to install GRUB to MBR, or "setup (hd0,1)" or whatever your hard disk + partition nr is, to install GRUB to a partition.
8. Quit grub by typing "quit".
9. Reboot and remove the bootable CD.

These instructions from https://help.ubuntu.com/community/GrubHowto

Sunday, November 15, 2009

Bulk renaming of file extensions

#!/usr/bin/perl

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2
# as published by the Free Software Foundation.
#

# Thanks Monica for making this code :)

# This program is used for changing file extensions on files
# eg.
# perl mvfiles.pl /home/username/filelist.txt
# NB file list cannot have \ (backslash) character in them.

# If you want log file of transformation send to log file
# perl mvfiles.pl /home/username/filelist.txt > conversion.log

# syntax of filelist.txt
# multiple lines similar to below
# "/home/username/filename1-you-want-to-change.mp2"
# "/home/username/filename2-you-want-to-change.mp2"
# "/home/username/filename3-you-want-to-change.mp2"

$csvfilename = "$ARGV[0]";


open(HANDLE, $csvfilename) || die ("Couldn't open that file");

@raw_data=;

close (HANDLE);

#read each line
foreach $line (@raw_data)
{
chomp ($line);
$line=~ s/"//g;
$oldfile=$line;


# old extension / new extension
$line=~ s/mp2/mp3/;


# prints new file name to screen
print "$line\n";

system(mv,$oldfile,$line);

}

Friday, November 13, 2009

This is the original /etc/rd.conf

[Identity]
Password=*******
AudioOwner=ownername
AudioGroup=users

[Tuning]
UseRealtime=No
RealtimePriority=9

[Format]
SampleRate=44100
Channels=2

[mySQL]
Hostname=localhost
Loginname=owner
Password=********
Database=Rivendell
Driver=QMYSQL3

; [SoftKeys]
;
; This section can be used to program the RDSoftKeys applet, or you
; can use the --map-file= switch to configure multiple soft
; key setups on the same host.
;
; Columns=10
;
; Command1=hithlum.srlabs.loc:GO 3 1 1 0!
; Legend1=Telos 1 ON
; Color1=red
;
; Command2=hithlum.srlabs.loc:GO 3 2 1 0!
; Legend2=Telos 2 ON
; Color2=red
;

[Hacks]
; If you are getting no output level meter indications with an older
; ASI card (such as the ASI4215, ASI4113 or ASI4111), tru uncommenting
; the following line:
# UseStreamMeters=Yes

;
; Log Generation
;
; These are mainly useful for debugging!
;
[RDAirPlay]
Logfile=/home/username/rd/rdairplay.log
;
[RDCatchd]
Logfile=/home/username/rd/rdcatchd.log
;
[Ripcd]
Logfile=/home/username/rd/ripcd.log
;
[Caed]
Logfile=/home/username/rd/caed.log
EnableMixerLogging=No

#[Cae]
#AudioRoot=/var/snd
#AudioExtension=wav
#AllowNonstandardRates=Yes


;
; JACK Session Management
;
; See the 'JACK.txt' file for details on how this works!
;
; [JackSession]
; Source1=rivendell_1:playout_0L
; Destination1=alsa_pcm:playback_1
;
; Source2=rivendell_1:playout_0R
; Destination2=alsa_pcm:playback_2
;
; Source3=rivendell_1:playout_1L
; Destination3=alsa_pcm:playback_3
;
; Source4=rivendell_1:playout_1R
; Destination4=alsa_pcm:playback_4
;
; Source5=rivendell_1:playout_2L
; Destination5=alsa_pcm:playback_9
;
; Source6=rivendell_1:playout_2R
; Destination6=alsa_pcm:playback_10
;
; Source7=alsa_pcm:capture_1
; Destination7=rivendell_1:record_0L
;
; Source8=alsa_pcm:capture_2
; Destination8=rivendell_1:record_0R
;
; Source9=alsa_pcm:capture_3
; Destination9=rivendell_1:record_1L
;
; Source10=alsa_pcm:capture_4
; Destination10=rivendell_1:record_1R
;
; Source11=alsa_pcm:capture_9
; Destination11=rivendell_1:record_2L
;
; Source12=alsa_pcm:capture_10
; Destination12=rivendell_1:record_2R

Monday, August 31, 2009

Small Tip - make your tab completion case insensitive

You may know that if you have a directory called

My-Documents

and you want to change to it, you have to do something like this

cd My-[TAB]

And you will end with the full command like this.

cd My-Documents

But, if you do this

cd my-[TAB]

You will probable hear the system's beep and nothing else, because Linux is case sensitive, if you want to be able to use TAB with capital letter or without it, add this line to /etc/inputrc, or to $HOME/.inputrc

set completion-ignore-case on

Now it will work with the capital My-Doc... or without it as in my-doc ...


(This tip from...)

http://www.go2linux.org/case-insensitive-TAB-completion-inputrc