Archive for the ‘Thoughts’ Category.

VirtualBox as a service on windows

http://vboxvmservice.sourceforge.net/

DON’T run the service using the Administrator account!

Steps required to run it as a “regular” user:

Start “secpol.msc” as Administrator
Select the “Local Policies” folder
Select the “User Rights Assignment” folder
Double click “Log on as a service”
Use “Add User or Group…” to add your non privileged user

open ports on windows

http://www.petri.co.il/quickly_find_local_open_ports.htm

redmine: move wiki-pages to a different project

currently just the commands:

SELECT id,name FROM projects;
SELECT * FROM wikis;
SELECT * FROM wiki_pages limit 10;
SELECT * FROM wiki_pages WHERE wiki_id = '1' AND title = 'Howtos';
SELECT * FROM wiki_pages WHERE parent_id = '34';
SELECT * FROM wiki_pages WHERE parent_id in (SELECT id FROM wiki_pages WHERE parent_id = '34');
UPDATE wiki_pages SET wiki_id = '12' WHERE wiki_id = '1' AND title = 'Howtos';
UPDATE wiki_pages SET wiki_id = '12' WHERE parent_id = '34';
-- UPDATE wiki_pages SET wiki_id = '12' WHERE parent_id in (SELECT id FROM wiki_pages WHERE parent_id = '34');
UPDATE wiki_pages SET wiki_id = '12' WHERE parent_id = '35';
UPDATE wiki_pages SET wiki_id = '12' WHERE parent_id = '87';

CSS / jscript annoyances on sueddeutsche.de

if you happen to use the NoScript addon for Firefox or sth. similar, sueddeutsche.de has a great new feature since the last design update: they pester you with an annoying panel covering (and hiding!) the rear part of the main headline…

to fight this obtrusive usage of jscript (the panel gets hidden if you enable jscript), use Firefox’ ability to include custom CSS:

echo '#weiterepanel { display: none; }' >> ~/.mozilla/firefox/*.default/chrome/userContent.css

finally, restart Firefox.
(yes, restart. see Bug 208641 for details.)

DreamBox (MPEG-TS) to DVD using Linux

my way to conveniently convert an MPEG “Transport Stream” (TS) to a DVD:

  1. open the TS-file with avidemux
  2. choose “yes” to index the MPEG
  3. select “Auto” -> “Optical Disc” -> “DVD
  4. click “save” to demux the MPEG-TS into an MPEG-PS
  1. open “DVDStyler”
  2. select “MP2” as audio format in the project wizard
  3. add the new MPEG file
  4. hit “burn”

done. demuxing and creating the iso takes usually less than 15 minutes.

dpkg vs. rpm: list of installed packages

MSSQL transaction log problems

so the transaction log of this stupid piece of software has completely filled up once again… that’s what worked for me last time:

1) DB -> Tasks -> BackUp

  • Backup Type: Transactional
  • Backup To: Disk
  • -> OK

2) DB -> Tasks -> Shrink -> Files

  • File Type: Data
  • press the “Script” button
  • press “OK”
  • hit “F5”

git cheatsheet

browsing the git history in a compact yet still highly condensed view containing all important information:

git log --graph --source --oneline --branches --tags

duplicating a postgresql DB

e.g. for testing purposes before touching valuable data…


  1. set the DB names

    ORIG_DB="orig_db_name"
    NEW_DB="new_db_name"


  2. create a dump (make sure to use a user having access rights to the db)

    TSTAMP=$(date +%F_%H-%M)
    FILE_ORIG="${ORIG_DB}_${TSTAMP}.sql"
    pg_dump -f ${FILE_ORIG} --blobs --create ${ORIG_DB}


  3. adjust the DB name in the dump and check everything went ok (the diff should be just in CREATE, ALTER and \connect statements)

    FILE_NEW="${NEW_DB}_based-on_${ORIG_DB}_${TSTAMP}.sql"
    sed "s/${ORIG_DB}/${NEW_DB}/g" ${FILE_ORIG} > ${FILE_NEW}
    vimdiff ${FILE_ORIG} ${FILE_NEW}


  4. adjust permissions for the new db (add the new DB name to the desired user(s)) and reload the postgres config

    sudo vim /etc/postgresql/8.4/main/pg_hba.conf
    sudo /etc/init.d/postgresql-8.4 reload


  5. load the new DB’s SQL-code into postgres

    psql -f ${FILE_NEW}


  6. to set identical permissions on the new DB, create a full dump using pg_dumpall, check the GRANT commands in the dump and apply them to the new DB as well…

nautic maps / navigation

wow: http://bodensee-navigationskarte.scbh.at/