mac使用caffeinate放休眠

不想装第三方(Amphetamine之类的),mac原生自带caffeinate命令防休眠

1
2
3
4
5
6
7
8
9
10
-d Create an assertion to prevent the display from sleeping.
-i Create an assertion to prevent the system from idle sleeping.
-m Create an assertion to prevent the disk from idle sleeping.
-s Create an assertion to prevent the system from sleeping. This assertion is valid only when system is running on AC power.
-u Create an assertion to declare that user is active. If the display is off, this option turns the display on and prevents the display from going
into idle sleep. If a timeout is not specified with '-t' option, then this assertion is taken with a default of 5 second timeout.

配合alfredCaffeinate Control效果拔群。

osx

osx 10.13 python SSL报错(ssl module in Python is not available)

待更新。。。

###问题描述

1
2
3
4
5
6
$ pip install pyopenssl --trusted-host pypi.python.org
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting pyopenssl
Could not fetch URL https://pypi.python.org/simple/pyopenssl/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement pyopenssl (from versions: )
No matching distribution found for pyopenssl

From Python Developer’s Guide

As of OS X 10.11, Apple no longer provides header files for the deprecated system version of OpenSSL which means that you will not be able to build the _ssl extension.

osx