mac

Gatekeeper spctl

Submitted by lepton on Mon, 12/04/2017 - 09:28

Tags

可能因為 Backdoor.MAC.Eleanor 的出現,Apple 取消了System Preferences > Security & Privacy 中 Gatekeeper 允許執行任何來源應用程式,但是 Gatekeep 是可以用 terminal 來關閉,達到容許執行任何來源應用程式(也包括病毒),請小心使用。

打開 Terminal
輸入 sudo spctl --master-disable


回復 Gatekeeper 功能:
打開 Terminal
輸入 sudo spctl --master-enable

 

 To check whether Mail.app is allowed to run on the local system:
           spctl -a /Applications/Mail.app

     To allow Frobozz.app to run on the local system:
           spctl --add --label "My Stuff" /Applications/Frobozz.app

diskutil

Submitted by lepton on Fri, 10/14/2016 - 15:13

Tags

diskutil list

gpt

hdiutil

hdiutil burn -erase //fast erase

hdiutil burn -fullerase 

hdiutil burn iso

hdiutil burn iso -device 

 

hdiutil burn -list // list device

c++ build flag cause the stl function symbol different

Submitted by lepton on Tue, 05/24/2016 - 12:43

Tags

export CXXFLAGS="-std=c++11 -stdlib=libc++"
export LDFLAGS="-stdlib=libc++"

 

link to libc++ or libstdc++

the stl function symbol in object file are different in mac with xcode 7

when use std::vector as a argument

the argument symbol is St6vectorIiSaIi linking to libstdc++

the other is St3__16vectorIiNS6_9allocatorIi

this will cause linking errors