Franklin: An American Life 读后感

The naive image of Franklin:

  1. industrial and frugal
  2. lightning and Kite

The complete image of Franklin:

  1. Family background: commoner emigrated to US
  2. successful publisher and writer
  3. influential local leader and politician
  4. key colony leader and founding father and diplomat
  5. popular among elite women, failed son and grandson
  6. practical scientist, engineer, inventor

My take:

  1. He is REALLY smart, polymath, mastered both science and people, affecionate to everyone
  2. Although flirt with women, he seems more platonic than erotic.
  3. As smart, successful and influential as Franklin is, his marriage was practical, his son and grandson failed. And his lineage ended there. On the other hand, his legacy will never die, become part of American spirit.
  4. The critic view of Franklin in subsequent times does not change who Franklin is, but rather reflect what kind of time it is. Conservatives attacked him not caring about the golden pavement of heaven. Romanticist attacked him only care about money nickel and dimes, not heroic. Now all seems naive.

Franklin is one of the two lines down passed in American cultural history: the pragmatic industrial frugal smart mundane democratic mid class. Not the elitist, religious, conservative.

《道德完善计划》13条
  (1)Temperance: Eat not to dullness; drink not to elevation.
  一、节制:食不过饱,饮不过量。
  
  (2)Silence: Speak not but what may benefit others or yourself; avoid trifling conversation.
  二、缄默:言则于人于己有益,不作鸡毛蒜皮的闲扯。
  
  (3)Order: Let all your things have their places; let each part of your business have its time.
  三、条理:物归其位,做事之前制定时间表,按照计划,在相应的时间内完成应该做的事情。
  
  (4)Resolution: Resolve to perform what you ought; perform without fail what you resolve.
  四、决断:做事应该果断,不要拖泥带水,一旦决定就要付诸行动,还要坚持到底。
  
  (5)Frugality: Make no expense but to do good to others or yourself; i.e., waste nothing.
  五、节俭:不要做无益的花销,杜绝不必要的浪费。
  
  (6)Industry: Lose no time; be always employ’d in something useful; cut off all unnecessary actions.
  六、勤勉:不浪费时间,时时刻刻都要用于正经事,戒除一切不必要的行动。
  
  (7)Sincerity: Use no hurtful deceit; think innocently and justly, and, if you speak, speak accordingly.
  七、诚恳:绝对不可以欺骗他人,考虑问题应公平公正,襟怀坦荡,发表观点时要有理有据,尊重事实。
  
  (8)Justice: Wrong none by doing injuries, or omitting the benefits that are your duty.  
  八、正直:不做有损他人之事,不要放弃履行行善助人的义务,从而伤害他人。
  
  (9)Moderation: Avoid extreams; forbear resenting injuries so much as you think they deserve.
  九、中庸:为人处事不要极端偏激,对待他人的一时发泄,应当加以宽容,不要斤斤计较、怀恨记仇。
  
  (10)Cleanliness: Tolerate no uncleanliness in body, cloaths, or habitation.
  十、清洁:仪表,身体、衣服和住所都应当力求清洁。
  
  (11)Tranquility: Be not distuibed at trifles, or at accidents common or unavoidable.   
  十一、沉着:不要因为琐事或者难以避免的不测而烦恼。
  
  (12)Chastity: Rarely use venery but for health or offspring, never to dulness, weakness, or the injury of your own or another’s peace or reputation.
  十二、贞节:切忌房事过度,以免伤害身体或有损自己或他人的安宁和名誉。
  
  (13)Humility: Imitate Jesus and Socrates.
  十三、谦虚:效法耶酥和苏格拉底。

豆瓣佳评:

https://book.douban.com/review/5476619/

越是争议越卖座 — 流浪地球观后感 (无剧透)

看完了,满意,激动!细节给导演更多荧幕时间和制作预算的话还可以更完美,但是拍成这样已经很不错啦。

突然觉得好幸福,从中学时代每期追科幻世界,在某期上读到 带上她的眼睛 这样的极早期作品,拿了当年的银河奖,到每期科幻世界先翻目录找刘慈欣的名字,他银河奖拿到手软,到大学科幻世界出中篇小说单行本为 球状闪电 里的量子玫瑰唏嘘,到三体横空出世被深深震撼,大刘也拿到了雨果奖!磁铁们最大的心愿就是能看到作品成功搬上荧幕。

所以在经历了三体拍电影和流产的兴奋和失望之后,今天等到流浪地球呈现在眼前的时候,心中都是满足和幸福。就像当年读到 带上她的眼睛 短短的几页,相信这只是一个美好时代的开始,期待 地火 全频道 山 球状闪电 甚至刘慈欣以外的一些中国优秀科幻作品都能搬上荧幕。

流浪地球最近争议很多,越是争议越是卖座,希望中国科幻电影走向成熟和成功,科幻作家的生存和科幻文学的市场也越来越好,越来越普及。I choose hope. 前进三!

小帆船

曾梦回大航海时代
穿过海上丝路的迷雾
带领大明的船队
发现蛮荒待垦的新大陆

曾化身杰克船长
穿梭于世界的尽头
驾着飞翔的荷兰人
化解黑珍珠的诅咒

曾敬佩翟墨真汉子
向西方出发,从东方归航
郑和的风帆落下太久
谁还记得大海的模样?

曾感叹云天明
来了 爱了 临走送她一颗星
乘着核爆推动的太阳帆
讲述童话中的黑暗森林

曾听见水手说
风雨中这点痛算什么
不要怕
至少我们还有梦

孤独航行的小帆船
仍梦想四海扬帆
底下是大海的沉静碧蓝
头顶是金阳灿烂

* 句子多有借鉴 请多包涵

FireFox for Mac中文字体粗细大小不一的解决办法(默认英文)

我的Firefox for Mac 一直有这个问题,某些中文网站字体显示粗细大小不一。如图:

困扰我很久,参考知乎的答案:
https://www.zhihu.com/question/19586802

答案中的用户把中文zh放在了en之前,结果访问很多国外网站比如Airbnb, Kayak时,它们默认我来自中国(因为zh-cn排第一嘛)。把界面,货币等都默认为中国,对于在海外学习生活的我们不是很方便。

解决办法是:把en-US(如果在美国),en放在zh-cn之前。

这样访问英文网站没问题,中文字体也没问题。效果如下图:

设置Firefox / Preferences / Content / Languages

你也可以加入zh-hk,zh-tw以便访问这些地区的繁体网站。如图:

Seasons of Los Angeles 洛城四季

最后的叶子落下的时候 When last leaf falls
你和冬天一起来到我身边 Along with Winter you come to me
海都不动了 Ocean remains still
我把蓝天给了你 I give you sky
把蓝色留给自己 Leaving myself the blue

第一朵蓝花楹绽开的时候 When first Jacaranda blooms
你和春天一起拂过窗前 Along with Spring you pass my window
星都不闪了 Stars no longer glow
我把雪山给了你 I give you snow peaks
把冰川留给自己 Leaving myself the ice

排排棕榈摇曳的时候 When palm trees waver
你和夏天一起漫过沙滩 Along with Summer you rush to shore
鸥都唱累了 Seagulls tired of singing
我把浪花给了你 I give you breakers
把涛声留给自己 Leaving myself the tides

满树桔子红了的时候 When oranges turn yellow
你和秋天一起掠过山林 Along with Autumn you glide across ridges
大地都燃烧了 Land is burning
我把晚霞给了你 I give you sunset
把暮光留给自己 Leaving myself the twilight

最初的雪花融化的时候 When first snowflake melts
你走过四季回到我身边 Through four seasons you back to me
心稳稳在跳 Heart goes on beating
我把生命给了你 I give you my life
把意义留给自己 Leaving myself the meaning

——
第一段是本科时候在网上闲逛偶遇某人签名档,当时抄下来,作者无从查起。
后面四段扩写 作于 2018.2.10 洛杉矶

Template rendered html email for Web2py email verification and password reset

For discussion about this old problem, read Google group thread here.

I ended up modifying gluon/tools.py. It is probably not a good practice. But it is the easiest solution.

I edit register() and email_reset_password()

modifying something like (depends on which one)

message=self.messages.verify_email % d

to

message=('',response.render('email/template.html', d))

Be careful with the ending parentheses, the two functions need different number of them due to context codes.

It is important to use a 2-tuple or 2-list to pass the second item to html in the email, the empty '' will go to text. Otherwise, it will likely be sent as plain text, especially if you have <!DOCTYPE as start in your template.

for email_reset_password(), you also need:

response = current.response

Then you need to delete tools.pyc and restart web2py to take effect.

Make sure you modify tools.py and delete tools.pyc every time you update web2py.

Hope this save some other people’s time.

Force SSL/HTTPS and non-www in web2py

Update 02.08.2018: Code is updated to use just one line to force https:

request.requires_https()

=======

I read this

https://groups.google.com/forum/#!topic/web2py/RzJ4pYtAWF4

and

https://stackoverflow.com/questions/26802850/pythonanywhere-web2py-redirect-to-https

then I realized “cronjob” problem described in these answers are no longer relevant since `scheduler` has long since replaced `cron`

I created a new model secure.py and add:

########## FORCED SSL non-www ##########
session.secure()
if not request.is_https:
    redirect(URL(scheme='https', args=request.args, vars=request.vars))
request.requires_https()
if request.env.http_host.startswith("www."):
    redirect(URL(host=request.env.http_host[4:]))
#####################################

I skipped the cron part since scheduler has long since replaced cron in web2py.

I created separated model so I can specify only to have it on my server, not on my local macbook, using .gitignore (see #2 below)

2. I need only to use https at server, not local development environment (127.0.0.1:8000), so I put models/secure.py into my .gitignore

Hope this helps!

China Vibe

Vined / Pixabay

Original: Walk Off The Earth – Summer Vibe
Adapted by Yi Liu

EH-O, EH-O, EH-O, BOP BOP AWAY-O

China vibe, China vibe
I’m looking for a China vibe, got me boarding Hainan Airlines, I gotta mute those twits
Jet lag all day, trying to stay awake, wishing these smog away
I wander around Hou Hai, visit royal palace
Take a walk in Peking U, with nothing else to do
But sitting by Weimin Lake, reading a book, off the girls keeping my eyes
Taking my time

With you by my side
A Mobike ride
Cycling with the girls
Street food at night
China vibe
Looking for a China vibe

Friends paid my meals
No reason to be shamed
Bragging on the table, just listening to you
China vibe
Looking for a China vibe

I’m jonesing for clean fresh air, High Speed Rail all down to HangZhou, I’ll find friend’s place to stay
Gonna somehow, find a public square, dance this old night away
We’re drinking LongJing at Farmer’s House, tea trees all up on the hills, under the bluesky
Taking my time

With you by my side
A wood boat ride
Paddling with the girls
West Lake moonlight
China vibe
Looking for a China vibe

Kid paid our dues
With award she earned at school
Riding on dad’s back, just staring at you
China vibe
Looking for a China vibe

And the train arrives home
But I’ll leave again tomorrow
Oh
EH-O, EH-O, EH-O BOP BOP AWAY-O

With you by my side
A Didi ride
Jamming with the girls
Karaoke all night
China vibe
Looking for a China vibe

Love my parents
Got nothing to prove
Sitting by your side, just listening to you
China vibe
Looking for a China vibe

EH-O, EH-O, EH-O BOP BOP AWAY-O
China vibe, China vibe

EH-O, EH-O, EH-O BOP BOP AWAY-O
China vibe, looking for a China vibe