Skip to content

Instantly share code, notes, and snippets.

View dehengxu's full-sized avatar
🐈
Focusing

DehengXu dehengxu

🐈
Focusing
  • BeiJing.China
View GitHub Profile
@dehengxu
dehengxu / codesign_gdb.md
Created July 15, 2018 04:51 — forked from hlissner/codesign_gdb.md
Codesign gdb on OSX

Note: these instructions are for pre-Sierra MacOS. Sierra Users: see https://gist.github.com/gravitylow/fb595186ce6068537a6e9da6d8b5b96d by @gravitylow.

If you are getting this in gdb on OSX while trying to run a program:

Unable to find Mach task port for process-id 57573: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))
  1. Open Keychain Access
@dehengxu
dehengxu / osx_setup.md
Last active February 20, 2019 05:20 — forked from mcls/osx_setup.md
Setup mac for ruby dev

Setup new Mac from scratch

Re-create admin user

  1. Reboot with command + s
  2. Enter /sbin/mount -uw in Terminal
  3. rm var/db/.AppleSetupDone Remove cache data.
  4. Reboot again.

Install Xcode

server {
listen 80;
server_name www.example.com;
root /var/www/vhosts/example.com/public/;
location /
{
index index.php index.html index.htm;
}