Python dev workflow on macOS

Here is the new workflow in place of the old popular one using virtualenv, pip, requirements.txt and virtualenvwrapper. Tools pyenv for Python version installation and switch Pipenv for virtualenv creation…

Continue Reading Python dev workflow on macOS

自动转发Twitter到微博

在Twitter上关注了几个图片账号, 比如@HistoryInPix, 经常想把一些有趣的图文转发到微博, 但操作起来却麻烦. 闲来无聊, 就做了个小机器人来自动把感兴趣的账号发的推全部转发到微博的某个账号(@图中看史)里, 这样在微博里就可以关注和转发了. 简单记录一下过程. Open source: GitHub: twitter2weibo 准备工作 首先, 在Twitter和微博的开发平台上注册成为开发者, 并分别创建应用. Twitter开发平台 微博开放平台 Twitter上很简单, 创建即生效, 直接拿到四个值: consumer_key, consumer_secret, access_token, access_token_secret. 微博上就有点麻烦, 因为需要官方审核. 因此需要做一个简单网页, 放上微博组件, 审核通过后才可以让第三方账号(开发者之外的账号)使用.…

Continue Reading 自动转发Twitter到微博

Move Jekyll blog to Ubuntu VPS

(Tested on: Linode with Ubuntu 16.04 LTS) Install Jekyll on Ubuntu VPS sudo apt update && apt -y upgrade sudo apt install ruby ruby-dev ruby-bundler zlib1g-dev build-essential make gcc git…

Continue Reading Move Jekyll blog to Ubuntu VPS

Introducing Mole

After writing the last post Note taking without note taking app, I found that manipulating documents via a minimal UI would be more efficient than via command lines. So in…

Continue Reading Introducing Mole