YON CISE

Tweets 归档

学习的本质就是将事物之间建立合理的联系并不断优化

2019-05-09T21:26:34Z

1.5s

晓说 第118期 朝花夕拾之怀念胶片时代

2017-10-05T16:34:04Z

这么多年握笔姿势竟然都是错的,原来笔杆要放在食指第三关节处而不是虎口。

2017-09-18T01:04:27Z

无欲速,无见小利。欲速则不达,见小利则大事不成。

2017-08-19T15:14:02Z

漂移: 最大静摩擦大于滑动摩擦

2017-06-07T06:54:26Z

动态类型语言: 变量无类型而变量值才有类型.

2017-05-23T12:44:21Z

Parallelism: A condition that arises when at least two threads are executing simultaneously.

Concurrency: A condition that exists when at least two threads are making progress. A more generalized form of parallelism that can include time-slicing as a form of virtual parallelism.

Concurrency: 同时进行, 但可能只是看上去是在同时进行 (单核 CPU 的时间切片算法).

Parallelism: 真正的在同时进行.

所以简单点可以认为 Parallelism 是 Concurrency 的严格版.

Concurrency vs Parallelism - What is the difference?
Multithreaded Programming Guide

2017-05-23T04:05:01Z

Marquis de Sade - 1994

2017-05-12T06:45:57Z

Around The Corner (1937) How Differential Steering Works

2017-04-18T10:18:02Z

There is no reason to learn how to show you’re paying attention, if you are in fact paying attention.

Celeste Headlee: 10 ways to have a better conversation

2017-04-02T16:48:30Z

An align is a table-like structure, and & is a column separator. The thing is that the columns in an align are rlrlrlrlrl..., that is, every other column is right aligned and left aligned.

What does a double ampersand (&&) mean in LaTeX?

2017-03-30T14:10:33Z

首先要区别两个概念:science和engineering。科学是共享的、透明公开的,但是工程学却是保密的、私有的。发动机的原理可以说是及其简单,而且这个原理在内燃机存在的200多年里从来没变过:燃料燃烧致气体膨胀推动活塞做功。但是science说起来容易,如何用这些人类都知道的白开水一般的理论做出按人类意志行为的engineering却完全是另一回事:如何把功率提上来,重量减下去,寿命延长,效率提高可以说是无穷无尽的漫漫长征。科学结论我们都可以记得住,我相信我们高等科学在记忆上的教育非常成功,但是传统工业的工程学教育可以说是一塌糊涂,生产技术和理论严重脱节。

中国造不出像样的汽车发动机,是真的吗?

2017-03-18T03:52:24Z

Locking is not just about mutual exclusion; it is also about memory visibility. To ensure that all threads see the most up-to-date values of shared mutable variables, the reading and writing threads must synchronize on a common lock. - Java Concurrency In Practice

2017-02-27T07:53:39Z

相机曝光补偿是通过改变光圈,快门和 ISO 值实现的。

2017-02-06T10:14:05Z

安装 qlstephen 后, Mac 的 QuickLook (Finder 中按空格键) 就支持快速预览文本文件

brew cask install qlstephen

2017-02-03T02:32:34Z

“That no one in the world feels up to it. So there is no reason to worry” - YOUTH

一部需要带上耳机听的安静的电影.

2017-01-24T17:22:49Z

最近在甘其食学做包子,仿佛回到了以前练花式的日子,为了做好一个动作不断的扣细节。

2017-01-16T14:17:08Z

匠心应该是在能够批量生产的前提下把一件事情做到极致。再美好的东西如果只有少数人能够享受,又有什么意义呢?

2017-01-08T04:13:24Z

01/06/2017 第一次在自己坐的车上发生事故.

2017-01-07T05:09:25Z

Mac 接了鼠标, 发现滚动的方向不符合直觉. 但是直接改系统设置后鼠标正常了, 触摸板的方向却又反了.

好在一款叫做 Scroll Reverser 的软件可以完美解决问题.

How to separate “mouse” and “trackpad” settings?

2016-12-31T15:30:35Z

Docker 容器的日志位于 /var/lib/docker/containers. Docker 1.12 swarm 中的 service 好像不支持

--log-opt max-size=[0-9]+[kmg]
--log-opt max-file=[0-9]+

暂时使用 logrotate 来防止日志过大:

/var/lib/docker/containers/*/*-json.log {
    daily
    rotate 7
    compress
    dateext
    copytruncate
}

Configure logging drivers

Docker container logs taking all my disk space

logrotate

2016-12-29T02:53:31Z

Ubuntu 中可以使用 Upstart 启动 service.

  1. 脚本存放在 /etc/init
  2. 使用 initctl 命令控制

示例:

description "ss-server"

start on runlevel [2345]
stop on runlevel [06]

# 自动重启
respawn

exec ss-server -c /etc/shadowsocks-libev/config.json

How To Configure a Linux Service to Start Automatically After a Crash or Reboot – Part 1: Practical Examples

2016-12-28T06:00:10Z

Mac 下 GUI 程序的 PATH 值默认为 /usr/bin:/bin:/usr/sbin:/sbin, 导致 gradle 执行外部程序 (例如 docker) 的脚本在 IntelliJ 下无法正常运行.

执行 sudo launchctl config user path /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin 后重启即可.

fix PATH environment variable for IntelliJ IDEA on Mac OS X

2016-12-28T05:39:12Z

Well, my brother has his sword and I have my mind. And a mind needs books like a sword needs a whetstone. That’s why I read so much, Jon Snow.

2016-12-26T14:53:56Z

每天都应该记录点东西, 但是写博客又太耗费精力了. 本想用 twitter 来记录, 但是 twitter 不支持数据导出 (可怜的占有欲作祟), 最后发现还是 Disqus 好用, 不但能导出还能嵌在博客里!

2016-12-26T14:38:52Z