my second computer 1991 - 1995 - 1998

  • 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 ;)

Posted in , | Posted on 29 Jun 2011 03:52by somekool | 2 comments

my first computer circa 1985

This is the first computer I've been playing with. Mostly using BASIC language trying to make something work. Played around with Lotus 1.2.3.

Tandy TRS-80 Color Computer 2

  • CPU: Motorola 6809E, 0.8 MHz
  • Memory: 16K RAM; 6K ROM
  • Display Capability: 32 lines by 16 character text, 256x192 8-color graphics
  • Operating System: ROM BASIC
  • Input/Output: Composite color video output; Joystick ports; cartridge port

Tandy TRS-80 Color Computer 2

Posted in , | Posted on 29 Jun 2011 03:30by somekool | no comments

Find the length of a wav file in Ruby

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]),
    }

end

hope this helps you

Tags , , , , ,

Posted in , , | Posted on 16 Feb 2011 06:52by somekool | no comments

Typo 5.5 upgrade and moved to a faster server.

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

Posted in , , | Posted on 19 Dec 2010 22:17by somekool | no comments

long awaited archlinux update overdue. will it pass?

(click read more to view list of packages) posted as a comments because it took too much space ;)

Posted in , , , | Posted on 14 Nov 2010 00:50by somekool | 2 comments

Perl weirdness 2010#001

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?

Posted in , , , , | Posted on 30 Mar 2010 14:11by somekool | 2 comments

my Blog is back up !!!!

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....

And just so reading this is not entirely a waste of time, here is for your viewing pleasure one of my favorite Internet classic video....  

 

 

Posted in , , , , , | Posted on 28 Mar 2010 21:41by somekool | 3 comments

my Blog is back up !!!!

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....

And just so reading this is not entirely a waste of time, here is for your viewing pleasure one of my favorite Internet classic video....  

 

 

Posted in , , , , , | Posted on 28 Mar 2010 21:41by somekool | 3 comments

dont know what svn revision to restore?

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.

kind regards,

Posted in | Posted on 10 Dec 2009 08:24by somekool | 1 comment

How to make Rails ActiveRecord::Migration default to MyISAM

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

Tags , , , , , , , , ,

Posted in , , | Posted on 08 Apr 2009 13:56by somekool | 2 comments

Subscribe

my last twitter posts

Personal Links

Tags

Categories

Archives

my Xbox 360 gamertag

Copyright © Mathieu Jobin's Life and Thoughts

Tech Blue designed by Hive Designs • Ported by Free WordPress Themes and Frédéric de Villamil Powered by Typo