I will meet lifelong friends

I’m nervous, and my mum’s upset about me leaving. But it’s really exciting. I kind of live in the moment. I don’t think people in New York will annoy me, and I feel like when I go there, I’ll meet lifelong friends.

我很紧张,我要离开家我妈也很伤心。但是也真的挺兴奋啊。我是那种活在当下的人。我觉得纽约人不会让我烦恼,我觉得到了那里,我会遇见一辈子的朋友

Maria win US open 2017 1R

US Open女单第一轮,居然是#莎娃#VS#哈勒普#,这种对决在第一轮出现简直就是罕见~相当于决赛:世界第一对阵世界第一,最终还是莎娃拿下了她的老对手(之前交手莎娃貌似只输过一场),这场胜利对莎娃来说意义重大,这是她在被禁赛15个月后首次重返大满贯赛场,并取得的第一个胜利,分量不亚于获得冠军 ​​​​

Maria win US open 2017 1R

我注意到一个懒惰的人

我注意到:一个懒惰的人,一个不愿动的人,一旦动起来,就会持之以恒动下去,就跟他坚持待着不动时一样,好像他不喜欢的倒不是动本身,而是开始和停止。好像是有什么事使得开始和停止看起来很难,他倒会感到有些得意的意味。

—— 威廉·福克纳,《我弥留之际》

换水龙头

终于把那个出水不痛快的水龙头给换了,原因是出水软管给堵了,再加上以前的水龙头也不环保,还不健康。有了上次疏通管道的经验,这次没有发大水。新龙头是单水的,出水泡沫很多,出水也痛快

疏通厨房水池子

终于把厨房水池子给疏通了,再也不堵了,历经30分钟,比想象中的要简单一些,本以为不会弄的发大水呢,结果还是小发了一下,小经验,食用苏打加醋,疏通小帮手 ​​​​

疏通厨房水池子

deploy with mina

博客使用mina部署了,之前从编写到发布要打好几命令,而且还要登录的EC2上,执行的命令比较多

有以下几个问题

  • 每次发布产生的新版本./release/xxx,文件的生成时间更新为当前时间
  • 这造成了每次向S3同步的时候,都会同步所有文件,因为本地文件的时间戳已经改变,这样会使本来没有发生更改的文件也会被再次同步一次,浪费了拉取数据的次数

mina 部署配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
require 'mina/rails'
require 'mina/git'
# require 'mina/rbenv' # for rbenv support. (https://rbenv.org)
# require 'mina/rvm' # for rvm support. (https://rvm.io)
# Basic settings:
# domain - The hostname to SSH to.
# deploy_to - Path to deploy into.
# repository - Git repo to clone from. (needed by mina/git)
# branch - Branch name to deploy. (needed by mina/git)
set :application_name, 'yourapp'
set :domain, 'hostname'
set :deploy_to, 'deploy_path'
set :repository, 'git@...'
set :branch, 'master'
# Optional settings:
# set :user, 'Username' # Username in the server to SSH to.
# set :forward_agent, true # SSH forward_agent.
# set :port, '30000' # SSH port number.
# shared dirs and files will be symlinked into the app-folder by the 'deploy:link_shared_paths' step.
# set :shared_dirs, fetch(:shared_dirs, []).push('somedir')
# 要保证项目文件夹里有config文件夹,否则不能建立ln目标文件
# set :shared_files, fetch(:shared_files, []).push('config/database.yml', 'config/secrets.yml')
# This task is the environment that is loaded for all remote run commands, such as
# `mina deploy` or `mina rake`.
task :environment do
# If you're using rbenv, use this to load the rbenv environment.
# Be sure to commit your .ruby-version or .rbenv-version to your repository.
# invoke :'rbenv:load'
# For those using RVM, use this to load an RVM version@gemset.
# invoke :'rvm:use', 'ruby-2.2.4@default'
end
# Put any custom commands you need to run at setup
# All paths in `shared_dirs` and `shared_paths` will be created on their own.
task :setup do
# command %{rbenv install 2.3.0}
end
desc "Deploys the current version to the server."
task :deploy do
# uncomment this line to make sure you pushed your local branch to the remote origin
# invoke :'git:ensure_pushed'
# 自定义本地要执行的任务 :local/:remote
run(:local) do
invoke :'hexo:generate'
invoke :'hexo:deploy'
end
# 加入本地ssh-key到ssh-add代理,以便远程主机有权限拉取代码
run(:local) do
command %{ ssh-add ~/.ssh/id_rsa}
end
deploy do
# Put things that will set up an empty directory into a fully set-up
# instance of your project.
invoke :'git:clone'
invoke :'deploy:link_shared_paths'
# invoke :'bundle:install'
# invoke :'rails:db_migrate'
# invoke :'rails:assets_precompile'
invoke :'deploy:cleanup'
on :launch do
in_path(fetch(:current_path)) do
# command %{mkdir -p tmp/}
# command %{touch tmp/restart.txt}
# 这里必须有可以执行的代码,否则运行时出错,没有代码要执行可以注释掉整个代码块
end
end
end
# you can use `run :local` to run tasks on local machine before of after the deploy scripts
# run(:local) { touch 'hello.txt'}
end
# custom task
namespace :hexo do
desc "genarte hexo posts"
task :generate do
def hexo_generate
puts "Geginning generate posts"
command %{ hexo g }
end
hexo_generate
end
desc "deploy hexo posts"
task :deploy do
def hexo_deploy
puts "Deploying posts to git"
command %{ hexo d }
end
hexo_deploy
end
end
# For help in making your deploy script, see the Mina documentation:
#
# - https://github.com/mina-deploy/mina/tree/master/docs