Tag

macOS

13 posts

macOS (/ˌmækoʊˈɛs/; previously Mac OS X, then OS X) is the current series of Unix-based graphical operating systems developed and marketed by Apple Inc. designed to run on Apple's Macintosh computers ("Macs"). It has been preinstalled on all Macs since 2002. Within the market of desktop, laptop and home computers, and by web usage, it is the second most widely used desktop OS, after Microsoft Windows.

Code

Go Proxy Configurations

To speed up our dependencies updating for golang, or prepare some patterns for our special libraries, we probably consider to use a proxy to speed it up.

Code

plist 的格式转换

OS X的配置文件一般是plist.存放在Library/Preferences之类的地方.格式为XML.但最近OS X开始把plist变成binary的,文本打开查看变得很困难.

Code

删掉 macOS 的 app 的启动项

之前在脑残安装了一个很胃痛的 app,很快感觉很不好用,直接丢垃圾箱居然还失败,于是直接 sudo 然后把这个 app 强行删掉了。然后手动解析 pkg 一个一个删文件。teamviewer,对,说的就是这位。

过了几天检查系统 log 的时候,发现系统 log 还在报 teamviewer 启动失败什么的。这才记起来忘了删 launchctl 的启动项了。

Code

如何rsync同步非标准SSH接口

一般情况下,我们用rsync可以很容易的同步一个远程目录.

Bash
$ rsync -avzh --progress --delete \
    name@remote_host:source_dir target_dir

这样就把远程的一个目录同步回来了.

但是现在问题来了,当 port 为非标准的 22 端口时, 我们应该怎样加参数呢?比如有时候我们会 NAT 到 2222 端口.

Code

从 Linux 到 macOS

一个月前更新机器,从我大 Fedora 转到了 macOS, 虽然都继承了Unix的衣钵, 但很多地方还是有些区别的. 入手一个月, 感觉已经可以小用下, 虽然很多地方还是不适应, 至少可以好好写代码了. 抽点时间写下一些 log, 希望能帮助到谁.

Code

Cmake 2.8 以上 OSX RPath的支持

在mac某机器中cmake生成makefile文件的时候,发现提示如下:

....
CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

   cjson
   iniparser
   stemmer
   word2vec

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
....