Ruby on Rails Rake Task2006-06-08

This task will let you dump your Postgresql db into fixtures for rails application testing. I don't know why the Rails developers did not think of this. This task enables you to test against a production db. This prevents wasting your time testing against basic 'hello world' data in fixtures. Place dump_fixtures.rake into lib/tasks of your rails project

desc 'Dump a database to yaml fixtures.  Set environment variables DB
and DEST to specify the target database and destination path for the
fixtures.  DB defaults to development and DEST defaults to RAILS_ROOT/
test/fixtures.'
task :dump_fixtures => :environment do
   path = ENV['DEST'] || "#{RAILS_ROOT}/test/fixtures"
   db   = ENV['DB']   || 'development'
   sql  = 'SELECT * FROM %s'

   ActiveRecord::Base.establish_connection(db)
   ActiveRecord::Base.connection.select_values('select table_name from information_schema.tables where table_type like \'BASE TABLE\' and table_schema like \'public\'').each do |table_name|
     i = '000'
     File.open("#{path}/#{table_name}.yml", 'wb') do |file|
       file.write ActiveRecord::Base.connection.select_all(sql %
table_name).inject({}) { |hash, record|
         hash["#{table_name}_#{i.succ!}"] = record
         hash
       }.to_yaml
     end
   end
end

Read comments on this article. (5) or Comment on this article.

FCEU Link Fixed.2006-05-27

Just as the topic states, I fixed the FCE Ultra OSX link on the main page. -Victor

Read comments on this article. (3) or Comment on this article.

More Emulator News2006-02-21

I just finished porting mooby's excellent CDR plugin which can load psx disk images off the hard drive. You can find the file here. Oh and you can download my mactel Visual boy Advance port here.

Read comments on this article. (7) or Comment on this article.

FC Ultra OSX Test Release2005-12-02

I am releasing this here as a test bed to catch any bugs before I commit it more formally. This is the fce nes emulator with updated nes mappers and a native UI. I am releasing this on haste since from here on out ill be gone in academic land studying my ass off for the next 2 or 3 weeks. Hopefully you guys can pound out the bugs in the mean time.

http://lamer0.com/files/FCEUltraOSX.zip

http://lamer0.com/files/FCEUltraOSXG3.zip

Read comments on this article. (2) or Comment on this article.

Yet more Software Updates2005-11-30

I have a ton of updates to post today. I fixed a long standing endian color issue with the software renderer in snes9x for mactels. Mupen64 received a major update, a long with a G3 build for older macs. This new release fixes Mactel control issues and adds a sound configuration dialog to adjust the sound buffer for clear sounding audio. I also recently lipo'ed a FAT RubyCocoa framework. This framework enables Cocoa applications to be written in Ruby! This can make writing OSX applications a breeze! And here are the links:

Snes9x-Universal-endianFix.zip
RubyCocoa-Universal.zip
mupen64-PR1.dmg.sitx
Mupen64-0.5-G3.zip

Read comments on this article. (8) or Comment on this article.

Emulator News2005-11-15

I am releasing Mupen64 0.5 for OSX today. This is a universal build that is based on Adam Green's work. I decided to scratch my UI modifications and plugin system for the sheer fact that the implementation was absolutely horrendous. Note! I am not supporting this build at *ALL*, my current project at the moment is FC Ultra OSX. However, when I do feel like FC Ultra OSX is finished I might start work back on Mupen64. Ok, now a few things to mention - on OSX86 the Video is broken due to any of the following reasons; the SDL framework's OpenGL implementation is broken on OSX86, OSX86's OpenGL framework is broken , I missed a endian issue that might be causing it in the application it self, or all the reasons above! I added a core switcher in this build but obviously the dynamic re-compiler does not work since it is i386 centric. You can choose between the interpreter or pure interpreter core with the core switcher.

And here is the link! Mupen64-0.5-universal.zip

Thanks for reading and stress testing my Rails site at home.

Read comments on this article. (1) or Comment on this article.

Software Development Must Haves!2005-11-13

As of recent I have been updating my development tool box and I wish to share what I think are some "developer tool must haves." So here is the list of the utilities in question. This list is Macintosh development centric so keep that in mind.


  • Doxygen - This is an excellent documentation generator for your code. All you have to do is just sprinkle your code with comments and this utility will generate some wonderful charts and graphics from your comments.

  • Subversion - Yep, I finally decided to hop ship from CVS. I got fed up with all of CVS's inadequacies, the inability to rename files and just general quirkiness of use. A warning for all mac developers, when converting your CVS repository to SVN with the cvs2svn tool use the "--no-default-eol" flag or all your binaries including NIBs will get corrupted. I learned this the hard way sadly.

  • svnX - A great utility as an alternative to cvsweb for browsing a svn repository.

  • Trac - I am sure most of you stumbled upon this one. A highly popular wiki/tracking/ticket system for subversion. I had a slight issue getting this setup on netbsd with a lighttpd fcgi setup. For some odd reason it did not detect a $TRAC_ENV environment variable. A quick fix for this is to make a copy of trac.fcgi file in cgi-bin and add the following to the newly made file-


    import os

    os.environ["TRAC_ENV"]="/path/to/my/repository"



    Just include the newly made file in the bin-path and it should work without issue. For further reading on how to setup trac with lighttpd+fcgi go to http://decafbad.com/trac/wiki/TracFastCgi.

  • RadRails - An excellent IDE for the Rails environment. I believe this environment was built on top of eclipse.

  • Locomotive - Another MacOSX jewel, a self-contained Ruby-on-Rails development environment. Is there such a thing on the windows platform?


    This article is leaning toward web development with all the Rails plugs. There is not much to mention on the Object-C/C++ side since Apple does a good job of supplying all the needed tools (editor/debugger/compiler). If you know of some development tools which you think are "must have" please feel free to leave a comment.

    Read comments on this article. (0) or Comment on this article.

  • New Project In The Works2005-11-12

    About three weeks ago I started working on a NES emulator port for OS X. I have gotten to a point where the emulator is fairly useable. Anyhow, I am just doing a plug on my main page for the new project. You can find the project page here!. This server is running on an embedded unit with only 128 MB of ram so its maxed out as is with the stuff I got running on it. The trac daemon which is proxyed from lighttpd might respond a tad slow due to server being maxed out as is.

    Read comments on this article. (0) or Comment on this article.

    Darwinport x86 Packages2005-09-22

    I put up my compiled darwinport packages. The link might work or might not, it all depends if my main computer is on. The files are mounted over a nfs share. Anyway here is the link to get the files, http://test.lamer0.com/ports.rhtml

    Read comments on this article. (8) or Comment on this article.

    New Site Deployment2005-09-18

    All I can say is that Ruby-on-Rails made designing and coding this site effortless. At the most I spent about 4 hours from start to finish getting this site made. In that 4 hours I spent learning Ruby and the Rails framework. This site has also been migrated to Lighttpd, which is on the rage now, from the Apache httpd.

    Read comments on this article. (4) or Comment on this article.