rhnh.net

Please wait for loading...




      (83):

    /
     1  +1 2014 jun 20yaml tutorialYAML Tutorial - Xavier Shay's Blog - Robot Has No HeartYAML Tutorial . Many years ago I wrote a tutorial on using YAML in ruby. It still sees the most google traffic of any post, by far. So people want to ...
     4  +5 2014 may 25activerecord countCounting ActiveRecord associations: count , size or length? - Xavier Now we're on to something. The problem is, count will always issue a count to the DB, which is kind of redundant if you've already loaded the ...
     7  -2 2014 apr 14rails nosql rdbmsRelational Or NoSQL With Rails ? - Xavier Shay's BlogWith all the excitement in the Rails world about “ NoSQL ” databases ... If you don't know what a relational database can do for you in terms of ...
     8  +14 2014 jun 23yaml exampleMany years ago I wrote a tutorial on using YAML in ruby. It still sees the ... Quoting strings is optional, and was omitted in this example . YAML  ...
     8  +19 2014 jun 19project euler blogProject Euler solutions 1-25 in Literate Haskell - Xavier Shay's BlogProject Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to ...
     13  +15 2014 may 20rails model inheritanceThree Reasons Why You Shouldn't Use Single Table Inheritance What you should be doing is using Class Table Inheritance . Rails doesn't “ support it natively”, but that doesn't particularly mean much since it's ...
     13  +8 2014 may 14rails single table inheritanceSTI tables have a tendency to grow and expand as an application ... Rails doesn't “support it natively”, but that doesn't particularly mean much ...
     13  -1 2014 may 04bundle rails runner rvmSpeeding up Rails startup time - Xavier Shay's Blogscript/ rails runner "puts 1" 4.58s user 0.74s system 89% cpu 5.938 total ..... from / Users/mech/. rvm /gems/ ruby -head-patched/gems/ bundler -1.0.
     15  -6 2014 apr 29rails test flashTesting flash .now with RSpec - Xavier Shay's Blogflash .now has always been a pain to test . The the traditional rails approach is to use assert_select and find it in your views. This clearly doesn't ...
     17  +23 2014 jun 19ymal to arrayMany years ago I wrote a tutorial on using YAML in ruby. ... YAML has an alternate synax called “flow style”, that allows arrays and hashes to be ...
     18  +5 2014 may 26ruby hoting windows server 2008Rails 3, Ruby 1.9.2, Windows 2008 , and SQL Server 2008 Tutorial Rails 3, Ruby 1.9.2, Windows 2008 , and SQL Server 2008 Tutorial ... using webrick for development, but how are you hosting in production?
     20  +5 2014 may 20rspec profilingRspec - Xavier Shay's Blog - Robot Has No HeartOne of the features I am most excited about in RSpec 3 is the verifying .... since it doesn't try to match rspec profile out measurements to label.
     21  +3 2014 may 29ruby hosting windows server 2008
     22  +66 2014 may 24python yamlThere are libraries available for all mainstream languages including Ruby, Python , C++, Java, Perl, C#/.NET, Javascript, PHP and Haskell.
     22  +69 2014 may 21python yml
     23  +72 2014 jun 12oython yaml
     23  +69 2014 may 22yaml python
     24  +35 2014 jul 03rails functional testsHow I Test Rails Applications - Xavier Shay's BlogThe Rails conventions for testing provide three categories for your tests : Unit. What you write to test your models. Integration . Used to test the ...
     24  +6 2014 may 20rails rake listSpeeding Up Rails Rake - Xavier Shay's Blog - Robot Has No HeartOn a brand new rails project (this article is rails 3, but the same principle ... Refresh this list with: # LOAD_RAILS =1 rake -T | ruby -ne 'puts ...
     29  +4 2014 may 21ubuntu macbook proUbuntu 12.04 dual boot on Macbook Pro - Xavier Shay's BlogThe official instructions are mostly right, but I still needed a bit of black magic to get everything working. Here are my supplementary instructions ...
     29  -9 2014 may 03rails testing application controllerUsed to test the interaction among any number of controllers . Functional. Testing the various actions of a single controller . This tells you where ...
     34  -4 2014 jun 01rspec default ontroller exampleOne of the features I am most excited about in RSpec 3 is the verifying double support 1.
     35  +11 2014 apr 12rails eager loadingClass Table Inheritance and Eager Loading - Xavier Shay's Blog(Since Rails 2.1, eager loading is done like this rather than joining.) This is inefficient, since at the point we preload the associations we already ...
     37  -4 2014 apr 21rspec before eachTransactional before all with RSpec and DataMapper - Xavier By default, before (: all ) in rspec executes outside of any transaction, meaning that you can't really use it for creating objects. Normally this ...
     39  -7 2014 jun 04bypass validation railsI find having nullable columns to be a non-issue since the validation ... Rails validations are far too easy to bypass (even by accident), and it's ...
     41  +14 2014 apr 30rails data mapperDatamapper - Xavier Shay's Blog - Robot Has No HeartI introduced DataMapper on my last two major projects. .... bug I have found was something that Rails broke, and a patch was already available.
     42  +22 2014 jun 03rake cacheRake tab completion with caching and namespace support - Xavier UPDATE: It now invalidates the cache if you touch lib/tasks/*. rake , ... There's a few articles on the net regarding rake tab completion, I had to ...
     44  +9 2014 may 07live render jqueryUnobtrusive live comment preview with jQuery - Xavier Shay's BlogUnobtrusive live comment preview with jQuery . Live preview is shiny. First get your self a URL that renders a comment. In rails maybe ...
     44  +16 2014 may 06dual boot macbook
     46  -10 2014 mar 26jquery slide boxUltimate NYTimes jQuery Slidebox - Xavier Shay's BlogUltimate NYTimes jQuery Slidebox . The New York Times has a pretty fancy box that slides out when you hit the bottom of an article. It draws ...
     48  +10 2014 may 27rails model without tableThe only time STI is the right answer is when you have models with exactly .... it should be hidden in the framework, so you can change it without recoding. ... So is there a nice way to implement class table inheritance in Rails ?
     50  +17 2014 may 22rspec testing controllerTesting flash.now with RSpec - Xavier Shay's BlogThis clearly doesn't work if you want to test your controller in isolation. Other folks have found work arounds to the problem, including mocking ...
     50  -21 2014 may 04unit test railsAll of the typical Rails tests fall under the “integration” label, leaving two new levels of testing to talk about: unit and acceptance.
     51  -13 2014 jun 03vim vertical selection slowVim and tmux on OSX - Xavier Shay's Blog - Robot Has No HeartI recently switched from MacVim to vim inside tmux, using iTerm in full screen
     51  +27 2014 may 30rspec test controller
     52  -25 2014 apr 17slide box jquery
     57  ~ 2014 may 23form tag railsForm Objects in Rails - Xavier Shay's Blog - Robot Has No HeartFor a while now I have been using form objects instead of nested attributes for complex forms , and the experience has been pleasant. A form  ...
     58  +18 2014 may 20rake db tasksThe issue is that since rails and gems can provide rake tasks for your ... about db : create db :drop db :fixtures:load db :migrate db :migrate:status ...
     58  -31 2014 apr 28rails unit test
     59  -9 2014 jul 02rspec mock modelThis is equivalent to an RSpec double, # stub or, mock , except that if the .... is started and triggering a re-index after each model load is doable, ...
     59  -38 2014 mar 29rails test unit
     60  +8 2014 apr 08geo search sphinxIntegration testing with Cucumber, RSpec and Thinking Sphinx Ideally you would want to include sphinx in your integration tests. ... If I was doing thing things like geo - search that rely on sphinx , I would revisit.
     62  -20 2014 jun 19rake db schema loadThis is just the time it takes to load all the tasks, as a result any task you ... db : rollback db : schema : dump db : schema : load db :seed db :setup ...
     62  +2 2014 may 16association proxy railsCounting ActiveRecord associations : count, size or length? - Xavier Notice it uses count, but if the association is already loaded (i.e. we already know how
     64  +7 2014 may 26jquery flyout boxUltimate NYTimes jQuery Slidebox. The New York Times has a pretty fancy box that slides out when you hit the bottom of an article. It draws ...
     66  +35 2014 jun 09inject jqueryinject and collect with jQuery - Xavier Shay's BlogYou know, I would have thought someone had already made an enumerable plugin for jQuery . Maybe someone has. Mine is better. Complete ...
     68  +16 2014 may 20heroku memcachedStatic Asset Caching on Heroku Cedar Stack - Xavier Shay's BlogRails helpers, combined with Rack::Cache and the free memcached plugin available on Heroku . That was all pretty straight forward, what was ...
     68  -17 2014 apr 27postgresql full text searchPostgreSQL 9 and ruby full text search tricks - Xavier Shay's BlogIn it, I introduce full text search in postgres , and use a trigger to keep a search vector up to date. I'm not going to cover that here, but the point I ...
     69  ~ 2014 may 26java quickly create event notifiersCode - Xavier Shay's Blog - Robot Has No Heartdouble_demo.rb class User < Struct.new(: notifier ) def suspend!
     69  -29 2014 apr 17rails integration test
     70  -1 2014 jun 21selenium for firefox 4Selenium , webrat and the firefox beta - Xavier Shay's BlogThere is a trick to get Firefox 3.5 beta working. The selenium server package with webrat 0.4. 4 only supports FF 3.0.*. Follow these instructions ...
     72  -8 2014 jun 04ruby oauth nested resourcesRuby - Xavier Shay's Blog - Robot Has No HeartThe Rails conventions for testing provide three categories for your tests: .... It even works well with nested attributes , using the form object to build ..... Stripe only allows you to set a fixed redirect URL in your test OAuth settings.
     72  ~ 2014 may 09mysql backup every hourBackup MySQL to S3 with Rails - Xavier Shay's BlogBackup MySQL to S3 with Rails ... for small databases it costs about 4 cents per month, even if you're sending full backups every hour .
     73  +13 2014 may 30ruby to paramGuice - Xavier Shay's Blog - Robot Has No HeartI thought it would be fun to try and embed some Ruby code into it. ... @ param ruby The JRuby instance this object will belong to * @ param  ...
     74  ~ 2014 jun 03rails delete dbFive Tips For Adding Foreign Keys To Existing Apps - Xavier Shay's Rails fixture code is not designed to work well with foreign keys. ... : destroy option to has_many , with a restrict option at the database level to ...
     74  ~ 2014 may 22rails validationsA form object is an object designed explicitly to back a given form. It handles validation , defaults, casting, and translation of attributes to the ...
     74  ~ 2014 may 02tie rack gitBash script to keep a git clone synced with a remote
     74  +27 2014 apr 26rails invalid encoding symbolRails - Xavier Shay's Blog - Robot Has No HeartThe Rails conventions for testing provide three categories for your tests: Unit. ..... *args) obj = klass.new(*args) format = controller.request.format. symbol if obj. respond_to?(format) .... 18:10 Invalid encoding UTF-8, dammit.
     74  -37 2014 apr 02rails controller nameDependency Injection for Rails Controllers - Xavier Shay's BlogDependency Injection for Rails Controllers ... "Updated details for %s" % form. name response.redirect_to :registrations, current_event end def ...
     75  -23 2014 may 18rails spec testing controllerThe the traditional rails approach is to use assert_select and find it in your views. This clearly doesn't work if you want to test your controller in ...
     76  +9 2014 jun 16rails rakeOn a brand new rails project (this article is rails 3, but the same principle applies to rails 2), rake --tasks takes about a second to run. This is just ...
     78  +23 2014 may 27rspec assignsflash.now has always been a pain to test. The the traditional rails approach is to use assert_select and find it in your views. This clearly doesn't ...
     78  -14 2014 may 12rails counter cache updateYou loaded 162 objects into memory, just to count them.
     78  -29 2014 may 10rails form validationA form object is an object designed explicitly to back a given form . It handles validation , defaults, casting, and translation of attributes to the ...
     79  +22 2014 may 28thinking sphinxEnsuring the DB is started and triggering a re-index after each model load is doable, if slow, with a small bit of hacking of thinking sphinx (hint ...
     80  +1 2014 jun 14rspec session testflash.now has always been a pain to test . The the traditional rails approach is to use assert_select and find it in your views. This clearly doesn't ...
     80  ~ 2014 may 28redbubbleRedbubble - Xavier Shay's Blog - Robot Has No HeartAs of two weeks ago, I am now a full time software developer for RedBubble – A website for artists and people who want to buy said artist's ...
     83  -13 2014 may 18rails reload environmentRefresh this list with: # LOAD_RAILS =1 rake -T | ruby -ne 'puts ... Rake::Task[' environment '].invoke end end # Create an empty task that will ...
     83  -2 2014 apr 23rails performance testing
     84  ~ 2014 apr 12when to use nosqlRelational Or NoSQL With Rails? - Xavier Shay's BlogWith all the excitement in the Rails world about “ NoSQL ” databases like ... if you do want real-time, there are other techniques you can use .
     86  +9 2014 jun 20rspecNew in RSpec 3: Verifying Doubles - Xavier Shay's BlogOne of the features I am most excited about in RSpec 3 is the verifying double support 1. Using traditional doubles has always made me ...
     86  -53 2014 apr 02rails require onceFor reference, our medium-sized Rails application requires around 2200 files ..... I tried installing 1.8.7 once but didn't finish due to a issue with ...
     87  -11 2014 jun 19rails capybara rspec stubTesting - Xavier Shay's Blog - Robot Has No Heartconfig/environment", __FILE__) # By default, rspec / rails tags all specs in
     89  ~ 2014 may 27mongo mapper mongoidPadrino, MongoHQ and Heroku - Xavier Shay's BlogJust in case you use MongoId instead of MongoMapper you can use connection = Mongo::Connection.from_uri(ENV['MONGOHQ_URL'])
     89  -21 2014 may 06rails testing controllersThe Rails conventions for testing provide three categories for your tests : Unit. ... Used to test the interaction among any number of controllers .
     90  -4 2014 may 21rails 3 assets are slow1 2 3 4 5 6 7 8 9 10 ... I also disabled the built in Rails serving of static assets in ... If you only have one dyno (the free plan) then the initial load can be slower than it otherwise would be if nginx was serving them directly.
     90  -42 2014 apr 18memoize rails threadA generic function to run blocking code in a deferred thread and .... { form } # Memoize the form # This pattern is overkill in this example, but ...
     91  +10 2014 jun 03mysql deadlockDebugging Deadlocks In Rails - Xavier Shay's BlogYou are using MySQL ; You know the difference between shared and ... This is only one specific example of a deadlock , in reality there are ...
     91  +10 2014 apr 28tidy html validatorRails XHTML Validation with LibXML/ HTML Tidy - Xavier Shay's BlogHTML Tidy isn't quite as good as W3C – for example it missed a label that ... require 'net/http' response = Net::HTTP.start(' validator .w3.org') do ...
     92  +9 2014 apr 14rake task dumpRake - Xavier Shay's Blog - Robot Has No HeartThe issue is that since rails and gems can provide rake tasks for your ... db: structure: dump db:version doc:app log:clear middleware notes ...
     95  +6 2014 jun 01vim yankI recently switched from MacVim to vim inside tmux, using iTerm in full screen .... Once I did that the vim yank and clipboard magically worked.
     95  ~ 2014 may 14imlib2Imlib2 - Xavier Shay's Blog - Robot Has No HeartGetting text into your openGL apps is simple with the use of the imlib2 library ( developed by the enlightenment team). If you have the good fortune of working on ...
     97  -18 2014 apr 12rails rake taskOn a brand new rails project (this article is rails 3, but the same principle applies to rails 2), rake -- tasks takes about a second to run. This is just ...
    1 of 1 pages