Articles
-
Rerunning a specific ActiveRecord migration in Rails
In production and team environments rerunning prior Rails database migrations is generally not recommended. However there are times when it can be useful, for example when revising a feature branch that has yet to be committed, based on a change to the data model.
-
Detecting invalid HTML5 form fields in vanilla JavaScript
Direct DOM manipulation or referencing is typically discouraged by newer JavaScript frameworks. However it may still be helpful or even necessary to use plain JS at times, perhaps when working with more complicated controls, integrating with third-party code, or handling cases not covered by particular frameworks.
-
A simple one-line webserver in Ruby
Sometimes it can be helpful to serve local files without writing or configuring a complete web server, for example when prototyping or testing.
-
Count the number of word occurrences with vim
To find instances of a term in a document with vim, use the following while in command mode:
-
Ruby datetime conversions
Here’s a demonstration of several Ruby methods for date/time conversion:
