Thursday, May 12, 2016

ffplay rtsp command

ffplay -i rtsp://url

To force ffplay to use TCP, add "-rtsp_transport tcp" right after ffplay.
E.g. ffplay -rtsp_transport tcp -i rtsp://url

Tuesday, November 3, 2015

Sharing folders between VMware host and guest O.S.

1. Install VMware Tools. See http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1022048 and http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1022525
     . Virtual Machine -> Install VMware Tools
           sudo mkdir /mnt/vmtools
           sudo mount /dev/sr0 /mnt/vmtools
           cd /mnt/vmtools
           tar zxvf VMwareTools-x.x.x.tar.gz -C /tmp
           cd /tmp/vmware-tools-distrib
           sudo ./vmware-install.pl -d
           sudo reboot

2. Configure share folder
     . Go to settings of the guest VM -> Sharing
           Setup the sharing folder

3. The location of the shared folder will be in /mnt/hgfs or /media/psf/

bash_profile for Mac

# reloads the prompt, usefull to take new modifications into account
alias reload="source ~/.bash_profile"

alias ll='ls -al'
alias ..="cd ../"
alias ...="cd ../../"
alias .3="cd ../../../"
alias .4="cd ../../../../"

#Find CPU hogs
alias cpu_hogs='ps wwaxr -o pid,stat,%cpu,time,command | head -10'

#recommended 'top' invocation to minimize resources
alias ttop="top -R -F -s 10 -o rsize"

# qfind: Quickly search for file alias qfind="find . -name "
alias qfind="find . -name "

# your public ip
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"

# your local ip
alias localip="ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'"

#   ---------------------------
#   6.  NETWORKING
#   ---------------------------

# netCons:      Show all open TCP/IP sockets
alias netCons='lsof -i'

# flushDNS:     Flush out the DNS Cache
alias flushDNS='dscacheutil -flushcache'

# lsock:        Display open sockets
alias lsock='sudo /usr/sbin/lsof -i -P'

# lsockU:       Display only open UDP sockets
alias lsockU='sudo /usr/sbin/lsof -nP | grep UDP'

# lsockT:       Display only open TCP sockets
alias lsockT='sudo /usr/sbin/lsof -nP | grep TCP'

# ipInfo0:      Get info on connections for en0
alias ipInfo0='ipconfig getpacket en0'

# ipInfo1:      Get info on connections for en1
alias ipInfo1='ipconfig getpacket en1'

# openPorts:    All listening connections
alias openPorts='sudo lsof -i | grep LISTEN'

# showBlocked:  All ipfw rules inc/ blocked IPs
alias showBlocked='sudo ipfw list'

#   ii:  display useful host related informaton
#   -------------------------------------------------------------------
    ii() {
        echo -e "\nYou are logged on ${RED}$HOST"
        echo -e "\nAdditionnal information:$NC " ; uname -a
        echo -e "\n${RED}Users logged on:$NC " ; w -h
        echo -e "\n${RED}Current date :$NC " ; date
        echo -e "\n${RED}Machine stats :$NC " ; uptime
        echo -e "\n${RED}Current network location :$NC " ; scselect
        echo -e "\n${RED}Public facing IP Address :$NC " ;myip
        #echo -e "\n${RED}DNS Configuration:$NC " ; scutil --dns
        echo

    }

Tuesday, August 25, 2015

[Books] Five marketing/creative books that have stood the test of time

Source: http://www.adweek.com/adfreak/5-marketing-and-creativity-books-stand-test-time-157640
1. A Technique for Producing Ideas, James Webb Young (1965)
2. The Soul of a New Machine, Tracy Kidder (1981)
3. Bill Bernbach's Book, Bob Levenson (1987)
4. The Book of Gossage, Howard Gossage, edited by Bruce Bendinger (1995)
5. The Cluetrain Manifesto, Rick Levine, Christopher Locke, David "Doc" Searls, David Weinberger (2000)

Saturday, July 25, 2015

Capture packets from iOS devices on Mac OS with Wireshark

RVI (Remote Virtual Interface)

1. Connect your iOS device to a Mac with USB
2. Open terminal and enter "rvictl -s deviceUUID" to start device with interface rvi0
3. Run wireshark and start capturing the packet on interface rvi0
4. Sotp interface rvi0 by enter "rvictl -x deviceUUID"

PS. deviceUUID is the UUID of your iOS device

Friday, July 24, 2015

Useful applications for Mac OS X

Browser:
   . Chrome
   . Firefox
IM:
   . Line
   . Skype
   . QQ
Code editor:
   . Sublime text
IDE:
   . Xcode
Utilities:
   . CleanMyMac
   . Alfred
   . Disk Inventory X
Cloud storage:
   . Dorpbox
Download:
   . BitTorrent
   . FileZilla
Video Player:
   . MPlayerX
Background nature music:
   . Noizio
. NTFS:
   . Paragon NTFS
. Virtual Machine:
   . Parallels Desktop
. Calendar:
   . Sunrise calendar
. Remote Desktop
   . TeamViewer
. Gestures for trackpad
   . BetterTouchTool

Check clients which connect to Mac OS X Wi-Fi Internet Sharing

arp -i bridge100 -a bridge100 may be different on your Mac OSX