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

osx transfer file to android

一百年没写的blog
osx没法读android的mtp然后用airdrop真的是慢道靠背,还好可以用adb传东西。

1
2
3
4
$ adb root
$ adb remount
//确保可以rw
$adb push Downloads/Persona_JPN_PSP-Caravan/cvn-persona.iso /sdcard/persona.iso
osx

MS Word -- Save Images in Batch

最近被迫写文档,把用word写的本地文档搬到线上去,一堆图片要加,在此记一下osx批量无损导出图片的方法

方法一:

把word保存成网页,在文件夹里面找(都是gif质量有下降)

方法二:

保存成docx,然后用the unarchiver打开, 找到media文件夹,png,jpg都在里面

期末了还在搬砖,怕一闲下来就太想rena啊orz

osx 10.11 El Capitan 修改usb网卡的mac地址

前言

在HKU实验室搬砖,这边的网络和mac绑定的,调试linux服务器只能用一台局域网里的垃圾windows8.1,实在是太annoying,果断改mac上mac。

过程

本想用ifconfig直接修改mac地址,

1
2
$ ipconfig en0 down
$ sudo ipconfig en0 ether xx:xx:xx:xx:xx

结果收到提示ifconfig: ioctl (SIOCAIFADDR): Device power is off
查了一下osx 10.7还是多少以上不能用ifconfig这样改,所幸发现了SpoofMac,装了可以轻轻松松修改en0了不过…

osx