Fix Capistrano warnings: Missing public directories
Capistrano deployment warnings can appear when Rails asset pipeline apps lack empty public subdirectories. Placeholder files like .gitkeep suppress the missing-path errors.
Scroll a textarea to a given line with jQuery
Scrolling a textarea to a specific line depends on pixel line height and can drift when wrapped lines change the visual line count.
Convert primitive Ruby structures into Javascript
Ruby values can be embedded safely in Javascript responses by serializing them to JSON, avoiding manual quoting and escaping problems.
Git: Change the text editor used to enter commit messages
Set Git's commit-message editor globally by changing core.editor in ~/.gitconfig; useful when the default editor is inconvenient or unavailable.
Uncaught exception in PassengerServer client thread exception: Cannot accept new connection: Too many open files
Passenger fails to accept new connections when the process reaches the open file descriptor limit, often due to too many running instances or too low per-process limits.
zClip :: jQuery ZeroClipboard
Lightweight jQuery clipboard-copy plugin built on Zero Clipboard, using an invisible Flash movie compatible with Flash Player 10 and below.
fnando/i18n-js
Rails I18n translations become available in JavaScript clients through a small library for sharing locale data outside the server.
CodeMirror
JavaScript browser code editor with syntax highlighting and optional indentation support for many languages.
xterm: Have a black background by default
Set xterm’s default colors in ~/.Xresources to avoid black text on white backgrounds; xrdb applies the settings to the current X session.
How to fix Passenger "Unexpected end-of-file detected" error
Passenger can fail with a misleading EOF error when the app spawner exits unexpectedly, often because a gem is missing. bundle install usually resolves it.
Validate attachment presence using paperclip
Paperclip attachment presence validation depends on has_attached_file being declared first; conditional validation with :if also works.
LibreOffice Calc: How to paste cells without overwriting other cells
Calc pastes normally overwrite existing spreadsheet cells; inserting clipboard cells instead shifts surrounding cells down or right.
Building Gem 'RedCloth' with Bundler and GCC 4.6
RedCloth can fail to install through Bundler on older GCC toolchains; adding a build flag suppresses warnings during compilation.
Issue with an escaped "equals" sign in the development log email representation
Quoted-printable encoding turns = into =3D in development email logs, which can make token values look longer than they are.
Shell script to deploy changes to production and not shoot yourself in the foot
A geordi command streamlines safe production releases by comparing master and production, confirming the merge, then pushing and deploying migrations with Capistrano.
Move page breaks in LibreOffice Calc
Printed spreadsheet areas in LibreOffice Calc can be adjusted by moving page breaks in preview and changing sheet scaling settings.
Fix warning: Cucumber-rails required outside of env.rb
Bundler 1.1 can trigger a misleading Cucumber warning during test runs; disabling automatic loading for cucumber-rails removes it without moving the gem into a test group.
Todo.txt: Future-proof task tracking in a file you control
Plain-text task lists stay portable across devices and apps, with Dropbox sync, mobile editing, and a CLI for quick task management; nesting is not supported.
validates_acceptance_of is skipped when the attribute is nil
validates_acceptance_of silently skips nil attributes, so a missing checkbox or typo can leave acceptance unchecked; a boolean field with validates_presence_of is safer.
Git: Push a new branch and track it immediately
New branches pushed to origin do not track a remote branch by default, so git pull cannot follow their upstream; git push -u sets the tracking reference immediately.
Define a route that only responds to a specific format
Constrain a Rails route to a single response format such as XML when one URL must serve only that representation.
MySQL shell: Vertical vs horizontal layout
\G in the MySQL shell switches query output to a vertical format, which is easier to read for wide rows or long text fields.
Tabs in Textarea Plugin for jQuery
Use Tab and Shift+Tab in regular textareas to indent or outdent code for in-browser editing of HTML, CSS, JavaScript, or server-side languages.
Ruby: Find the most common string from an array
Find the most frequent string in an array without failing on empty input; the approach uses grouping and returns the first value from the largest group.