Postgres Index Types
Postgres uses B-Tree indexes by default, but other index types can perform better for specialized lookup patterns and data distributions.
Test e-mail dispatch in Cucumber
Spreewald Cucumber steps can verify that e-mails were sent with arbitrary conditions, useful for testing mail dispatch logic.
Reading and writing cookies in JavaScript
Client-side cookies in JavaScript can be read and written through document.cookie, but values must be parsed and path and expiry must be set carefully.
An interactive Git shell
A dedicated shell for Git workflows reduces repetitive typing and keeps command entry focused. git config --global help.autocorrect true helps absorb accidental git prefixes inside gitsh.
How to fix: HTML5 video not working in IE9
IE9 can fail to play HTML5 video unless HTML5 mode is forced. Using an HTML5 doctype or X-UA-Compatible meta tag enables playback.
Infinitely nested hashes in Javascript (Coffeescript)
Read and write deeply nested object values without manual path checks; NestedHash recursively traverses keys and creates missing levels.
MySQL / MariaDB: Show disk usage of tables and columns
Disk space usage in MySQL or MariaDB can be measured per table and per column with simple information_schema and char_length queries.
Ever wanted man pages that actually help? Here you go
Command-line syntax is hard to read; explainshell breaks commands into parts and explains each option using parsed man pages.
Git: Delete a branch (local or remote)
Removing local or remote Git branches prevents stale feature lines and clears finished work. git branch -d and git push origin --delete handle the common cases.
Analyse short links
Short links can reveal their destination and redirect chain before you click them by adding + to the end; public stats and profile exposure can leak traffic information.
Looping through iterators in Coffeescript
Modern JavaScript APIs often return iterators, and CoffeeScript cannot use for...of for them. while with iterator.next() is needed to read iterable values.
Manually uploading files via AJAX
Binary file uploads need FormData so AJAX can send multipart payloads from file inputs without manual serialization; older browsers often need a plain form fallback.
Postgresql: trigram indexes for searching
Fuzzy string matching can be slow or inaccurate with LIKE and full text search. Trigram indexes offer a lighter approach for partial search and typo tolerance.
Get compiled code of a view template in Rails 4.2
Inspecting the generated Ruby for erb or haml templates helps debug rendering issues and understand what Rails executes. lookup_context.find_template and the template handler return the compiled output code.
Stackprof - sampling call-stack profiler for ruby
Fast Ruby profiling by sampling stack traces at intervals, suitable for production and CPU-focused performance analysis with raw dump inspection.
How to fix routing error when using concerns in Rails up to 3.2.22.1
Routing error in Rails 3.2.22.1 can appear when concerns is passed as an option to resources, producing broken routes and failed controller specs.
Linux: How To Fix Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release : chrome
Chrome no longer supports 32-bit Linux builds, which can break apt-get update with a repository Release fetch error. Updating the APT source to amd64 avoids the failure.
nginx: How to drop connections for a location
return 444 makes nginx close a connection without sending a response, useful for rejecting specific routes or simulating dropped requests behind a reverse proxy.
Capybara: Find the innermost DOM element that contains a given string
Finding a matching text node in nested DOM trees is tricky because broad text queries return ancestor elements too. Selecting the deepest element avoids false matches in Capybara, XPath, and jQuery.
How to reverse the order of HTML elements with CSS
Reversing element order with CSS helps make inline lists stack in a different visual order on small screens without changing the markup.
netstat: Sum open connections by IP (and sort it)
Count network connections by remote IP and sort them to spot hosts with many open or lingering sessions. Works on FreeBSD and Linux using netstat and shell tools.
Google Analytics Debugger
Chrome extension for inspecting Google Analytics tracking in complex setups. Opens in the developer console and stays lighter than broader tag-assistance tools.
djberg96/sys-filesystem: A Ruby library for getting filesystem information
Cross-platform filesystem metrics are awkward to gather in Ruby; sys-filesystem uses FFI to provide them without parsing df output.
One-liner syntax in RSpec's should-based and expect-based syntaxes
RSpec one-liners can assert expectations on subject with implicit example descriptions, using should or is_expected in expect-based syntax.