Articles
-
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:
-
Instrumenting curl requests
It’s easy to time
curl
requests (or any program) with thetime
command: