./desc – quickly describe your files

Everytime I work on scientific projects, I deal with a massive amount of measurement data, lists and fragments of them etc. The problem is, that after several days or weeks, my “descriptive” filenames aren’t that descriptive anymore and I simply don’t have a clue what I did and what’s in the file. I thought it would be nice, if there was a database which holds files descriptions.

I came up with a tiny script which I placed in ~/bin (part of my $PATH) and called it “desc”. If you run it when you’re in a specific directory where you want to store description data for some files, simple type:

desc yourFileToDescribe

…and you will be promted to enter a description. The description is then stored in ./.DESCRIPTION.db and can be accessed via the “desc”-script anytime you’re in the working directory.

Here is the script, just try it out:

#!/bin/bash
# Tamas Gal - http://tamasgal.com
# desc v0.1
# this script creates a file-description-entry in ./.DESCRIPTION.db

FILE_TO_DESCRIBE=$1
FILE_DESCRIPTION=
DESCRIPTION_FILE="`pwd`/.DESCRIPTION.db"

if (( ${#FILE_TO_DESCRIBE} == "0" )) ; then
if [ -e $DESCRIPTION_FILE ] ; then
cat $DESCRIPTION_FILE
exit
fi
echo "No description(s) available."
exit
fi

if [ -e $DESCRIPTION_FILE ] ; then
if (( `grep "$FILE_TO_DESCRIBE: " $DESCRIPTION_FILE | wc -l` > "0" )) ; then
echo "`grep "$FILE_TO_DESCRIBE: " $DESCRIPTION_FILE`"
read -p "Edit (y/n)? "
[ "$REPLY" == "y" ] || exit
fi
fi

echo "Enter description for '$FILE_TO_DESCRIBE':"
read FILE_DESCRIPTION

if (( ${#FILE_DESCRIPTION} != "0" )) ; then
grep -v "$FILE_TO_DESCRIBE: " $DESCRIPTION_FILE > "$DESCRIPTION_FILE.tmp"
mv "$DESCRIPTION_FILE.tmp" $DESCRIPTION_FILE
echo "$FILE_TO_DESCRIBE: $FILE_DESCRIPTION" >> $DESCRIPTION_FILE
echo "done"
fi

GCC in Mac OS X 10.8 Mountain Lion – Xcode 4.3 / Xcode 4.4

Hah! So since I’m a registered developer, I installed the preview version of Mac OS X 10.8 Mountain Lion and of course Xcode 4.4 developer preview.

The operating system is stable as hell Lion, although Safari doesn’t like to parse RSS feeds ;-)

Today I wanted to compile the latest yarick release to do some simulations in quantum physics and discovered that neither cc nor gcc are located in “/usr/bin”. Instead they’re now inside the Xcode.app folder (which is normally located in “/Applications”).

Well, you can set the $PATH variable of your BASH/CSH-enviroment with (for bash):
export PATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:$PATH
Just put that line into your .profile or .bash_profile and you’re fine.

Unfortunately you’re not fine at all, if you need the “non-llvm”-version of gcc. This has disappeared in Mountain Lion. Hah! Get MacPorts and install the gnu-gcc if you need it ;-)

Funny Dubstep Videos

On the one hand, I still didn’t figure out whether I like or hate dub step, on the other hand, I’m complete sure that I love funny videos which are related to dub step ;-) Here are some funny or remarkable dub step videos…

Awesome Dubstep Commercial

Harry Potter Pole Dance

Finally: ChronoSlider 2.0 released ;-)

OK guys, it took nearly forever, but I finally managed to put it out. I hope you like it and waiting for you feedback! :-)

Of course, the update is free for everyone who already have purchased ChronoSlider before ;-)

More infos: ChronoSlider

 

 

 

 

ChronoSlider 2.0 is on the way!

The closed beta is closed (haha), app is submitted and now waiting for review…

And here is a sneak peek ;-) I hope you’ll like it!

ChronoSlider 2.0 coming soon!

ChronoSlider 2.0 coming soon!

ChronoSlider 2.0 closed beta started!

Only a few days and ChronoSlider 2.0 will be available on the Mac App Store. The closed beta has started!

Unfortunately it will be Lion only but since it is distributed over the Mac App Store, I hope that most of you have already upgraded!

So see ya! (got to learn theoretical physics ;-) )

ChronoSlider 1.1.2 is waiting for review!

The next big update of ChronoSlider will only support Mac OS X 10.7 (Lion), since I’m working on iCloud support and using some awesome new features of the new operating system.

That’s why I decided to put up a quick minor update before releasing the new major version, since there were some annoying memory leaks and some highly requested features which I really want to have in the Snow Leopard version, for those who won’t update to Lion.

Besides a huge code optimization, the main new features are setting a quick alarm without an alarm text (using right click when choosing the time) and repeating alarm sounds.

I hope you’ll like it!

YASDUT #4 (Line Numbering)

YASDUT #4

Line Numbering

To add line numbering to an existing file, you can simply use ‘nl’ which adds line number to a given input text and redirect the output to a new file:

nl foo.bar > foo.bar.num

Read the man pages for more options!

   Beat diabetes   Diabetes diet SEO
What is seo - Nofollow backlinks