rhnh.net

Please wait for loading...




      (94):

    /
     3  -2 2014 sep 29yaml tutorialYAML Tutorial - Xavier Shay's Blog - Robot Has No HeartMany 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 know about ...
     6  -2 2014 sep 16activerecord 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 ...
     6  +1 2014 aug 06rails 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 ...
     7  +1 2014 oct 01yaml 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  +7 2014 aug 21rails 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 ...
     9  +4 2014 sep 11rails model inheritanceThree Reasons Why You Shouldn't Use Single Table Inheritance You don't compromise your data model , and everything stays neat and .... So is there a nice way to implement class table inheritance in Rails ?
     12  +1 2014 sep 05rails single table inheritanceWhat 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 ...
     12  +1 2014 aug 25bundle rails runner rvmSpeeding up Rails startup time - Xavier Shay's BlogUPDATE: If you have trouble installing, grab a recent copy of rvm : rvm get head. ..... rails new empty; cd empty; bundle ; time rails runner 'puts 1'
     13  +5 2014 sep 17ruby 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?
     15  +6 2014 sep 20ruby hosting windows server 2008
     17  +18 2014 aug 04rails 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 ...
     19  ~ 2014 aug 10fail clone scriptBash script to keep a git clone synced with a remote - Xavier Shay's Bash script to keep a git clone synced with a remote ... or use git pull which can fail if someone has been monkeying with the local version.
     21  -4 2014 sep 30ymal 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 ...
     25  +44 2014 aug 10rails integration testHow 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 ...
     26  -2 2014 oct 05rails functional tests
     28  +1 2014 aug 25rails 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 ...
     30  ~ 2014 sep 24webrickWebrick - Xavier Shay's Blog - Robot Has No Heartruby server.rb [2014-08-17 15:29:10] INFO WEBrick 1.3.1 [2014-08-17 15:29:10] INFO ruby 2.1.1 (2014-02-24) [x86_64-darwin13.0] ...
     31  +10 2014 aug 21rails 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.
     32  +51 2014 sep 10rails reload environmentSpeeding Up Rails Rake - Xavier Shay's Blog - Robot Has No HeartRefresh this list with: # LOAD_RAILS =1 rake -T | ruby -ne 'puts ... Rake::Task[' environment '].invoke end end # Create an empty task that will ...
     35  +66 2014 aug 22rspec get postNew 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. .... Try these related posts , or find more in the archives.
     35  ~ 2014 aug 11garmin factory outletUpload Forerunner 410 to Strava with Garmin Communicator for Install Linux Garmin Communicator 2. Uncompress .... Coach Outlet USA
     36  +2 2014 sep 12iterm screen splitVim and tmux on OSX - Xavier Shay's Blog - Robot Has No HeartI'm using iTerm with the solarized-colorscheme as well an I'm trying to set ... I've only briefly used tmux because screen (with the vertical split  ...
     38  -14 2014 sep 11rails rake listOn 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 ...
     38  +14 2014 aug 09slide box jqueryUltimate 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 ...
     39  -2 2014 aug 13rspec 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  +35 2014 jul 25rails 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 ...
     40  -11 2014 sep 12ubuntu 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 ...
     41  +10 2014 sep 24vim vertical selection slowThe mouse is good for two things: scrolling, and selecting text from your scrollback.
     42  +6 2014 sep 19rails 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 ?
     42  +16 2014 aug 20rails unit testAll of the typical Rails tests fall under the “integration” label, leaving two new levels of testing to talk about: unit and acceptance.
     42  +17 2014 jul 21rails test unit
     43  +1 2014 aug 27dual boot macbook
     44  -10 2014 sep 23rspec default ontroller exampleRspec - Xavier Shay's Blog - Robot Has No HeartOne of the features I am most excited about in RSpec 3 is the verifying double support 1.
     45  +33 2014 aug 31rails form validationForm Objects in Rails - Xavier Shay's Blog - Robot Has No HeartA form object is an object designed explicitly to back a given form . It handles validation , defaults, casting, and translation of attributes to the ...
     45  +5 2014 aug 25unit test rails
     46  +55 2014 sep 22why not use tablesIf you are using STI (or inheritance in general) to share code, you're doing it wrong. Having many tables does not conflict with the ...
     46  +5 2014 sep 21rspec test 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 ...
     48  -40 2014 sep 30project 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 ...
     48  +27 2014 sep 10rails 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 ...
     51  -29 2014 sep 12python ymlThere are libraries available for all mainstream languages including Ruby, Python , C++, Java, Perl, C#/.NET, Javascript, PHP and Haskell.
     51  +11 2014 sep 06association 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
     52  +10 2014 sep 30rake db schema loadThis allows for faster # loading of all the rake files, so that getting the task list, ... db :rollback db : schema :dump db : schema : load db :seed db :setup ...
     52  -13 2014 sep 24bypass 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 ...
     52  +49 2014 sep 07rails where are rake tasksOn 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 ...
     52  -6 2014 jul 18jquery slide box
     55  +17 2014 aug 31mysql backup every hourBackup MySQL to S3 with Rails - Xavier Shay's BlogS3 is a trivially cheap offsite backup solution – for small databases it costs ... 4 cents per month, even if you're sending full backups every hour .
     55  +13 2014 aug 18postgresql 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 ...
     56  -34 2014 sep 15python yaml
     56  -6 2014 sep 14rspec testing controller
     57  -34 2014 sep 13yaml python
     57  +40 2014 aug 04rails rake task
     58  +1 2014 oct 04rspec 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, ...
     58  ~ 2014 jul 23speed up startupIn which I provide easy instructions to try a new patch that drastically improves the start up time of Ruby applications, in the hope that with wide ...
     60  +4 2014 sep 17jquery 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 ...
     60  +41 2014 aug 14ruby creating treesMany years ago I wrote a tutorial on using YAML in ruby . It still sees ... YAML is a flexible, human readable file format that is ideal for storing object trees . YAML ... This has the curious effect of making YAML a superset of JSON.
     60  +26 2014 jul 26rails 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 ...
     60  ~ 2014 jul 18rails form tagFor a while now I have been using form objects instead of nested attributes for complex forms , and the experience has been pleasant. A form  ...
     63  +15 2014 sep 03rails counter cache updateThis also has the benefit that if you decide to add a counter cache later
     64  -41 2014 sep 27oython yaml
     64  +10 2014 sep 25rails delete dbFive Tips For Adding Foreign Keys To Existing Apps - Xavier Shay's How would a Rails cascade destroy work with a MySQL RESTRICT? ... custom ( db -specific) constraints in a rails app; since schema.rb does not ...
     66  +24 2014 sep 12rails 3 assets are slowStatic Asset Caching on Heroku Cedar Stack - Xavier Shay's Blog1 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.
     66  -6 2014 aug 01geo 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.
     67  +1 2014 sep 12heroku memcachedRails helpers, combined with Rack::Cache and the free memcached plugin available on Heroku . That was all pretty straight forward, what was ...
     68  ~ 2014 oct 02debug code inside rspecCode - Xavier Shay's Blog - Robot Has No Heart[rangeserver] loglevel= DEBUG consul=true .... One of the features I am most excited about in RSpec 3 is the verifying double support 1. ..... Normally JRuby is used to interpret Ruby code inside a Java environment, but it also ...
     68  +8 2014 sep 29rails 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 ...
     68  +6 2014 sep 13rails validationsA form object is an object designed explicitly to back a given form. It handles validation , defaults, casting, and translation of attributes to the ...
     71  +30 2014 aug 13rails nested forms
     72  +19 2014 sep 24mysql 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 ...
     73  +28 2014 aug 20rails flash messageThe the traditional rails approach is to use assert_select and find it in your views ... "handling GET to #index" do it "sets flash .now[: message ]" do ...
     73  ~ 2014 aug 18ralph lauren automaticAutomatically pushing git repositories to Bitbucket - Xavier Shay's BlogAutomatically pushing git repositories to Bitbucket · Bitbucket gives ....
     74  ~ 2014 sep 17ruby on rails puts 调试Recent releases of MRI Ruby have introduced some fairly major performance ... time script/ rails runner " puts 1" # Install a patched ruby curl ...
     75  +11 2014 sep 30rspecOne of the features I am most excited about in RSpec 3 is the verifying double support 1. Using traditional doubles has always made me ...
     75  +14 2014 aug 27rails testing controllersThe Rails conventions for testing provide three categories for your tests : Unit. ... Used to test the interaction among any number of controllers .
     75  ~ 2014 aug 13ruby language tutorialMany years ago I wrote a tutorial on using YAML in ruby . ... There are libraries available for all mainstream languages including Ruby , Python, ...
     77  +10 2014 sep 30rails capybara rspec stubTesting - Xavier Shay's Blog - Robot Has No Heartconfig/environment", __FILE__) # By default, rspec / rails tags all specs in
     78  -6 2014 sep 25ruby oauth nested resourcesXavier Shay's Blogruby server.rb [2014-08-17 15:29:10] INFO WEBrick 1.3.1
     79  ~ 2014 sep 20thinking 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 ...
     79  +13 2014 aug 06rake 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 ...
     80  -6 2014 aug 18rails 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.
     84  ~ 2014 sep 29rails empty a databaseOn a brand new rails project (this article is rails 3, but the same principle ... db : seed db :setup db :structure:dump db :version doc:app log: clear  ...
     84  -42 2014 sep 25rake 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 ...
     84  ~ 2014 sep 05file rubyThese tags can be anything you like, ruby just happens to use that particular format. You can remove duplication from YAML files by using ...
     85  ~ 2014 aug 22jruby rdoc skipSkip to the bottom for instructions, or keep reading for the narrative.
     86  ~ 2014 sep 21ralph lauren polo clearanceWriting About Code - Xavier Shay's Blog - Robot Has No HeartMoncler Clearance , lrich ... Ralph Lauren Polo , http://www. ralphlaurenepolo .com/. Coach Outlet says:
     86  -28 2014 sep 11rake 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 ...
     86  +15 2014 aug 18rails counter cacheYou loaded 162 objects into memory, just to count them.
     89  +1 2014 aug 10memoize rails threadRuby - Xavier Shay's Blog - Robot Has No HeartA generic function to run blocking code in a deferred thread and .... { form } # Memoize the form # This pattern is overkill in this example, but ...
     90  -1 2014 sep 19mongo mapper mongoidPadrino, MongoHQ and Heroku - Xavier Shay's BlogFebruary 27, 2013 at 3:02 AM. Just in case you use MongoId instead of MongoMapper you can use ... Mongoid .database = connection.db.
     91  ~ 2014 aug 19tidy 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 ...
     93  +8 2014 sep 29pbcopyUp until I wrote this blog post, I had been using the pbcopy plugin to share clipboard using a cute hack involving ssh'ing back into your machine ...
     93  -27 2014 sep 26inject 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 ...
     95  -75 2014 sep 11rspec profilingOne 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.
     95  +6 2014 sep 08html validator tidy
     98  ~ 2014 sep 12tmux commandI recently switched from MacVim to vim inside tmux , using iTerm in full screen mode ( Command +Enter ). It's pretty rad. I tried screen first, but ...
    1 of 1 pages