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 called Dock
, thereby restarting it.
Related cards:
Rails asset pipeline: Why relative paths can work in development, but break in production
The problem
When using the asset pipeline your assets (images, javascripts, stylesheets, fonts) live in folders inside app
:
app/assets/fonts
app/assets/images
app/assets/javascripts
app/assets/stylesheets
Wit...
How to type brackets, braces, pipe, backslash, or at sign on OSX
On OSX (real or inside Browserstack), you need different keystrokes for your favorite special characters than you'd use on Linux or Windows.
Character | OSX Keystroke |
---|---|
[ |
Alt+5 ... |
Remove resource fork files from a FAT volume on MacOS
Be careful!
The following solution will delete files on a volume. If you don't know exactly what you're doing, you can run into big trouble with your computer.
I play mp3 files on my car stereo that are stored on a SD-C...
Mac: Turn applications to Full Screen mode from bash
I needed a way to make my apps full screen from bash scripts. There is no super-easy way, but it's not too hard either.
Put the attached script into e.g. /usr/local/bin
and make it executable. Now you can call
fullscreen Safari
and Sa...
Rails: Assigning associations via HTML forms
Let's say we have posts with an attribute title
that is mandatory.
Our example feature request is to tag these posts with a limited number of tags. The following chapters explain different approaches in Rails, how you can assign such a...
Rails: Example on how to extract domain independent code from the `app/models` folder to the `lib/` folder
This cards describes an example with a Github Client on how to keep your Rails application more maintainable by extracting domain independent code from the app/models
folder to the lib/
folder. The approach is applicable to arbitrary scenarios...
Git restore vs. reset for reverting previous revisions
The git doc states on the difference of these two commands:
- git-restore[1] is about restoring files in the working tree from either the index or another commit. This command does not up...
jQuery: How to remove classes from elements using a regular expression
jQuery's removeClass
removes the given class string from an element collection. If you want to remove multiple/unknown classes matching a given pattern, you can do that.
For example, consider a DOM node for the following HTML. We'll reference i...