mac
An Apple computer.
An Apple computer.
As we know we don't see scrolls on #OSX Lion and above by default, but sometimes we have to show them to user because of #UX.
We can do it just by adding scroll's styles. For example:
#myelement::-webkit-scrollbar {
-webkit-appearance: none;
width: 8px;
}
#myelement::-webkit-scrollbar-track {
background-color: #eee;
border-radius: 8px;
}
#myelement::-webkit-scrollbar-thumb {
border-radius: 8px;
background-color: #666;
}
ruby-build needs RUBY_CONFIGURE_OPTS=--with-readline-dir=`brew --prefix readline` when installing Ruby 2.0 on OSX. More under the cut
- (void)webView:(WebView *)webView decidePolicyForNavigationAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id < WebPolicyDecisionListener >)listener {
if ([[actionInformation valueForKey:WebActionNavigationTypeKey] intValue] == WebNavigationTypeLinkClicked) {
[[NSWorkspace sharedWorkspace] openURL:request.URL];
[listener ignore];
} else {
[listener use];
}
}
Today I was playing with man program and I discovered how man's colored text is transmitted to the less program.
Note: man doesn't use escape sequences to communicates its colors. More under the cut
I found this description:
An agent is a user-oriented background process that is normally unseen but can present a GUI at need, whereas a daemon is a full background process that never shows any interface.
In order to create daemon you should create a #plist file, put it into suitable directory and load to launchd. More under the cut
I don't want to write tons of text, just look at my new aliases:
alias .='mvim .'
alias ,='git'
Usually I use one–letter aliases like b for bundle or g for rails generate. I really dislike stuff like gst for git status or rdbm for rails db:migrate: too much letters and no sense (as for me). So, I like my new aliases, they are short enough.
#shell #bash #ruby #osx #unix #linux #zsh #alias #awesome #incredible
If you use Campfire with OS X, you probably use Flint, too. It's awesome, but I really hate those icons (both from the Dock and Menu Bar). More under the cut
As you know, MacOS brings to you a vim without system's clipboard support. If you watch a vi --version, you should see the -clipboard in the output string.
This is kind of sad, because I tend to use a console vim, rather then GUI MacVim.
All solutions include recompiling a vim from sources, but it's kind of a 'dirty' for me. More under the cut
Spotlight's mdworker will index all files on your #mac.
When you run tests mdworker wakes up and starts index your db files T_T.
For prevent it go to Spotlight Preferences > Privacy, add /var and /usr folders.
Root folders are hidden for basic users, but we can use shortcut ⌘⇧G and write path.
In computing, a TRIM command allows an operating system to inform a solid-state drive (#SSD) which blocks of data are no longer considered in use and can be wiped internally. source
If you are a #mac user install trim enabler from trim-enabler and feel the speed :)
(Actually I haven't felt yet but I am waiting for it).
Here is the gem terminal-notifier.
TerminalNotifier.notify "Message...", title: "Title"

You can add, remove and list notifications. All what you need :)
Thanks, @alloy
To speed up your coding make sure you set keyboard settings properly. Useful settings under the cut
First download and install Xcode from App Store. Then go to http://developer.apple.com and download and install Command Line Tools for Xcode Next step
Solution 1: Make it as disk, like USB-Drive
diskutil erasevolume HFS+ "RAM" `hdiutil attach -nomount ram://2097152`
Solution 2: More under the cut
Did you guys came across such a problem?
Here is the code: More under the cut