Fixing Homebrew "Permission denied" issues
When installing your first formula, Homebrew may complain about not being able to access certain directories. The easiest solution to this is:
chown <username> /usr/local/Cellar /usr/local/share # create these directories if they do not exist
Then sudo brew install abc
and you're going.
Related cards:
Rails: Fixing the memory leak / performance issues in prepend_view_path
Recently we detected a memory leak in one of our applications. Hunting it down, we found that the memory leak was located in Rails' #prepend_view_path
. It occurs when the instance method prepend_view_path
is called in each request, which is a ...
Fixing authentication in legacy applications
Authentication is hard: there are many edge cases, and most users (including yourself) usually only go the "happy path" once and never see the edge cases. If you have rolled your own authentication, or been using older authentication solutions, or...
Fixing flaky E2E tests
An end-to-end test (E2E test) is a script that remote-controls a web browser with tools like Selenium WebDriver. This card shows basic techniques for fixing a flaky E2E test suite that sometimes passes and sometimes fails.
Although many examples ...
Git & Mac: Working with Unicode filenames
I had some problems with Git and the file spec/fixtures/ČeskýÁČĎÉĚÍŇÓŘŠŤÚŮÝŽáčďéěíňóřšťúůýž
. After pulling the latest commits, it would show that file as untracked, but adding and committing it would throw `error: pathspec 'check in unicode fixt...
Chromedriver issue #4550 breaks the user agent for device emulation via device name
Newest versions of Chromedriver breaks the user agent for device emulation via device name. In previous versions the user agent of the emulated device was set. In the newest versions the user agent differs from the emulated device.
- Version Chro...
Fixing: no sound on front audio in Ubuntu 11.04
My front audio output would not work even though the front mic input did fine.
The Pulse Audio mixer (= Ubuntu default) does not offer any complex controls to fix the issue. Instead, run gamix
(be prepared for a GUI blast) and switch "Independen...
Mac OS: Remove app from Launchpad
Issue this command:
sqlite3 ~/Library/Application\ Support/Dock/*.db "DELETE from apps WHERE title='APP_NAME';" && killall Dock
This tells sqlite3
to remove the app called APP_NAME
from the Launchpad database and then kill the process ca...
Fixing Ruby debugger: *** Unknown command: "something". Try "help".
So you have placed a breakpoint somewhere and now want to dig around, but not even inspecting variables is working:
(rdb:3) @order_item
*** Unknown command: "@order_item". Try "help".
The reason is, **you must tell the debugger to ev...
Fixing the warning Time#succ is obsolete; use time + 1
Chances are you're seeing the warning repeated a lot of times, maybe thousands of times. Here's how to reproduce the issue:
Example 1
# bad code
(Time.current .. Time.current + 1.hour).include?(Time.current)
# Use Range#cover? instead of ...
Fixing: Gem::Package::PathError: installing into parent path is not allowed
This might be a known issue with Rubygems 2.5.1. This will help:
gem update --system