Mac

Posted by Shi

Useful tips

How to Determine File Type & Encoding from Command Line in Mac OS X

file -I /Users/Downloads/159202-31877 
Output: /Users/Downloads/159202-31877: audio/mpeg; charset=binary

Dictionary

自动取词

鼠标指向要取词的对象,同时按住 Control + Command + D

字典排序

拖拽字典来进行排序

Install MacOS

Setup steps:

Usb:

Login to the server:

  1. Erase usb

  2. sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/Capitan --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app --nointeraction
    
    sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/Sierra --applicationpath /Applications/Install\ macOS\ Sierra.app --nointeraction
    

    ```

  3. apt-get install python-pip

  4. pip install shadowsocks

  5. modify the file with nano /etc/shadowsocks.json

    Modify YOUR_SERVER_IP , YOUR_PASSWORD then write the following code:

    {
      "server": "YOUR_SERVER_IP",
      "server_port": 8388,  
      "local_address": "127.0.0.1",  
      "local_port": 1080,  
      "password": "YOUR_PASSWORD",
      "timeout": 300,  
      "method":"aes-256-cfb"
    }
    
  6. Click Ctrl+X then click Y to save the modification.

  7. To start the service with ssserver -c /etc/shadowsocks.json -d start

Reference

http://www.jianshu.com/p/2ff576583361

Mac

Setup

Insert the YOUR_SERVER_IP, Port number (8388) and YOUR_SERVER_IP

Linux

shadowsocks-gui

iOS

shadowrocket

 MobileShadowSocksAvailable on the App Store

Please visit the App Store.

Android

Google Play   百度网盘 密码: 8ccr

SSClient usage

Start SSClient

sslocal -s 64.137.221.72 -p 8388 -b 127.0.0.1 -l 1080 -k "a" -m aes-256-cfb

` sslocal -s 64.137.221.72 -p 8388 -k “a”`

Privoxy
  1. Install Privoxy

    sudo apt-get install privoxy

  2. 配置Privoxy (Privoxy的配置文件在/etc/privoxy/config)

    nano /etc/privoxy/config

  3. 找到4.1. listen-address这一节,确认监听的端口号。

#  Example:
#
#      Suppose you are running Privoxy on a machine which has the
#      address 192.168.0.1 on your local private network
#      (192.168.0.0) and has another outside connection with a
#      different address. You want it to serve requests from inside
#      only:
#      
        listen-address  192.168.0.1:8118
  1. 找到5.2. forward-socks4, forward-socks4a, forward-socks5 and forward-socks5t这一节,加上如下配置,注意最后的点号。
#  Examples:
#  
#      From the company example.com, direct connections are made to
#      all "internal" domains, but everything outbound goes through
#      their ISP's proxy by way of example.com's corporate SOCKS 4A
#      gateway to the Internet.
#  
#        forward-socks4a   /              socks-gw.example.com:1080  www-cache.isp.example.net:8080
#        forward           .example.com   .
#      
#      A rule that uses a SOCKS 4 gateway for all destinations but no
#      HTTP parent looks like this:
#
#        forward-socks4   /               socks-gw.example.com:1080  .
#      
#      To chain Privoxy and Tor, both running on the same system, you
#      would use something like:
#
         forward-socks5   /               127.0.0.1:1080 .

  1. 有关Privoxy的配置就结束了,重启一下Privoxy。

    sudo /etc/init.d/privoxy restart

  2. 接着配置一下终端的环境

    sudo nano ~/.bashrc

    add

    export http_proxy="127.0.0.1:8118"

    export https_proxy="127.0.0.1:8118"

    source ~/.bashrc

  3. Test

    wget http://www.google.com

  4. 接着将Privoxy添加到开机启动

    nano /etc/rc.local中添加如下命令,注意在exit 0之前:

    sudo /etc/init.d/privoxy start

Note:

http://www.linuxdiyf.com/linux/17144.html

http://www.auooo.com/2015/06/26/shadowsocks%EF%BC%88%E5%BD%B1%E6%A2%AD%EF%BC%89%E4%B8%8D%E5%AE%8C%E5%85%A8%E6%8C%87%E5%8D%97/

http://www.voidcn.com/blog/xwydq/article/p-5796260.html