Upgrade from Ruby 1.8.7 to 2.1.5 – an incomplete guide
Upgrade to Ruby 2.1.5+ avoids many 1.8.7 compatibility problems, especially encoding issues and gem replacements during application migration.
You can now override all Spreewald steps with more specific versions
Avoid Cucumber::Ambiguous by defining a more specific step that overrides a generic one in Spreewald 1.5.0+.
Override Cucumber steps without an ambiguity error
cucumber_priority lets specific step definitions override broader matches without Cucumber::Ambiguous; priorities choose among overridable steps, while non-overridable steps still win.
Spreewald: Click on an element with a CSS selector
Clicking elements by raw CSS selector is brittle; selector_for lets feature steps use plain English names like sidebar instead.
start tcpdump log on high traffic
Avoids continuous packet capture by starting tcpdump only when traffic exceeds a threshold, reducing disk usage and log noise on busy interfaces.
Spreewald: Check that a CSS selector is present on the current page
Spreewald 1.3.0 adds assertions for checking whether CSS selectors are present or absent on the current page, with plain-English selector names via selector_for.
Using the Bash in VI mode
set -o vi switches Bash to VI-style command editing, letting you navigate and edit the shell line with familiar keys and search history with /.
Class: RubyVM::InstructionSequence (Ruby 2.0.0)
RubyVM::InstructionSequence exposes Ruby bytecode internals for disassembly and tail-call optimization, useful for low-level VM inspection and performance tuning.
Adjust cron jobs to allow full backtraces for rake tasks
Cron-failed rake tasks often send mail with shortened traces; enabling --backtrace or --trace preserves the full stack trace for debugging.
Git: Issues with Gemfile.lock
A stubborn Gemfile.lock that resists git checkout, git reset --hard, or git stash is often caused by Rails Spring rewriting the file.
Instant Markdown previews from Vim
Live Markdown preview in the browser for Vim, with GitHub-flavored syntax and automatic updates on every key press.
Exclusive cronjobs with flock and whenever
Prevent overlapping cron executions by wrapping a job in flock and using whenever to skip locked runs instead of waiting.
MutationObserver
Watch a DOM for insertions, removals, and attribute updates without polling, using MutationObserver to react immediately to structural changes.
ne, the nice editor
Command-line text editor with syntax highlighting and menu support, aimed at users who want a simpler alternative to vim and a possible nano replacement.
How to fix: RubyMine occasionally no longer accepts keyboard input
RubyMine and other IntelliJ IDEs can stop accepting keyboard input while the mouse still works, often due to IBus on Ubuntu. Launch-time environment tweaks can restore typing.
CSS Fontstack: An overview of web/web safe font support
Web safe fonts rely on preinstalled system typefaces, with font stacks providing similar fallbacks across platforms. CSS3 web fonts are an alternative when custom typography is needed.
Case Study: Analyzing Web Font Performance
Web font loading can delay first paint and cause FOIT, especially on slow connections. Delivery choices, fallback handling, and reduced font variants improve perceived performance.
IFrame Resizer
JavaScript library for iframes that automatically resize to fit embedded content, reducing scrollbars and extra whitespace.
get haproxy stats/informations via socat
HAProxy exposes runtime status through a Unix socket; socat can query version, connections, backend and frontend statistics, errors, and open sessions.
what to do if nova's iptables rules are missing
OpenStack hosts can lose iptables filter rules after a reboot while NAT remains active, often when nova services start in the wrong order. Restarting nova-compute usually repopulates the missing rules.
ping with timestamps
Timestamp each ping reply to correlate network latency with exact times and log connectivity events more easily.
How to deal with "invalid %-encoding" error in application for malformed uri
Malformed request URIs can raise invalid %-encoding and break the app before routing. A middleware can return 400 Bad Request instead of ArgumentError or ActionController::BadRequest.
Gemspecs must not list the same gem as both runtime and development dependency
Duplicating a gem in both runtime and development dependencies breaks gemspec validation and can make Bundler ignore the package. Put test-only version pins in the Gemfile instead.
Reverse-proxying web applications with nginx
Apache can be awkward for reverse proxying, especially with Digest Authentication and HTTPS passthrough; nginx offers a simpler setup for forwarding requests to another host.