Mac OS X Lion: Scan for wireless networks

Mac OS X Lion provides a command line tool to scan for wireless networks and print useful information about the networks:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -s

Also, to see additional information about the currently active wireless connection hold down the Option key while clicking on the Airport Symbol in the menu bar.


Common bashrc settings

There are my personal preferences. Your preferences may differ.

alias e=jed
alias mv="mv -i"
alias cp="cp -i"
alias rm="rm -i"
complete -r
export LANG=C
export EDITOR=jed
export PATH=$PATH:${HOME}/bin


Zotac Zbox ID18 Linux Server

  • Zotac Zbox ID18
  • Samsung SSD 840 EVO 1TB
  • 4GB RAM (SODIMM 1600)
  • Ubuntu 13.10
Samsung SSD firmware update: The process is quite broken:

  • download the 'Windows' Firmware update for the 840 EVO
  • mount it
  • dd the btdsk.img onto a USB stick
  • put the USB stick into the Zotac
  • change the Zotac BIOS so it boots from the USB stick
  • reboot
  • ignore all error messages about missing partitions
  • eventually the Samsung Firmware Update program comes up
  • take note of the Firmware revision
  • follow the instructions of the program
  • wait
  • ignore the message about power cycling the SSD, since you cannot power cycle it in isolation
  • ignore the message about the firmware update being unsuccessful
  • reboot (still from the USB stick)
  • check that you have the new firmware revision
  • Linux shows: ata1.00: ATA-9: Samsung SSD 840 EVO 1TB, EXT0BB6Q, max UDMA/133)
The installation of Ubuntu is quite straight forward.
Recommended settings after installation:
  • Enable TRIM support and avoid unnecessary writes when reading files and dirs:
    • /etc/fstab:
    • UUID= /   ext4    discard,noatime,errors=remount-ro 0       1
  • Reduce amount of disk space reserved for root from 45GB to 1GB:
    • sudo tune2fs /dev/sda1 -m 0.1
  • Install sshd:
    • sudo apt-get install openssh-server
  • Install 'sensors' to check the CPU temp:
    • sudo apt-get install lm-sensors
    • sudo sensors-detect
    • sudo service kmod start
    • sensors
  • Install 'smartmontools' to see the SSD temp and other interesting data:
    • sudo apt-get install smartmontools
    • sudo smartctl -x /dev/sda | grep -i 'Current Temp'
  • Do not start GUI/X
    • edit /etc/default/grub:
      • GRUB_TIMEOUT=1
    • sudo jed /etc/default/grub
    • sudo update-grub
  • I like to install:
    • sudo apt-get install jed apcalc screen minidlna openssh-server samba emacs ispell subversion g++ imagemagick
  • If you have a couple of minutes:
    • sudo apt-get update
    • sudo apt-get upgrade
  • If you would like to manually TRIM the SSD:
    • sudo fstrim -v /
  • Install SAMBA:
Example /etc/samba/smb.conf:
    comment = Share on the Zotac
    path = /zotti
    browsable = yes
    guest ok = yes
    read only = no
    create mask = 0777
    veto files = /.*.pdf/.*.jpg/.DS_Store/._.DS_Store/.*.ini/.*.txt/.*.mov/.*.avi/.*.mpg/.*.png/
    delete veto files = yes
    hide dot files = yes
    hide unreadable = yes


jed settings for indent=4, just spaces, line numbers on, sane brace insertion

My favorite jed setting in $HOME/.jedrc
% For the following to work you _must_ comment out any c_set_style() call!
C_BRACE = 0;
C_Colon_Offset = 0;
public variable C_Class_Offset = 4;