RSS

Category Archives: Uncategorized

Blog Moved!

Please visit the new location of this blog:

http://tektastic.com

 
Leave a comment

Posted by on June 2, 2012 in Uncategorized

 

RailsConf 2011 Best of Sessions

Below I put together my personal list of best RailsConf 2011 presentations that have online slides or PDFs. I put my comments next to each. Click on the link, then click on the “slideshow” or “PDF” links for each talk.

And if you are feeling sentimental, and added bonus:

  • 50 in 50 is a really zany presentation on computer science achievements in the last century. Great meditative presentation, and goes way over 1 hour. No relationship to ruby/rails, but everyone will get something out of it

 
Leave a comment

Posted by on May 30, 2011 in Uncategorized

 

mms-mime: MM7/MMS MIME parsing gem

https://github.com/kigster/mms-mime

This gem was written with a simple aim to parse MM7 wrapped binary and base64 encoded MMS messages received via MM7/XML HTTP post from an MM7 compatible gateway connection (such as OpenWave, OpenMarket, etc).

The gem provides a simple way to parse and access MMS message contents, such as from, to, subject and content parts (including image and text parts).

 
Leave a comment

Posted by on May 13, 2011 in Uncategorized

 

>GoGaRuCo 2010 – San Francisco Ruby Conference

>Had an awesome time here for two days, listening to talks, hacking on some code, learning, networking, even managed to sign up for the UCSF gym and to take a swim.

Very nice organization, excellent venue, and fantastic talks. Definitely coming back next year. For the price it’s well worth it.

Here are some highlights:

  • Super useful resource for lookup up shell commands: http://shellhaters.heroku.com/posix
  • Terminator plugin: start your dev environment as you like it. Gem install terminator
  • http://github.com/rdy/fixture_builder Factory to Fixtures converter to speed up your tests.
  • pprof profile Ruby interpreter. Rack-Profiler project, great profiling tool.
  • Coffee Script – wrapper (ruby-esque) for javascript; rails 3.1 supports coffee script templates
  • Machine Learning – great talk, and O’Reiley book, http://twitter.com/igrigorik
  • minitest fastest testing framework, many mentions, very fast, supports RSpec and Test::Unit syntax
  • Caching: using fresh_when(:last_modified => …) to enable proper HTTP caching in Rails 3.1
  • Arel: enables fragment caching that does not run SQL if the fragment is cached
  • ruby 1.9: require ‘objspace’ allows inspection of object counts and memory usage in VM
 
Leave a comment

Posted by on September 18, 2010 in Uncategorized

 

>Learning Git, And Should You Switch from SVN

>If you are just learning to use git, or you have been using it for a while without too much thinking, this introduction to Git principles provides a fantastic overview into the concepts behind git, using a very simple and natural examples.

Do you need to switch to git from svn? My personal take on this is as follows:

  • If you have several developers far away with bad internet connection, then YES.
  • If you have more than several developers (say hundreds) then YES.
  • If your developers often work on long multi-day features, where they want to commit often, but commits may result in instability of their branch, then YES. Git allows much easier branching than SVN.
  • If you want to leverage GitHub’s infrastructure for hosting your project privately or publicly, then YES.
To balance this and not to appear as I am advocating everyone to switch, here is the reverse:
  • If you have a small team who works locally and uses a local SVN server then NO.
  • If your team does not need branching, or prefers to check-in complete features instead of incremental check-ins then NO.
  • If your team is used to SVN and there are no major issues, then NO.
  • If your team is using SVN authorization module to create groups and grant them special access per subdirectory then NO. I am unaware of Git providing this level of access control.
 
3 Comments

Posted by on June 29, 2010 in Uncategorized

 

>Reviving Tektastic

>Things have been a bit quiet over here, but no fret, it’s not over yet!

Things have been very busy with Drop In Media, building an MMS content and technology company has been exciting and at times exhausting.

Going to SXSW? Check this out!.

More soon! Promise.

 
Leave a comment

Posted by on March 10, 2010 in Uncategorized

 

>Binary PostgreSQL installer broken when used on RedHat EL5.3 / Dell PowerEdge 2950: Hangs server reboot.

>This is a very quick post that would hopefully save someone else hours of hitting the head on the wall like I did.

If you are installing RedHat Enterprise Server 5.2/5.2 x86_64 on Dell PowerEdge server, be aware of the following issue with PostgreSQL binary installer offered by EnterpriseDB.

After installation the server is unable to cleanly shutdown due to the fact that the binary installer does some voodoo with libtermcap – basically making this system library be used from inside postgres installation folder. Because of this, kernel can not umount /usr (or whenever your PostgreSQL is installed) and hangs the shutdown.

Solution:

Build PostgreSQL from the sources. They are ahead in minor version number anyway.

Thanks.

 
1 Comment

Posted by on February 6, 2009 in Uncategorized

 

>Firefox3 PR Backfires?

>

After announcing to the world that Firefox 3 will be available at 10am PDT today, June 17th, amidst apparent publicity stunt to generate the record number of downloads per day (has anyone been really keeping a tally?) the web site http://getfirefox.com/ returns the pathetic

Http/1.1 Service Unavailable

Firefox is certainly a decent browser, but it’s stability seems to have gone reversely proportional to the self-professed greatness and the size of their publicity stunts.

Safari is now by far the best looking, and fastest browser for Windows, and it has been that way for mac for a while.

Good luck Fifefox 3 (when we see you), but I for one, am not buying it.

Update @ 12:23pm

OK, so finally FF3 is available for download, and I have it installed and running. The first thing is that not all plugins are compatible, and if you are using FireBug for web development, you must install the 1.1 version available here.

 
2 Comments

Posted by on June 17, 2008 in Uncategorized

 

>Infectious.com launches!

>

It finally happened :) I’ve been working for Infectious.com since about July last year, and it’s been a really fun run building a brand new product, from a mere conception to this moment – full public launch.

Click to go to Infectios.com

Of course some people may have caught the glimpse of this from TechCrunch article a few weeks ago. Nevertheless, here it is – Car Art For the Masses – available to you from a spanking new website, designed and developed by the Team Infectious and yours truly.

The idea of course is simple – everyone’s car looks the same! OK, so some are dirtier than others, some stink more, all of this is certainly true, but from an aesthetic point of view, if you and your neighbor accidentally buy the same model of a car, you are screwed! Well, not really, and especially not anymore.

Stop wasting time and go get some cool art for your car, make it look like nobody else, even if you drive a stinky dirty ’74 Datsun. I’m seriously.

 
3 Comments

Posted by on June 11, 2008 in Uncategorized

 

>Car or Auto Make-Model-Year Database : For Breakfast

>

Make Model What?

If you like me were tasked with loading a database of recent car makes/models/years, you would start by looking on the web and seeing if someone else just has it out there, readily available, hopefully for free, but perhaps for a tiny nominal fee.?

If only it was that simple…

I looked and looked, and couldn’t find anything that would fit the above requirements. So I thought, who would know about US car models better than Kelly Blue Book? So I went on their site, and sure enough they have a javascript file that lists all known to them makes and models of used cars. Since the file is public, I figured it’s not really “evil” if I scrape and parse it for my own benefit. Disagree? Have a better source? Then leave a comment.

Anyway, to cut the long story short, I’m hoping to save a day or so to someone else who may, like me, be looking for this information. The ruby module shown below retrieves and parses the javascript from KBB site into a Ruby data structure of the following form – basically a hash, keyed on make, then on model with list of years as a value:

>> Constants::Auto::DB.keys.sort[0..5]
=> ["AMC", "Acura", "Alfa Romeo", "Audi", "BMW", "Bertone"]
>> Constants::Auto::DB["Subaru"].keys.sort[0..5]
=> ["B9 Tribeca", "Baja", "DL", "Forester", "GL", "GL-10"]
>> Constants::Auto::DB["Audi"]["A4"]
=> ["1999", "2007", "1998", "2006", "2005", "1996", "2004", "2003", "2002", "1997", "2001", "2000"]
>> Constants::Auto::DB["BMW"]["X5"]
=> ["2003", "2002", "2001", "2000", "2005", "2007", "2006", "2004"]

The idea is that you could load the initial hash:

@models = KBB::Parser.new.to_hash

and then save the output of @models.inspect in your local constants file – hence me using Constants::Auto::DB (I actually have a Rake task for doing this — let me know if I should post it too). Then you would just re-run this every time you think new car models are added/changed on KBB. Realize, that hitting their site every time you need the data is clearly evil. So use this class to load the data initially, save the result of inspect() call into a ruby file, and use that cached version in your app. Re-run the load every time you want to update your database.

Please let me know if you find this code useful, or if you find a better/cleaner/more comprehensive way of maintaining car make/model/year database.

#
# author: Konstantin Gredeskoul © 2008
# license: public domain
#
require 'net/http'
require 'uri'

module KBB
 MODELS_URL = "http://scripts.kbb.com/kbb/ymmData.axd?VehicleClass=UsedCar"

 class Models
   def initialize(js)   
     @models = {}
     @makes = {}
     n = /ymUsed_\[\d{4}\]\s*=\s*'([^']+)'/
     m = /ymmUsed_\["(\d+)~(\d+)"\]\s*=\s*"([^"]+)"/
     js.split(/\n/).each do |line|
       next if line.strip.blank?
       if matched = n.match(line)
         matched[1].split(/,/).each do |token|
           id, name = token.split('|')
           @makes[id.to_i] = name
         end
       end
      
       if matched = m.match(line)
          year, make_id, models = matched[1], matched[2], matched[3]
          models.split(/,/).each do |t| 
            id, model_name = t.split('|')
            make_name = @makes[make_id.to_i]
            @models[make_name] ||= {}
            @models[make_name][model_name] ||= []
            @models[make_name][model_name] << year
          end
        end
      end
    end
    
    def to_hash
      @models
    end
  end

  class Parser
    def initialize
      @m = Models.new(Net::HTTP.get(URI.parse(MODELS_URL)))
    end
    def to_hash
      @m.to_hash
    end
  end

end
 
46 Comments

Posted by on March 13, 2008 in Uncategorized

 
 
Follow

Get every new post delivered to your Inbox.