System 32bit ;) 386SX-16 with 1MB or RAM. 40MB hard disk.
I paid around 2000$ including Windows 3.0 which was like 300$ at the time.
eventually, I upgraded it to have a 100MB harddrive and 2MB memory.
it quickly filled up.
it's only in 1996 I upgraded it for a Pentium 120 and a 1.2GB harddrive.
then I got the Internet and started learning about Linux. Eventually, my system would not boot because I had no space left in /tmp or something like that.
I could have reinstalled but I could have quickly ended up in the same situation, so I bought a 1.6GB harddrive ;)
I needed a way to find out quickly the length of the wav file. in a previous version, I was simply guessing it from the file size, saying that a wav file is about a megabyte per minute. but that ain't the proper way. Thanks to this site giving me the wav file header. I could quickly write my own in Ruby.
def wavinfo(input)
def bytes_to_int(bytes)
bytes.unpack("L").first
end
# try to load a file form the filesystem unless we got a data stream as a parameter
unless input[0..3] == 'RIFF'
file = File.new(input,"r")
input = file.read(45)
file.close
end
return {
:filesize => (8 + bytes_to_int(input[4..7])),
:wavefmt => input[8..15],
:format => bytes_to_int(input[16..19]),
:pcm => bytes_to_int(input[20..21]),
:channels => bytes_to_int(input[22..23]),
:frequency => bytes_to_int(input[24..27]),
:bytes_per_second => bytes_to_int(input[28..31]),
:bytes_by_capture => bytes_to_int(input[32..33]),
:bits_per_sample => bytes_to_int(input[34..35]),
:always_data => input[36..39],
:bytes_in_data => bytes_to_int(input[40..43]),
:wav_length => bytes_to_int(input[40..43]).to_f / bytes_to_int(input[28..31]),
}
I just upgraded my blog to the latest typosphere release. no issue at all. work perfectly. please tell me if you encounter any issue or slow down/speed up
Perl keeps impressing me (negatively) with weird stuff such as implicit context and so on....
but that one is really out of the ordinary...
prompt~/ perl
print "-------\n\n";
my $x = 'hostname1.foo.net';
$x->{'datacenter'} ||= '__';
use Data::Dumper;
print Dumper $x;
print "x".$x->{'datacenter'}."x\n";
my $y = 'hostname1.foo.neT';
print "y".$y->{'datacenter'}."y\n";
my $z = 'hostname1.foo.net';
print "z".$z->{'datacenter'}."z\n";
-------
$VAR1 = 'hostname1.foo.net';
x__x
yy
z__z
prompt~/
first, I thought calling ->{} on a scalar/string would crash. to my surprise, my program passed.
so I wrote this test only to learning something even crazier about perl.
couldn't this be a security issue?
After several server "hick ups" my blog is now back online ! Well, it never got offline, but dreamhost is not so generous on RAM and my blog was asking for more and more, thus I had to move it. I still think dreamhost is a nice place for hosting your stuff but I am sure you know that, at some point, you might need something more dedicated to your business... So my blog is now running on my own server, I also upgraded it to the latest typo (from 4.0.3 to 5.4.1) and it feels good to be able to type here again without fearing crashes....
After several server "hick ups" my blog is now back online ! Well, it never got offline, but dreamhost is not so generous on RAM and my blog was asking for more and more, thus I had to move it. I still think dreamhost is a nice place for hosting your stuff but I am sure you know that, at some point, you might need something more dedicated to your business... So my blog is now running on my own server, I also upgraded it to the latest typo (from 4.0.3 to 5.4.1) and it feels good to be able to type here again without fearing crashes....
I simply fell on that blog post and wanted to reply to the comment asking how to find out which version to copy....
but I could not reply... unfortunately so I am posting it here for my own selfish joy....
Q: Steve Wick said 24 days later:
How do you know what revision number to restore?
A: Mathieu Jobin
a sapient process is required to decide which version. a good guess is the one just before the delete. if the svn removal was committed on -r1235, then -r1234 is the one to restore. in some circumstance you might want an even earlier version. physics laws on file removal and temporal continuum states you might not be able to restore at a later revision due to nonexistence of matter.
Some people perfer InnoDB, other MyISAM. This post ain't about a MySQL-Engine flame war but about letting people choice.
Fact is, the excellent Migration system shipped with rubyonrails and ActiveRecord is defaulting to InnoDB. The doc shows how you can specify the engine on each create_table statement. but then your migration are mysql-only because these engine options will not be supported by sqlite or MSSQL. and I dont want to copy/paste these options to all of my create table. I want to change the default.
unfortunately Rails supply no options for it
fortunately Rails is built on Ruby.
so you can simply overwrite the proper method by adding it to your config/environment.rb
module ActiveRecord
module ConnectionAdapters
class MysqlAdapter < AbstractAdapter
def create_table(table_name, options = {}) #:nodoc:
super(table_name, options.reverse_merge(:options => "ENGINE=MyISAM"))
end
end
end
end