句读干货 - 第 014 期 Jan 29, 2016

干货来袭

香橼

iOS Design Tools

Nomad

Sketch plugins

APP 崩溃报告平台

iOS 和 OS X 调试工具

iOS UI Design

Designer News

iOS 越狱工具

Reverse Engineering Tools

iOS

iOS Animation

Objective-C Runtime Programming

Databases

Swift

Lightweight dependency injection frameworks

文章

APP 开发框架

高品质的图片资源

APP icon 工具

算法

Mac OS X Markdown editor

Desktop Tools

icon Designing

omnigroup

postgres

漫画制作工具

Logo 设计

Markdown

绘图工具

VPN 工具

Surge

Shadows

系统工具

Data Visualization

安全漏洞

Tools

理论验证工具

Microservices – 微服务

基于事件的 C/C++ 编程库

HTTP2

ECMAScript 6

JavaScript 的春天

JavaScript 相关转换语言和工具

Web 开发,自动刷新工具

AMP

Hacking PostgreSQL

MySQL

Erlang

Rust

推荐系统

golang

docker

生产力工具

Fault-Tolerant Distributed Systems

Nginx

C

C++

C/C++ 包管理

CSS && SASS

Hacking Tools

系统架构

软件过程及方法

敏捷

敏捷宣言及十二原则

scrum

Lean Software Development

Kanban Methods

Crystal Methods

Extreme Programming (XP)

Feature-Driven Development (FDD)

Dynamic Systems Development Method (DSDM)

敏捷方法比较

Books

翻译软件

在线协作工具

网络数据分析工具

Redis

静态代码分析工具

git

数据结构

Log Structured Merge Trees

Lua

Spark

Building Tools

机器学习

Spark

React

Web 资源

Web 前端框架

Python

Lua

R

实用工具

终端共享工具

数学和密码学

相关开源项目

图书

Linux Kernel

Java 性能分析工具

Small Languages

ASM

编译器设计

可以免费使用的 CI 平台

最佳实践

架构设计

图像化编程

3D 软件

API 设计

设计

职业规划

如何出一本书

读书

Blogs

旅游指南

论文阅读

字体定制

硬件 geek

特别推荐

转行搞实业

其他

视频 – 亚马逊的智能仓库

扩展阅读

祝大家玩的开心

编程之道,就在[编程之美]

编程之美

干货

如何阻止 Mac 进入休眠状态 Jan 25, 2016

阻止 Mac 进入休眠状态

有时想短暂的离开 Mac 又不想其进入休眠状态,该如何设置?

1、毒药正解(执行命令):pmset noidle

后悔药:Ctrl + C 取消命令执行 或 关闭终端。

pmset # OS X 提供的命令行管理电源的工具,其功能远不止于此。

pmset -g # 查看当前电源的使用方案

sudo pmset -b displaysleep 10 # 设置电池供电时,显示器 10 分钟内进入睡眠

sudo pmset schedule wake “01/01/16 19:00:00” # 设置电脑在 2016年1月1日晚7点唤醒电脑

2、使用 caffeinate 命令

在终端输入以下命令:

caffeinate -u -t 14400

其中的数字可以输入任意值,代表你想让系统不进入休眠的时长。

取消操作:在终端中输入 caffeinate,后按下 Control + C 退出。

扩展阅读

祝大家玩的开心

编程之道,就在[编程之美]

编程之美

技术

通过 PIL 库进行 python 图像处理 Jan 21, 2016

安装 PIL 库


  wget http://effbot.org/downloads/Imaging-1.1.7.tar.gz
  tar xfvz Imaging-1.1.7.tar.gz
  cd Imaging-1.1.7
  sudo python setup.py install

或者 sudo pip install PIL –allow-external PIL


  pip install --upgrade pip

 ...
_imagingft.c:73:10: fatal error: 'freetype/fterrors.h' file not found
#include <freetype/fterrors.h>
         ^
1 error generated.
error: command 'clang' failed with exit status 1

  Imaging-1.1.7  sudo brew install freetype
Warning: freetype-2.6_1 already installed
  Imaging-1.1.7  locate freetype/fterrors.h

  Imaging-1.1.7  sudo sudo brew install libtiff libjpeg webp little-cms2

  Imaging-1.1.7  sudo brew install libtiff libjpeg webp little-cms2
Warning: libtiff-4.0.6 already installed
Warning: jpeg-8d already installed
==> Downloading https://homebrew.bintray.com/bottles/webp-0.4.4.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring webp-0.4.4.el_capitan.bottle.tar.gz
🍺  /usr/local/Cellar/webp/0.4.4: 32 files, 1.6M
==> Downloading https://homebrew.bintray.com/bottles/little-cms2-2.7.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring little-cms2-2.7.el_capitan.bottle.tar.gz
🍺  /usr/local/Cellar/little-cms2/2.7: 16 files, 1M


  Imaging-1.1.7  sudo brew reinstall freetype
==> Reinstalling freetype
==> Downloading https://homebrew.bintray.com/bottles/freetype-2.6_1.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring freetype-2.6_1.el_capitan.bottle.tar.gz
🍺  /usr/local/Cellar/freetype/2.6_1: 60 files, 2.5M

  Imaging-1.1.7  sudo python setup.py install
running install
running build
running build_py
running build_ext
--- using frameworks at /System/Library/Frameworks
building '_imagingft' extension
clang -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/include/freetype2 -IlibImaging -I/opt/local/include -I/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/include -I/usr/local/include -I/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imagingft.c -o build/temp.macosx-10.10-x86_64-2.7/_imagingft.o
_imagingft.c:73:10: fatal error: 'freetype/fterrors.h' file not found
#include <freetype/fterrors.h>
         ^
1 error generated.
error: command 'clang' failed with exit status 1
  Imaging-1.1.7
  Imaging-1.1.7  ln -s /usr/local/include/freetype2 /usr/local/include/freetype
  Imaging-1.1.7  ls /usr/local/Cellar/freetype/
2.6_1
  Imaging-1.1.7
  Imaging-1.1.7  ls /usr/local/Cellar/freetype/2.6_1
ChangeLog            INSTALL_RECEIPT.json README               bin                  include              lib                  share

  Imaging-1.1.7  sudo ln -s /usr/local/include/freetype2 /usr/local/include/freetype

  Imaging-1.1.7  sudo python setup.py install
running install
running build
running build_py
running build_ext
...
In file included from _imagingtk.c:19:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not
      found
#       include <X11/Xlib.h>
                ^
1 error generated.
error: command 'clang' failed with exit status 1

  Imaging-1.1.7  locate X11/Xlib.h

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Tk.framework/Versions/8.4/Headers/X11/Xlib.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11/Xlib.h
/Users/guiq/HackingTeam/hackedteam/core-linux/core/multilib/i386/usr/include/X11/Xlib.h
/Users/guiq/HackingTeam/hackedteam/core-linux/core/multilib/x86_64/usr/include/X11/Xlib.h
/Users/guiq/HackingTeam/hackedteam/rcs-db-ext/Python/tcl/include/X11/Xlib.h
/Users/guiq/HackingTeam/informationextraction/core-linux/core/multilib/i386/usr/include/X11/Xlib.h
/Users/guiq/HackingTeam/informationextraction/core-linux/core/multilib/x86_64/usr/include/X11/Xlib.h
/Users/guiq/HackingTeam/informationextraction/rcs-db-ext/Python/tcl/include/X11/Xlib.h
/Users/guiq/HackingTeam/openjailbreak/absinthe-1/include/wxWidgets-2.8.12/include/wx/x11/nanox/X11/Xlib.h
/Users/guiq/HackingTeam/openjailbreak/absinthe-1/include/wxWidgets-2.9.2/include/wx/x11/nanox/X11/Xlib.h
/Users/guiq/taguba/dato-code/SFrame/cxxtest/test/fake/X11/Xlib.h
/Users/guiq/taguba/dato-code/SFrame/deps/conda/include/X11/Xlib.h
/Users/guiq/taguba/dato-code/SFrame/deps/conda/pkgs/tk-8.5.18-0/include/X11/Xlib.h
/opt/X11/include/X11/Xlib.h

  Imaging-1.1.7  ls /usr/local/include/X11
/usr/local/include/X11


  Imaging-1.1.7  ls -lart /usr/local/include/X11
lrwxr-xr-x  1 root  wheel  162 10 13 22:59 /usr/local/include/X11 -> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11
  Imaging-1.1.7

  Imaging-1.1.7  sudo rm -rf /usr/local/include/X11
  Imaging-1.1.7  sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Tk.framework/Versions/8.4/Headers/X11 /usr/local/include/X11
  Imaging-1.1.7  ls /usr/local/include/X11
X.h          Xatom.h      Xfuncproto.h Xlib.h       Xutil.h      cursorfont.h keysym.h     keysymdef.h  xbytes.h
  Imaging-1.1.7  sudo python setup.py install
running install
running build
...

running install_egg_info
Writing /usr/local/lib/python2.7/site-packages/PIL/PIL-1.1.7-py2.7.egg-info
creating /usr/local/lib/python2.7/site-packages/PIL.pth
  Imaging-1.1.7

测试验证


  python
>>> from PIL import Image
>>> pil_im = Image.open('~/test1.jpg')
>>> pil_im = pil_im.convert('L')
>>> pil_im.save('~/test1.jpg')
>>>

扩展阅读

祝大家玩的开心

编程之道,就在[编程之美]

编程之美

PIL

Readings in Database Systems, 5th Edition Dec 8, 2015

Readings in Database Systems, 5th Edition

Readings in Database Systems

扩展阅读

祝大家玩的开心

编程之道,就在[编程之美]

编程之美

Readings

libressl - 代码重构的典范 Dec 4, 2015

代码重构的重要性

代码重构已是一个老生常谈的话题了,只是有人在大刀阔斧的进行,有人在一点点修改,还有人依然在犹豫不决的路上…… 还记得 LibreSSL 吗?就是那个因为 OpenSSL 心脏出血 漏洞,事后 OpenBSD 社区发起的针对 OpenSSL 的重构优化分支。1年过去了,来看看他们都做了什么?

libressl

libressl

libressl

以上图片来自[Bob Beck]大叔的 LibreSSL, and the new libtls API 演讲稿。从中可以看出,OpenBSD 社区的重构效果是非常显著的:

个人觉得,这是 2015 年 OpenBSD 社区所做的最了不起的事,是大家共同努力的结果。他们还计划改造很多其他项目,值得期待。其中,代码可读性的改进是最显著的,我也计划进行一次深入的学习和研究。这是一个很好的典范,希望感兴趣的同学,可以进一步跟进学习。

BoringSSL 是 google 的 OpenSSL 分支,重构的更加激进,部分 ABI 都不兼容了,也值得关注。

扩展阅读

祝大家玩的开心

编程之道,就在[编程之美]

编程之美

libressl