Entries tagged as programmingRelated tags bash bug image processing internet mathematics nautilus software usenet video debian bluetooth german gnu-linux google earth hardware kernel migration phone postfix fail android anti-spam austria career fun gentoo google finance crypto gnucash perl rant sustainability comic cw geography antenna automobile ballooning education event history review samsung music podcast privateTuesday, April 22. 2008CUDA on Debian lenny![]() CUDA is a technology by NVIDIA to accelerate scientific computations by the help of GPUs. Unfortunately, Debian isn’t supported officially yet. The toolkit for Ubuntu should come closest to it. First, the toolkit has to be installed, e.g. to $HOME/share/cuda, and then the SDK, e.g. to $HOME/share/NVIDIA_CUDA_SDK. These two paths shall be referred to as $CUDA_PATH and $SDK_PATH in the following. GCC and g++ have to be downgraded to version 4.1 (from ‘etch’), as 4.2 (from ‘lenny’) doesn’t work with CUDA yet. Like described in $SDK_PATH/ReleaseNotes.html, $CUDA_PATH/bin has to be in the $PATH and $CUDA_PATH/lib in the $LD_LIBRARY_PATH. Unfortunately, this isn’t enough for Debian to successfully compile the examples (via cd $SDK_PATH && make): The $CUDA_INSTALL_PATH in line 38 of the Makefile $SDK_PATH/common/common.mk has to be corrected to the $CUDA_PATH. To compile the GLUT code, the development package freeglut3-dev has to be installed. With that it’s now possible to compile the examples; the binaries go into $SDK_PATH/bin/linux/release.
Posted by Stephan Paukner
in GNU/Linux
at
08:52
| Comments (2)
| Trackback (1)
Defined tags for this entry: debian, programming
Monday, February 25. 2008Debugging the bash![]() It’s a really good tip to use the -x flag to debug bash scripts. I had a problem that GDM wasn’t starting anymore after the regular aptitude upgrade. I didn’t find a hint in the log files and had a look at its init-script /etc/init.d/gdm, which appeared quite complex to me: It sources various config files and calls macros that are defined in there. How the heck should I trace the problem down? The best way was to change the initial line to CODE: #!/bin/sh -x what starts the debug mode when the script is invoked. Here’s what it does: It prints every single command that is executed line by line in a fully expanded form, no matter if macros were defined or several other shell scripts are invoked from within. The lines are indented by a sequence of plus symbols to represent the invocation depth of the other scripts. By this, I saw that the last calls referred to splashy, a bootsplash package that I had installed for test purposes but never had configured. The solution was to simply remove that package. Another tip: Don’t do experiments on a system that is supposed to work! This also means to not install the complete Debian ‘testing’ version on it. If you need a selected number of some more recent software, upgrade it individually, but keep the basic packages ‘stable’. On the other hand, you wouldn’t learn much if you weren’t forced to fix things once in a while.
Posted by Stephan Paukner
in GNU/Linux
at
06:55
| Comments (0)
| Trackbacks (0)
Defined tags for this entry: bash, programming
Saturday, November 4. 2006Host automatically up and down![]() For the usage of a local backup host, I defined the following scenario, which could also be used for a printer server or any other type of host, which shouldn’t run 24/7, but:
And here’s the shell-script which implements the above. It’s enough to have it run every five minutes. The “echoes” are only interesting for debugging purposes. Continue reading "Host automatically up and down"
Posted by Stephan Paukner
in GNU/Linux
at
18:05
| Comments (0)
| Trackbacks (0)
Defined tags for this entry: bash, programming
Monday, October 9. 2006Password generator in bash![]()
#!/bin/bash
# Number of letters as argument, default 7 if [ “$1” != “” ]; then num=$1 else num=7 fi generate() { # Take 1 block from /dev/urandom, encode it base64, # remove first two and last status line, purge capital letters and # special characters from output, cut desired length from front # sed with [A-Z] doesn’t work with Suse - typical! password=$(dd if=/dev/urandom count=1 2>/dev/null | uuencode -m - \ | head -n 2 | tail -n 1 | sed -e ’s:[/+A-Z]::g’ | cut -c -$num) } # Repeat until letters AND digits occur while true; do generate if echo $password | grep [a-z] | grep [0-9]; then break; fi done
Posted by Stephan Paukner
in GNU/Linux
at
07:43
| Comments (0)
| Trackbacks (0)
Defined tags for this entry: bash, programming
Wednesday, February 15. 2006Generating passwords in Lotus Notes![]()
_Weed := @Text(@Today) + “ ” + @Text(@Time(@Now));
_Cannabis := @HashPassword(_Weed); _Tobacco := @LowerCase(_Cannabis); _Hand := @ReplaceSubstring(_Tobacco; “(”:“)”:“/”:“+”:“o”:“l”; “”); _Side := 7; _Pass_The_Cutchie_On_The := @Left(_Hand; _Side);
Posted by Stephan Paukner
in Information Technology
at
11:52
| Comments (0)
| Trackbacks (0)
Defined tags for this entry: fun, programming
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, 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 2, totaling 15 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 |