Tag Archives: brew

Raspberry Pi lost… and found

How to find my RPi2 on network. I use arp-scan, brewed in my MacOS shell:

$ brew update
$ brew install arp-scan

Optional steps (for proper vendor decoding):

$ get-iab -v -f /usr/local/share/arp-scan/ieee-iab.txt
Renaming /usr/local/share/arp-scan/ieee-iab.txt to /usr/local/share/arp-scan/ieee-iab.txt.bak
Fetching IAB data from http://standards.ieee.org/develop/regauth/iab/iab.txt
Fetched 2452407 bytes
Opening output file /usr/local/share/arp-scan/ieee-iab.txt
4567 IAB entries written to file /usr/local/share/arp-scan/ieee-iab.txt
$ get-oui -v -f /usr/local/share/arp-scan/ieee-oui.txt
Renaming /usr/local/share/arp-scan/ieee-oui.txt to /usr/local/share/arp-scan/ieee-oui.txt.bak
Fetching OUI data from http://standards.ieee.org/develop/regauth/oui/oui.txt
Fetched 3245695 bytes
Opening output file /usr/local/share/arp-scan/ieee-oui.txt
21123 OUI entries written to file /usr/local/share/arp-scan/ieee-oui.txt

Now scan local network (don’t forget sudo):

$ sudo arp-scan --localnet | grep -i 'b8:27:eb'
192.168.1.102	b8:27:eb:dd:e3:c6	Raspberry Pi Foundation

Found.

Brew Cask cleanup orphans

find /opt/homebrew-cask/Caskroom -depth 1 -print -exec \
  sh -c "ls -1A {} | grep -v .metadata | head -n -1" \; | grep -B1 -E '^[^\/]'

output will show you extra files in directory which should be removed

/opt/homebrew-cask/Caskroom/google-chrome
.DS_Store
--
/opt/homebrew-cask/Caskroom/iterm2
.DS_Store
--
/opt/homebrew-cask/Caskroom/opera
24.0.1558.64

also it will display orphaned versions of exact Cask which should be zapped

brew cask zap opera
brew cask install opera