Git: How to show only filenames for a diff

Need a quick view of changed files without the full patch; git diff --name-only lists filenames, while --stat and --numstat add compact change counts.

Deal with different ways of counting weeks and weekdays in Ruby

Ruby Date uses different weekday and week-number conventions for ISO 8601 and North American calendars, affecting year boundaries and week calculations.

Manage your AWS credentials for multiple accounts

Separate AWS account credentials by branch in a Git-managed ~/.aws directory and switch environments with a small shell helper.

Detect city, country from IP address

City and country lookup from IP addresses is possible with GeoLite, but geolocation is often imprecise and the database needs regular updates.

When RubyMine doesn't show you Git blames / annotate gutter not available

Git blame annotations and gutter markers stay unavailable when version control is not configured for the project. Setting the project directory to Git in Project Settings restores them.

OpenStack instance not configuring network (DHCP) correctly

OpenStack VM instances on new compute nodes can stop after DHCPOffer because outgoing DHCP traffic never reaches the guest. Recalculating UDP checksums with iptables fixes the network setup.

Tell RVM which patch level you mean by "1.8.7" or "1.9.3"

RVM can hardcode a specific Ruby patch level for version labels like 1.9.3, causing missing-version errors. Aliases or fuzzy matching let RVM accept another installed patch release.

Scaling Pinterest - From 0 to 10s of Billions of Page Views a Month in Two Years

Pinterest’s growth to tens of billions of page views per month exposed scaling limits and drove careful infrastructure choices around storage, search, caching, and reliability.

How to discard a surrounding Bundler environment

Bundler variables leak into child processes and can force the wrong gemset when running nested bundle commands. Bundler.with_original_env restores the pre-Bundler environment; Bundler.with_unbundled_env is the modern Bundler-free variant.

How to fix: "unexpected token" error for JSON.parse

JSON.parse raises unexpected token when given a top-level string value that is not valid JSON text. Wrap data in an array or object, or use quirks_mode as a workaround.

kamens/jQuery-menu-aim

jQuery plugin for detecting cursor intent over dropdown menus, useful for responsive mega menus that open only when users aim at specific items.

How to access your Rails session ID

Accessing the Rails session ID is only possible when a session ID exists; exposing it is risky and should be done carefully.

Controller specs do not persist the Rails session across requests of the same spec

Controller specs reset the Rails session on every request, so data written earlier disappears between calls. Stubbing controller.session with a shared TestSession preserves state for testing.

Firefox >= 23 will block mixed content when using SSL

Firefox 23 blocks insecure active content on secure pages by default, reducing mixed-content risks while leaving images, video, and audio unblocked.

parallel_tests: Disable parallel run for tagged scenarios

Tag specific Cucumber scenarios so they avoid running together when they contend for a shared resource or browser focus, at the cost of slower tests.

Markdown-like emphasizing for text fields

Lightweight emphasis for text fields without full Markdown, replacing **text** with <strong>text</strong> in Rails views.

How to rotate log files explicitly

Force logrotate to rotate logs immediately when nightly rotation has not run. Useful for huge logs or manual maintenance; Apache configs may restart the service.

What `var` actually does in Javascript

Undeclared assignments in Javascript often create or reuse globals instead of local variables, causing scope leaks and hard-to-track bugs.

ApacheBench may return "Failed requests" for successful requests

ab can report successful responses as failed when later replies differ in content length from the first response. The Length counter often indicates this false positive.

How to horizontally center absolute positioned container with CSS

Absolute positioned containers do not center with auto margins; a left-50% offset with negative half-width margin can align them horizontally.

YAML syntax compared with Ruby syntax

YAML and Ruby have different syntax, and YAML aliases and merge keys often matter when writing Rails locale files. Duplicate keys override earlier values instead of merging nested content.

Article "Pricing Experiments You Might Not Know, But Can Learn From"

Pricing decisions are hard to get right, and small changes can affect revenue and customer response. Practical pricing experiments offer ideas for improving pricing strategy.

Center a float horizontally

Centering a floated element can fit content width when inline-block is unavailable. A CSS/SASS wrapper and Rails helper provide IE7+ support.