Preview Github-flavored Markdown from the bash with ianks/octodown
Preview GitHub-flavored Markdown locally from the terminal, useful when writing or updating README files for gems and projects.
greckout - a bash script to grep and checkout your git branches
Find and switch to a matching Git branch by typing a partial name, using a Bash helper that turns branch search results into checkout choices.
How to load an SQL dump from a migration
Importing a MySQL dump inside an ActiveRecord migration can fail because the default connection accepts only one statement per query. A separate Mysql2::Client with multi-statement support avoids the syntax error.
Why Learning to Code is So Damn Hard
Learning to code is difficult because beginners must pass through several distinct phases before they can work comfortably. Coping with each stage improves the chances of continuing.
Debugging "INTERNAL ERROR!!! wrong argument type StringIO (expected File)"
HAML breakpoints in helper methods can trigger INTERNAL ERROR!!! wrong argument type StringIO (expected File) while debugging. Moving the breakpoint into the HAML view avoids the issue.
Cucumber factory 1.10.0 released
Cucumber factory now infers the model class from the factory, so steps can use natural names like admin instead of user (admin).
RSpec: Only stub a method when a particular argument is passed
Conditionally stub one method call for a specific argument while keeping the original implementation for other inputs in RSpec mocks.
Capybara - The missing API
Capybara node methods for locating elements, filling forms, clicking controls, and checking page content from Cucumber steps.
Ubtuntu: "FATAL: Could not load /lib/modules/...-generic/modules.dep: No such file or directory"
Kernel modules cannot load because /lib/modules/.../modules.dep is missing for the running Ubuntu kernel, often after apt-get autoremove removed an older image.
One cause for "iptables: No chain/target/match by that name" on Ubuntu
iptables commands on Ubuntu can fail with “No chain/target/match by that name” when required kernel modules such as xt_multiport and xt_comment are missing.
Geordi 1.0 released
Geordi 1.0 consolidates Rails project commands into a single CLI with command lookup, dependencies, and new setup, update, console, shell, and test workflows.
How to set up database_cleaner for Rails with Cucumber and RSpec
Reliable test isolation for Rails with Cucumber and RSpec requires cleaning the test database up front and switching strategies for JavaScript-driven examples.
Github: How to find the Readme for a certain version of a gem
Gem releases are usually tagged in GitHub, letting you switch to a version tag to inspect the README from that release.
Piro: Pivotal Tracker Rocket
Open-source Chrome extension and app for tracking assigned stories across multiple projects in Pivotal Tracker.
Unobtrusive jQuery to toggle visibility with selects and checkboxes
jQuery can show or hide form sections based on select values, radio buttons, checkboxes, blank values, and _checked or _unchecked states.
Debug Ruby code
Interactive Ruby debugging lets you pause execution, inspect variables and stack frames, and step through code from a shell or RubyMine.
Heads up: LibreOffice Calc AutoCorrect will change characters when pasting multi-line text
Pasting multi-line text into LibreOffice Calc can unexpectedly capitalize the first character of the last line because AutoCorrect is enabled.
Refile: Ruby file uploads, take 3
Refile is a Rails gem for file uploads with better direct-to-S3 support than CarrierWave, but on-demand image rendering can increase server load and require caching or a CDN.
Spreewald 1.2.0 released: new "select field should be sorted" step
Bugs in select-field ordering can make form choices appear in the wrong sequence; a sorting check helps verify ordered and unordered dropdowns behave correctly.
Rendering: repaint, reflow/relayout, restyle
Browser rendering performance can drop when style or DOM changes force costly repainting and layout recalculation across large parts of the page.
Materialized views with Sequel
Materialized views in PostgreSQL provide precomputed query results for faster reads; Sequel can map them cleanly for ORM-based applications.
Github: Search for a repo you've starred
Find a starred GitHub repository again when the name is forgotten. Astral offers split-screen browsing with README previews for starred repos.
How to circumvent Firefox's "Document expired" page in Selenium tests
Firefox blocks back navigation to POST results with a “Document expired” page, which can disrupt Selenium tests that need to verify recovery from this browser protection.
ImageMagick: Cropping images
ImageMagick cropping can preserve aspect ratio by default, and ! forces exact dimensions when a fixed-size image is needed.