Published by admin on March 16th, 2010 in Development, Programmierung | No Comments
Hmmm… Kleine Fingerübung in Perl (pre-alpha
)
Ah ja: Brainfuck: http://lmgtfy.com/?q=Brainfuck
#!/usr/bin/env perl
use Term::ReadKey;
ReadMode 'raw';
my $debug = 0;
my $code;
if ($ARGV[0]){
{ local $/ = undef; local *FILE; open FILE, "<".$ARGV[0]; $code = <FILE>; close FILE }
}
$code ||=
">+++++++++[<+++++++++++++>-]<-.-----.+++++++
.>+++[>++++++++++<-]
>++.<<----.+++.
--------- . -------.>++++[<+++++>-]<+.>++++++++++.";
$code =~ s/[^\.,+-\[\]<>]//msg;
$| = 1;
my @val;
@val[ 0 .. 29999 ] = (0) x 30000;
my $vpt = 0;
my @ls;
my @le;
my $lpt = 0;
my $cc = 0;
my @c = split( '', $code );
my $nc = @c;
while ( $cc < $nc ) {
$_ = $c[ $cc++ ];
print "vpt:$vpt \$val[\$vpt]"
. $val[$vpt]
. " loop_counter:$loop_counter loop(counter)_start:"
. $ls[$loop_counter]
. " loop(counter)_end:"
. $le[$loop_counter]
. " cc:$cc command:$_\n"
if $debug;
/</ and do { $vpt and $vpt--; next };
/>/ and do { $vpt < @val and $vpt++; next };
/\+/ and do { $val[$vpt] = $val[$vpt] + 1; next; };
/\-/ and do { $val[$vpt] = $val[$vpt] - 1; next; };
/\./ and do { print chr( $val[$vpt] ); next; };
/\,/ and do { $val[$vpt] = ord( ReadKey 0 ); next; };
/\[/ and do {
if ( $val[$vpt] ) { $ls[ $lpt++ ] = $cc - 1 }
else { $cc = defined $le[$lpt] ? $le[$lpt] : (index($code,']',$cc)+1) }
next;
};
/\]/ and do {
$le[ --$lpt ] = $cc;
$cc = $ls[$lpt];
next;
};
}
print "\n";
Published by admin on March 10th, 2010 in Apple | No Comments
Umpft.
Ich konnte dem aktuellen http://www.macheist.com Nano-Bundle natürlich doch nicht widerstehen. Monkey-Islands war eine Versuchung wert und vor allen Dingen Tweetie 2.0.
Jetzt habe ich auch noch MacJournal dazu bekommen und bin eigentlich ziemlich begeistert.
- Blogging mit einem vernünftigen Client
- Verschlüsselung privater Einträge
- Export von Einträgen als HTML, PDF etc.
- Volltextsuche via Spotlight.
- Synchronisation via Mobile-Me (muss noch TeamDrive ausprobieren)
Und alle so „Yeah“!
P.S. Und die Probleme von Safari mit Wordpress brauchen mich jetzt auch nicht mehr zu kümmern
Published by admin on January 15th, 2010 in Politics | No Comments
@johnny von Spreeblick hat eine Spendenaktion für die Erdbebenopfer von Haiti in’s Leben gerufen.
Nicht, dass es nicht auch andere Wege des Spendens gäbe, aber das Problem ist ja (und das löst sich durch solche Aktionen halt), dass “man” (ja, auch ich) in der Regel den A… ja nicht hochkriegt.
Also: Wenn Ihr Eure Kontonummer noch kennt, einfach mal auf obigen Link clicken!
Danke sehr!
Published by admin on December 21st, 2009 in Hosting, Linux | No Comments
Problem: Centos did not boot after a failure with an LVM snapshot.
It got stuck at:
Setting up Logical Volume Management: (part of rc.sysinit)
Solution:
Boot:
1) grub “e” (to edit the first line)
2) append “init = /bin/bash” to kernel parameters
3) boot (Enter, “b”)
(append “Single” should work as well but it didn’t as far as I remember)
Console
1) mount / -o remount (enables rw mode)
2) vi /etc/lvm/lvm.conf
3) replace
locking_dir = “/var/lock/lvm”
by
locking_dir = “/tmp”
(this is because “lvremove” does not recognize the –ignorelockingfailure parameter)
4) cd /sbin
5) ./lvm.static lvdisplay –ignorelockingfailure (not sure if this param is necessary after editing lvm.conf)
6) Find the snapshot path: /dev/your_volumegroup/your_logical_volume_snapshot
7) remove: ./lvm.static lvremove /dev/your_volumegroup/your_logical_volume_snapshot
reboot
9) be happy as it works now!
10) ask yourself if you should have re-edited lvm.conf…
I have forgotten to do so but as “/tmp” is more or less recommended in lvm.conf.
Hope that helps either people or me (in future).
Published by admin on December 21st, 2009 in Hosting | No Comments
Seems that it sometimes only pretends to have deleted the f…ine dustbin.
Try
cd /d C:\$Recycle.bin
dir /AH
rd /s /q “NameOfFolder”
if you need some space
Published by admin on October 12th, 2009 in Uncategorized | No Comments
Musste mal gesagt werden!
Published by admin on August 19th, 2009 in Internet | No Comments
Fällt wohl mehr unter die Rubrik “Werbung” 
Ich habe ein bisschen an der Infrastruktur der Webseite unserer Grundschule mitgebastelt und da diese nun mittlerweile freigegeben ist, wollte ich auch etwas Werbung dafür machen.
Also wer Kinder in Haan/Solingen hat, die demnächst mal auf die Schule müssen, sollen oder wollen: Hier gibt’s infos:
Tobias.
Tags: Don-Bosco, Haan
Published by admin on June 18th, 2009 in Internet, Politics | No Comments
Published by admin on June 18th, 2009 in Development, Programmierung, Ruby and Rails | No Comments
OK, you can find some howto’s everywhere on the web but only on this site I found the complete solution:
class SecondConnection < ActiveRecord::Base
SecondConnection.establish_connection(
:adapter => "informix",
:host => "localhost",
:username => "hansnase",
:password => "very_secret",
:database => "ccdb@localhost"
)
self.abstract_class = true
end
“self.abstract_class = true” makes the thing actually work. Otherwise Rails seems to cache the database connection and does not switch back if you access any other classes but SecondConnection.
Yeah!
Later: Not so Yeah…
I had to establish another call to
ActiveRecord::Base.establish_connection
logger.info { "Establishing Base Connection" }
log_connections
I assume it’s either an Informix problem or related to the old rails version I’m driving with.
Nevertheless: It works now.
Tags: informix, Rails, Ruby
Published by admin on June 18th, 2009 in Politics | No Comments
OK,
wer sich auch nur ein bisschen im letzen halben Jahr im Internet rumgetrieben hat (seltsame Formulierung… Wie können sich reale Personen in virtuellen Welten aufhalten), wird die Diskussion über Netzsperren unter dem Deckmantel des Schutzes vor Kinder”pornographie” (Anführungszeichen == Pornographie bitte nicht mit Missbrauch verwechseln. Die Darstellung missbrauchter Kinder ist keine “Pornographie” sondern eben Missbrauch!) mitbekommen haben.
Heute habe ich per Twitter einen wirklich guten Artikel über dieses Thema zugetragen bekommen, auf den ich hiermit gerne verlinke:
http://www.blogsprache.de/2009/06/17/offener-brief-an-die-spd-bundestagsfraktion/
Auch wenn ich nie Mitglied einer Partei war (und auch bis heute noch nicht so genau weiss, welcher ich mich denn zurechnen lassen möchte), treffen die Aussagen doch sehr gut mein aktuelles Meinungs- und Stimmungsbild. Also: Lesen!
Weitergehende Infos zu dem Thema finden sich übrigens u.a.bei heise.de (z.B.: hier oder hier).
Auch der AK-Zensur ist eine gute Anlaufstelle!
Mann Leute: mehr als 134.000 Menschen haben sich in einer Petition gegen dieses Gesetz ausgesprochen und sich u.a. als “pädokriminelle” beschimpfen lassen. Wenn es um “nichts” ginge, würde das wirklich so viele Menschen auf die (virtuellen) Beine bringen?
Tags: Internetkriminalität, Netzsperren, Politik, zensursula