Skip to content
Thierry Lam edited this page May 9, 2025 · 15 revisions
  1. Restarting apache

     sudo /usr/sbin/apachectl restart
    
  2. Apache default DocumentRoot is at /Library/WebServer/Documents

  3. Install mtr

  4. Starting memcached as a daemon

     memcached -d -p 8000
    
  5. Speed up terminal startup

     sudo rm -rf /private/var/log/asl/*.asl
    
  6. Find a PID running on a port 8080 and locate the process

     lsof -Pi :8080
     ps -ax | grep -i <PID>
    

Creating a new user

sudo dscl . -create /Users/postgres
sudo dscl . -create /Users/postgres UserShell /bin/bash
sudo dscl . -passwd /Users/postgres postgres
sudo dscl . -create /Users/postgres UniqueID 502
sudo dscl . -create /Users/postgres PrimaryGroupID 1000
sudo dscl . -create /Users/postgres NFSHomeDirectory /Users/postgres

View user ids:

dscl . -list /Users uid

Installing Xcode 4.6.4 Command Line Tools

  1. Once Xcode has been installed from the appstore, open Xcode and click on Preferences...
  2. Click Downloads, select Command Line Tools and click on Install.

Installing Xcode for OSX 10.10

xcode-select --install

fatal error: 'CommonCrypto/CommonKeyDerivation.h' file not found

Installing python's cryptography gives that error. Explicitly set CFLAGS to:

export CFLAGS="-I/usr/include"
pip install cryptography

Python-ldap on OSX Yosemite

export CFLAGS="-I$(xcrun --show-sdk-path)/usr/include/sasl"
pip install python-ldap

no member named 'llrint' in the global namespace issue on OSX 10.10.5

Remove old SDKs under /Developers/SDKs/

Copy file content without new line character

cat ~/.ssh/id_rsa.pub | tr -d '\n' | pbcopy

Terminal Theme Configuration

  • Download the One Dark.terminal and double click on it to automatically add it to the list of themes
  • Open Terminal, Preferences, you will find the One Dark them in the list of themes. Set it to Default to use it.

SQL GUI Client

Sequel Ace

Clone this wiki locally