shadowsocks + privoxy/tsocks
shadowsocks: service, socks proxyprivoxy: service, convert socks proxy to http proxytsocks: tool, use socks proxy for any command line
tested under ubuntu14.04
| #!/bin/bash | |
| # | |
| # This version uses September 2017 august stretch image, please use this image | |
| # | |
| if [ "$EUID" -ne 0 ] | |
| then echo "Must be root" | |
| exit | |
| fi |
| # <type>: (If applied, this commit will...) <subject> (Max 50 char) | |
| # |<---- Using a Maximum Of 50 Characters ---->| | |
| # Explain why this change is being made | |
| # |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
| # Provide links or keys to any relevant tickets, articles or other resources | |
| # Example: Github issue #23 |
| #!/bin/bash | |
| # --------------------------------------------------------- | |
| # Customizable Settings | |
| # --------------------------------------------------------- | |
| MOUNT_POINT="${CASE_SAFE_MOUNT_POINT:-${HOME}/casesafe}" | |
| VOLUME_PATH="${CASE_SAFE_VOLUME_PATH:-${HOME}/.casesafe.dmg.sparseimage}" | |
| VOLUME_NAME="${CASE_SAFE_VOLUME_NAME:-casesafe}" | |
| VOLUME_SIZE="${CASE_SAFE_VOLUME_SIZE:-60g}" |
(from Understanding Nginx Server and Location Block Selection Algorithms - https://goo.gl/YyzshP)
server {
| import asyncio | |
| @asyncio.coroutine | |
| def factorial(name, number): | |
| f = 1 | |
| for i in range(2, number + 1): | |
| print("Task %s: Compute factorial(%d)..." % (name, i)) | |
| yield from asyncio.sleep(1) | |
| f *= i |
Note: < i=OS 5.1 use
prefs:. > 5.1 useapp-settings:
| import sys,os | |
| import curses | |
| def draw_menu(stdscr): | |
| k = 0 | |
| cursor_x = 0 | |
| cursor_y = 0 | |
| # Clear and refresh the screen for a blank canvas | |
| stdscr.clear() |