Quick git contributors list
git shortlog -s -n lists contributors by commit count for a revision range, making it easy to find the most active authors.
Using Thin for development (with SSL)
Local SSL development with Thin avoids mixed-content and redirect issues while testing force_ssl on localhost using a self-signed certificate and separate HTTP and HTTPS ports.
Howto: Create a self-signed certificate
Local HTTPS development often needs a trusted certificate; openssl or mkcert can create self-signed X.509 certificates for testing without browser warnings.
Use the same translations for ActiveRecord and ActiveModel
Duplicate model, attribute, and error translations for ActiveRecord and ActiveModel by reusing YAML anchors and aliases instead of maintaining separate locale entries.
JavaScript: How to generate a regular expression from a string
Build RegExp objects from strings, but literal characters are not escaped automatically. Escaping input avoids unintended matches, and flags are passed as a second argument.
Mac OS: Remove app from Launchpad
Remove a stuck app icon from Launchpad by deleting its entry from the Dock database and restarting Dock.
AngularJS: Access the scope for a rendered DOM element
Accessing the AngularJS scope attached to a rendered DOM node helps inspect or manipulate repeated elements, useful for advanced directives and drag-and-drop trees.
Good real world example for form models / presenters in Rails
Rails form-specific model layer for screen logic, separate validations, and callbacks without bloating the base model; useful for different workflows and presentable collections.
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.