Force showing scroll on Mac with css by releu

757fb0d5ec7560b6f25f5bd98eadc020?size=52

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;
}

#html

Set `policyDelegate` of a WebView to some class and implement the delegate method below in the class. by yaotti

0807a4d6c0319198f4e0abe639ee2703?size=52
- (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];
  }
}

#objectivec #mac

console vim +clipboard on MacOS without recompile by dkoprov

Eec584a074105fb64ab975cb57d1917b?size=52

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

Don't forget to setup Spotlight after installing OS X by releu

757fb0d5ec7560b6f25f5bd98eadc020?size=52

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.

Synch files via iCloud by releu

757fb0d5ec7560b6f25f5bd98eadc020?size=52

Got Mac and iCloud?

Synching files is easy:

open ~/Library/Mobile\ Documents

Create a folder for your files ⌘ ⇧ N

Add folder to Sidebar ⌘ T or to Dock ⌘ ⇧ T

#mac #icloud