New Graphics Card

Post dateSeptember 14th, 2011 by nogun in Home Net | 43 Comments »

Asus Radeon EAH6970 DC II/2DI4S/2GD5 2GB bought:

A first video.

Three Monitors

Post dateAugust 17th, 2011 by nogun in Computers, Home Net | 41 Comments »

2x 27″ 16:9 monitors purchased: Asus VE278Q

And still one ancient Dell 2405FPW (16:10). Eyefinity… here we come!

Update: A third VE278Q is now in use. Pure Eyefinity gaming :) Old Dell is now wall mounted at bar table for use with laptop or other devices needing extra screen area.

Infrastructre Meltdown

Post dateJuly 12th, 2011 by nogun in Home Net | 31 Comments »

For some reasons items in my life usally falls apart in dual – this time my broadband modem fell apart (Cisco EPC2607) as well as my bluetooth headset (MW600).

The support from my broadband supplier, ComHem, was OK. There was warrent left on my modem so a new one was sent free of charge. The new one arrived a few days later. Even though I said its OK to send the same type as I have, for some reason they sent me another type of modem – a Netgear CG3100 – with wireless included. The wireless is though turned off when I already is using an external access point in my infrastructure. (Good with a hot standby wireless solution though :) ).

The Bluetooth was no warrent left on. A new one was bought. It may be that the old one will come to live after a few resets/battery drains :-|

New speed in LAN

Post dateFebruary 13th, 2011 by nogun in Home Net | 24 Comments »

A new switch, Netgear GS108, was installed today, utilizing my exisiing CAT5-cables. Even faster to nowhere ;)

Scaled Display – Android Emulator from Eclipse

Post dateJuly 18th, 2010 by nogun in Android | 4,378 Comments »

I just bought a Nexus ONE Android device, and thought I should set up the SDK on my Windows 7, Swedish locale. Starting the emulator unscaled gave me a screen way too large, so I tried to start the emulator using the scaled display option. When started, I saw a number of black windows flying by, but no emulator was seen. When investigated what was started, using Process Explorer, I saw the emulator was started using -scale 0,5 (note the comma, not a dot as expected). OK, Eclipse constructs a command line, using some fancy ratio calculation, and the output is formatted according your current language. In my case Swedish where the fraction separator happens to be a comma.

Setting up Eclipse to run with an English locale solves the issue.  I added -nl en_US to the shortcut starting my Eclipse. Solved!

btpostprocess – process downloaded content

Post dateMarch 27th, 2010 by nogun in Home Net, Python, Tips, Uncategorized, Utilities | 7,601 Comments »

Do you have a lot of downloaded material, coming from bittorrent downloads, or from a FTP-session, where the content is encapsulated in big multi-volume archives like RAR and ZIP files (a.k.a. scene releases). Unpacking those archives can take a lot of manual effort before the actual content can be consumed.

This Python script tries to ease the burden of processing this kind of material, by investigating the directory and categorize its files as one of

  • archive, i.e. the files belongs to an archive, for example file.rar and file.001, etc. The archive also has a base file, that is, the first file in the archive, usually the file having the extension .rar in case of RAR-archives.
  • file, the file is an ordinary file, for example any *.nfo , and *.jpg file.
  • ignored, extra files, not needed for consumption, like those hash files (*.diz, etc.) used only to verify the downloaded content, and also sample, i.e a path matching *sample*.

The tool automatically unpacks the archives, and copies the files, to a given destination (or the current directory if you so like). Further, the destination directory can be derived  by removing a incoming base from the folder examined. The part left is appended to the destination given (or the current directory). Using this feature you can mimic  your content structure  within your download structure, without needing to create folders before moving the downloaded content into its final destination – all is taken care of within  btpostprocess.

Examples:

$ btpostprocess --process --incoming-base=/downloads/ready/pictures \
--base-path=/downloads/ready/pictures/cats \
/torrents/cats.torrent MyPictures

Finds archives and files in /downloads/ready/pictures/cats and a sub-folder indicated by the cats.torrent (or directly under /downloads/ready/pictures/cats) and unpack archives and copy files
into a cats sub-folder under MyPictures. The incoming-base is
used to construct a derived sub-folder under the destination folder.

Integration

The script was made with rtorrent in mind. By using  rtorrent’s  on finished capabilities the post processing can be set up using something like (version 0.8.2):

on_finished = process,"execute=btpostprocess,--incoming-base,/srv/incoming,--base-path,$d.get_base_path=,$d.get_tied_to_file=,/srv/depot"

Indicating downloads are to be found under /srv/incoming, and a folder given by the tied torrent file. Any files downloaded are unpacked (in case of archives) and copied into a sub-folder of /srv/depot.

In case you need to run some logic before spawning btpostprocess, for example, deciding if the download path is outside the normal download path, and in that case skip the post processing, all you need is to wrap the btprocess in a more specific on_finished script.

It’s all about automationDOWNLOAD TRACKER

Tags: , , , , , , , , , ,

Tips (på svenska)

Post dateJanuary 20th, 2010 by nogun in Tips | 1 Comment »

MS SQL Server

Exportera data

C:> bcp [<databas>].<dbo>.<tabell> out "out.dat" -c -U<anv.namn> -S<server_ip> -P<passord>

Importera data

Först måste tabellen trunkeras (DELETE FROM <tabell>. Sen importerar vi med

C:> bcp [<databas>].<dbo>.<tabell> in "out.dat" -c -U <anv.namn> -S<databas_target> -P<passord>

Jämför (kopiera) data från två olika databaser

Använd Micrsoft Access (funkar faktiskt ;) ) och dess möjligheter att länka tabeller; File -> Get External Data -> Link Tables. Länka in tabellerna i databas A samt de i databas B (innehållande samma tabeller). Ställ dem sida vid sida… Gör ett en Accessapplikation eller det du anser bäst….

Och just ja.. skapa först ODBC-datakällor och från dialogen Link Tables väljer du att öppna ODBC-källor.

(Använde detta för att kolla skillnaderna mellan EPiServer i utveckling och produktion)


New Apartment

Post dateOctober 1st, 2009 by nogun in Home Net, Life | 12 Comments »

New apartment purchased. Ok my idea for it to cost no more than two month salaries didn’t hold… I still earn to little money… Or maybe I live in a too costly area :-| Well. The apartment is though really nice.

Infrastructrure is setup,  with a Samsung A656 in the center, delivering crisp video from my HTPC (running MediaPortal), and from my H/K AVR5500 I can terror my poor neighbours ;)

What to come? Well more damping material in the living room, to stop some echo from the H/K. Hiding of some cables, some painting to to…. and ehh, there are things to do.

List all tags and branches for a file

Post dateAugust 14th, 2009 by nogun in Programming, Standards | 13 Comments »
cvs log file | sed -n '/^symbolic names:/,/^keyword/ {
/^symbolic names:/d
/^keyword/d
p
}'

Remove Empty Dirctories from Subversion

Post dateAugust 14th, 2009 by nogun in Subversion | 44 Comments »

A simple script to remove empty directories in a checked out subversion repository:

#!/usr/bin/bash

find . -depth -type d -name .svn | while read d; do
d=$(dirname "$d")
echo >&2 ">>>> $d <<<<"
if [ 1 -eq $(ls -A "$d" | wc -l) ]; then
echo >&2 "Removing..."
svn remove --force "$d"
fi
done
svn status

Tags: ,