Friday, December 16. 2005Changes between development and public directory![]()
I do testing in web development in that way, that the public website is stored in the public_html subdirectory, and the test site is located in develop_html. To see whether there are differences between those two sites, I use the following aliases:
alias changes=’dir=$(pwd|sed -e s:develop:public:); echo diff with $(echo $dir|sed -e s:$HOME:\~:); for file in $(for rcsfile in RCS/.??* RCS/*; do echo $rcsfile|cut -d, -f1; done); do echo “>>> $(basename $file):”; colordiff --no-banner $(basename $file) $dir; done’
That way only files I manage with RCS are checked, and I can do that call from any subdirectory of develop_html.
Posted by Stephan Paukner
in GNU/Linux
at
15:32
| Comments (0)
| Trackbacks (0)
Defined tags for this entry: bash, programming
Tuesday, November 15. 2005When screen segfaults![]()
# screen -r
Suddenly the Dungeon collapses!! - You die... # # strings $(which screen) | egrep [Yy]ou getpwuid() can’t identify your account! Cannot open your terminal ‘%s’ - please check. You are not the owner of %s. Unfortunatelly you are not its owner. You feel dead inside. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. You should have received a copy of the GNU General Public License along with this program (see the file COPYING); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. You can’t run screen on a hardcopy terminal. You can’t run screen on a terminal that overstrikes. Suddenly the Dungeon collapses!! - You die... Really quit and kill all your windows [y/n] Your termcap does not specify how to change the terminal’s width to %d. Your termcap does not specify how to change the terminal’s height to %d. Your termcap does not specify how to change the terminal’s resolution to %dx%d. Sorry, too late now. Place that in your .screenrc file. You are %s logging. ’%s’ tries to touch your session, but fails. The dead screen%s touch%s you. Try ‘screen -wipe’. You hear %d distant explosion%s. You may wish for a screen, what do you want? You see here a good looking screen: Your inventory: You regain consciousness. You must play from a terminal. The Keystone Kops are after you! getpwuid() can’t identify your account! KAABLAMM!!! You triggered a land mine! [ Passwords don’t match - your armor crumbles away ] The blast of disintegration whizzes by you! You add to your scroll of logging named “%s”. You start writing on your scroll of logging named “%s”. You don’t seem to have a scroll of logging named “%s”. You put away your scroll of logging named “%s”. You cannot escape from window %d! You no longer sense the watcher’s silence. You feel like someone is waiting for %d sec. silence... Your bell is no longer invisible. Suddenly you can’t see your bell! You no longer sense the watcher’s presence. You feel like someone is watching you... You destroy poor window %d (%s). You have a sad feeling for a moment... You escaped the dungeon. You drop a magic marker - Column %d Line %d You choke on your food: %d bytes from %s # Tuesday, October 18. 2005Tune your filesystem![]() Taken from the Gentoo Weekly Newsletter, 17 October 2005: ext2/3 are the main filesystems for a large amount of users but what a lot of people don’t know is that you can get almost Reiser4 speed out of it without any of the instability they’d associated with Reiser4. One of the great features of ext2/3 is the ability to tune it by adjusting various parameters. Let’s take some precautions, first of all by finding out if some of those parameter are already enabled, by running
CODE: # tune2fs -l /dev/hdXX
(replacing XX with your drive and partition your ext2/3 filesystem resides in). If you don’t see tune2fs in the list then we can enable it, and just in case you do see ‘dir_index’ in ‘Filesystem features’ then you have either enabled it already or it was automatically enabled for you. You are going to need a Gentoo LiveCD because changing parameters on mounted filesystems can cause problems, so in the interest of safety we are booting off the CD. At the start phase the Gentoo install system is booted into what’s called a “ramdisk” which is where the files needed are put into RAM to be used. mke2fs, tune2fs and other parts of the e2fsprogs package will be present at this stage. Now let’s turn on the feature with
CODE: # tune2fs -O dir_index /dev/hdXX
Do a filesystem check with
CODE: # e2fsck -D /dev/hdXX
Do that on any ext2 or ext3 partition and then reboot. You should notice the difference straight away. Thursday, October 13. 2005Promise not support the funWednesday, October 12. 2005From RAID-1 to RAID-5 on the fly![]() It was more complicated than I thought, but it finally was and therefore is possible to move a system from (Software-)RAID-1 using 2 disks to (Software-)RAID-5 using 3 disks without the help of an additional disk during transfer. Some things I had to keep in mind:
After that I could do the usual mounting, rsync’ing and dual booting, praying that no disk fails right in that “degraded array phase”. As everything seemed to work, I repartitioned hda and raidhotadd’ed it to the running system. The sync for the 147GB array took about 90 minutes. Wednesday, September 14. 2005Flush deferred messages in sendmail queue![]() Whenever sendmail has to deliver mails to other hosts which cannot be reached at that time, the messages are kept in the queue and are marked as “Deferred: Connection timed out”. Although the other hosts could be reached again and you want to tell sendmail to flush the mail queue, the command sendmail -q -v does not really try to reconnect to these hosts and still assumes that the connection timed out. The reason is that the hoststatus is cached, per default for a period of 30 minutes. Using sendmail -OTimeout.hoststatus=0m -q -v you can re-run the mail queue and force sendmail to reconnect to the hosts. You may want to define an alias for that, say, ‘sendmail-flush-timeouts’. You can set further options in /etc/sendmail.cf. Tuesday, August 30. 2005Creating panorama pictures![]() I successfully stitched together my first panorama pictures on GNU/Linux. I used the GUI frontend hugin, which itself uses autopano-sift for automatic detection of mapping points. For the actual stitching process I used enblend, but not from within hugin, as there currently is no possibility to watch it progressing. This tutorial helped me doing my first steps, more tutorials are available on hugin’s website. My first try was on a series of 3 pictures of a rainbow above Vienna, Austria:
Next, I created a panorama picture of a mountain view consisting of 8 pictures, which I took last october near Kitzbühel in Tyrol, Austria:
Installation of these tools was quite easy, as I use a distribution which includes such cutting-edge multimedia programs in its package tree: Gentoo Linux.
Posted by Stephan Paukner
in GNU/Linux
at
13:42
| Comments (0)
| Trackbacks (0)
Defined tags for this entry: software
Tuesday, July 26. 2005View uncommitted RCS changes![]() If RCS is used separately from CVS (e.g. for system configuration management), I sometimes want to know whether there are any uncommitted changes pending. Here’s my bash alias to get an overview: alias rcschanges=’for file in $(for rcsfile in RCS/.??* RCS/*; do echo $rcsfile|cut -d, -f1; done); do [ -f “$(basename $file)” ] && rcsdiff $(basename $file); done’ Maybe you want rcsdiff to be an alias for a home-made rcscolordiff, which itself simply calls rcsdiff $@ | colordiff --no-banner.
Posted by Stephan Paukner
in GNU/Linux
at
11:40
| Comments (0)
| Trackbacks (0)
Defined tags for this entry: bash, programming
(Page 1 of 7, totaling 49 entries)
» next page
|
AboutCalendar
ArchivesCategoriesShow tagged entriesandroid antenna anti-spam apache astronomy austria automobile ballooning bash bluetooth bug career cloud collecting comic cooking cw debian dreams education electronics event fail fashion finance flickr fuerteventura fun gentoo geography german gnu-linux gnucash google google earth graphics guitar hardware history image processing internet kernel kids language lanzarote lhc lifestyle linkroll literature ltd machine learning making mallorca mathematics matlab microsoft migration movies music numismatics octave pdf perl philately philosophy phone photo gear photography physics podcast politics postfix private programming public transport rant religion review samsung science security shtf social web software statistics storage sustainability symbian tablet time lapse transceiver tv usenet video virtualization wordplay work www yahoo youtube
Syndicate This BlogFollow meBookmarks
Powered by |