Skip to content

Instantly share code, notes, and snippets.

View masfj's full-sized avatar

m13o masfj

View GitHub Profile

clang++のincludeパスとか定義済みマクロとかを列挙する

echo | clang++ -v -E -dM -
@masfj
masfj / gist:07ba86b50eeea18b7f66
Last active September 1, 2015 12:15
OSX内にあるclangのinclude search path

"/Library/Developer/CommandLineTools/usr/bin/clang"の場合

#include <...> search starts here:

  • /Library/Developer/CommandLineTools/usr/bin/../lib/clang/6.1.0/include
  • /Library/Developer/CommandLineTools/usr/include
  • /usr/include
  • /System/Library/Frameworks (framework directory)
  • /Library/Frameworks (framework directory)
/sudo::/path/to/you
/ssh:[username]@[hostname]:/path/to/you
/scp:[username]@[hostname]:/path/to/you
$ mkdir pelican_dir
$ pyvenv pelican_dir
$ cd pelican_dir
$ source bin/activate
(pelican_dir) $ pip install pelican
(pelican_dir) $ pip install markdown
(pelican_dir) $ pelican-quickstart
> Where do you want to create your new web site? [.] 
> What will be the title of this web site? (website name)
security find-identity -v -p codesigning
@masfj
masfj / HOMEBREW_MAKE_JOBS.md
Last active November 29, 2015 10:14
HOMEBREW_MAKE_JOBS
HOMEBREW_MAKE_JOBS=4
@masfj
masfj / unique_ptr<CFURLRef>.md
Last active December 12, 2015 03:39
愚直に書くと発狂しそうになるシリーズ
std::unique_ptr<std::remove_pointer<CFURLRef>::type, decltype(&CFRelease)> file(CFURLCreateFromFileSystemRepresentation(nullptr,
                                                                                                                        reinterpret_cast<const unsigned char*>(filename.c_str()),
                                                                                                                        filename.length(),
                                                                                                                        false),
                                                                                CFRelease);
@masfj
masfj / provisioningprofile.md
Created January 20, 2016 08:17
importされているProvisioning Profileがあるディレクトリパス

~/Library/MobileDevice/Provisioning Profiles

@masfj
masfj / no_exception_no_rtti.md
Created February 5, 2016 07:58
no 例外 no RTTI

clang++ -fno-exceptions -fno-rtti

@masfj
masfj / spotlight-reload.org
Created August 21, 2017 06:37
Spotlightが/Applications内の.appを正しく表示しなくなった時の対応

ターミナル上で以下のコマンドを叩く

sudo mdutil -a -i off
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist 
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist 
sudo mdutil -a -i on