Review the MVC pattern with Objective-C on iOS development again.

Preface

MVC(Model-View-Controller) architectural pattern is over 40 years old today and has been already used in so many iOS projects, it’s also the most usual pattern I saw in all kinds of team and company projects. There

Read More

Time to drink some water…

Drink reminder

这种功能的 app 就有很多了,但是在办公室如果是在手机上发出来的提醒会比较弱,我甚至会觉得是一种干扰,所以索性也移到了 mac 里。

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>willhan.drink.reminder</string> <key>ProgramArguments</key> <array>
  

Wake me up lightly.

Alarm

前段时间在公司的时候午休时间我一般会小憩一会儿,但是很容易睡过头了,睡久了下午反而更没精神了,所以我需要这样一个办公室闹钟:不会打扰其他人,只会叫醒我自己,更不要瞎吵吵一下子把我吓醒的。

通常很多音频播放类 app 都会有延时停止的功能,但是延时播放的倒计时闹钟好像并不多,于是索性自己写一个。

# Play music after specified duration as an alarm. alarm: #!/usr/bin/env bash set -euo pipefail echo -n "How soon should I wake you up? > "