Category Computer

SQL: Concatenate rows to a string list

Sometimes business wants a column in several rows concatenated to one string list. I found this gem: Still working on it, but here’s my cleaner code for better readabity: ;with basetable as ( SELECT id, CAST(name as varchar(max)) name, ROW_NUMBER() OVER(Partition By id order by countRecords) rowNumber, COUNT(*) OVER (Partition By id) countRecords FROM […]

Pentoo: Standard modifications

Use them a lot lately, so here they are in one place: # vim echo ‘” paste-mode from external programm set pastetoggle=<F2> ” displayed tab width set tabstop=4 ” indent tab width set shiftwidth=4 ” color scheme desert for nice 256 colors colorscheme desert’ >> /etc/vim/vimrc.local # screen echo “altscreen on caption always ‘%{= dg} […]

Compat-Drivers: Someone has to do it

How the hell did this happen … Shall I or not … oh well … My new laptop has an Atheros AR8161 ethernet device, which needs an alx kernel module. That’s how it started some months ago. Found out that the alx module is part of compat-wireless, which was only available from the Pentoo overlay. […]

Grub with virtio disk

When coding around with the pentoo-installer in virtual machines, grub simply refused to detect the virtual device mounted on /dev/vda. The solution was in this article: # grub > device (hd0) /dev/vda > root (hd0,0) > setup (hd0) > quit Also put this in /boot/grub/ (hd0) /dev/vda

Gentoo : Autoconfigure number of CPU in make.conf

Ever wanted a script that just adapts make.conf to number of cpu cores. Well, here’s my script, surely improvable but maybe useful. It will count the number of cpu nodes. Then make.conf gets backuped and edited accordingly. Example: We have 8 cpu cores, so anything like: MAKEOPTS=”-j2 MAKEOPTS=”-j2 -l1“ MAKEOPTS=”${MAKEOPTS} -j5 -l3.85“ EMERGE_DEFAULT_OPTS=”${EMERGE_DEFAULT_OPTS} -j4 –load-average=3.75“ […]

Linux: Rick Farina The Hacker Ethos meets the FOSS ethos

Great speech about open source: 3 1 2 Rick Farina The Hacker Ethos meets the FOSS ethos or

Pentoo: Modifying the LiveCD

Attention: I should retest the commands, until then there might be some typos. But the basic procedure should work and I’ve used the commands successfully. Intro This post should sum up the steps to modify an ISO image of a LiveCD. I’m using the public beta Pentoo 2012.0 Defcon Release as example. The steps for […]