没有让我失望的火星救援

期待了半年的《火星救援》并没有让我感到失望。

写在观影之前

早在今年6月份看到一段预告片之后就将这部电影加入了待看片单,等了半年,在好莱坞大片云集的11月,也没有去看任何影片只等着这一部。马特达蒙,最喜欢的演员,星际宇宙,最喜欢的题材,有这这样的组合怎能不让人期待。

火星救援 马特达蒙

写在观影之后

终于在等了半年之后,在25号看了0点场,电影没有让我失望,当然带来的感动和震撼也并没有超出想象。或许是《地心引力》和《星际穿越》的铺垫,让我对此类讲述宇宙的电影有了最基本的感受,宇宙浩瀚的视觉体验,飞船对接的惊险,以及人类在广袤宇宙的渺小。

这部电影的剧情其实很简单,如果稍微做过一些了解,看电影之前应该就能预料到电影中发生的事情,而正是对于这样一部电影,我更加期待的是导演和演员如何在故事剧情整体都被观众了解的情况下去推动剧情的发展。这部电影由Andy Weir小说改编,虽然没有看过小说,但是经过小说的验证,剧情并不会离谱到哪里,所以在看完这部电影之后对整个剧情的设定,情节的发展都没有找到比较大的漏洞。电影基本在沿用两条线叙事,火星上马特达蒙的生存挑战,地球上的营救计划的展开,总体沿用这两条故事线,而中间也穿插了赫尔梅斯号飞船上的故事,到影片的结束,赫尔梅斯号上的故事线和马特达蒙的线合二为一。从剧情上来看,故事整体发展都很平淡,也像之前看到的一些评论说的那样,导演尽量的在克制并没有打温情牌,即使是在片尾才出现的爱情线,也只是淡淡的一笔带过,而主角的亲情戏也是一再的克制,犹记得其中的一个镜头就是马特坐在火星的高地上,镜头从背后绕到前面,而中间伴随着马特的遗言式的自白,这也是我唯一能够想到的提交亲情的戏份。而相比《星际穿越》中的亲情带来的感动,导演Ridley Scott一再的将电影的重心放到营救的整个过程中。

影片是和同学一同前去观看的,部分同学说故事发展太平淡,高潮不明显,其实这部片子的问题也是存在的,片子在极尽所能渲染出火星壮美的地貌的时候无意中拖慢的剧情。在开场火星风暴袭来快速的剧情推动之后,令人印象深刻的马特自救,种土豆之后故事发展就趋于平缓,用淡淡的叙事来铺开,当然最后我能感受到的高潮就是赫尔梅斯号去接马特的时候,这也是全片的最高潮,只是现在回想来,似乎感觉到来的太快,而结束的也太快。

再说到表演,这就不得不提到马特达蒙,几乎是用他一个人的演技支撑起了整部影片,早在《谍影重重》《天才雷普利》《心灵捕手》的时候就深深的喜欢上了这个个性演员,更让我震惊的是他曾经和本阿弗莱克凭借《心灵捕手》获取了奥斯卡最佳电影原创剧本奖,这样一位实力派的演员竟然能够在剧本创作上获得如此殊荣更让我对他刮目相看。而在这部影片中的表现同样没有让人失望,我甚至觉得马特可以凭借这部电影去拼一下奥斯卡最佳男主,令人印象深刻地几场戏出现在开头的自救,在风暴过后,马特被天线击中,他有条不紊的从身体中取出天线的情节实在让人无法忘怀。另外在更多的自白中自然地表现出那种自娱自乐的精神,也只有马特能够表现出来。像很多人说的那样,这就是一部靠马特自救和段子组成的电影。而说到配角,我竟然认出了《纸牌屋》中的那个死掉的记者,是纸牌屋中死掉了所以来拍电影了吗。然后那个黑人主管也看的眼熟却也无法想起在哪里见到过。而赫尔梅斯号上得中尉是杰西卡·查斯坦,这位演员在当时《星际穿越》的时候认识了,但是因为这部戏中的戏份也并不是很多,只在开头很果断的决策和结尾营救马特的时候有些表现,而其他方面只能通过马特说的音乐品味太差来侧面描写一下,所以也看不出演技的好坏。不过让我印象深刻的倒是那个呆萌呆萌的天体物理学家,虽然出场时间也并不是很多,但是却让人眼前一亮,并为之会心一笑。从第一个躺在床上的镜头,到后来开“爱隆会议”,他的表现非常的高效到位。他把那种科学家的自信气质和学术范儿用一种诙谐的方式表现出来,而他的方案也是整个拯救计划中很重要的部分。

在说到娱乐性,对我来说,娱乐性对于这部电影来说应该就算是话题效应了,如果从今年6月份算起,我已经期待这部电影超过了5个月了。对我来说,娱乐性的体现已经足够充分,而在11月份,好莱坞电影集中上映的前提下,我相信《火星救援》也还是依然能够保证充足的话题性。而从另一方面,电影创造出的火星场景来看,也足够具有话题性,从《地心引力》创造的宇宙世界观,《星际穿越》创造的黑洞,好莱坞几乎在以一年一部的速度刷新着我们的宇宙观。而今年几乎是 NASA 的新世纪元年,就在《火星救援》美上映的前几天,NASA 宣布火星发现水,这简直就是给这部影片一个巨大的广告宣传,再到 NASA 今年公布的冥王星的图片,整个世界都被宇宙震撼到了。

冥王星 NASA

最后在豆瓣上我会给剧情8分,表演8分,娱乐性9分。当然这都是带有私心的评分~(≧▽≦)/~啦啦啦。

电影删减

国内版删去马特达蒙光屁股一段戏。其实这里不得不吐槽一下,很多电影比这个过分的要更多,难道广电只是想刷一下存在感吗?什么都插手一脚却也并没有什么用。可是下面才是我想说的,在我告诉周围人这个删减的时候,周围人竟然说删得好,至于为什么删得好,我是无法理解的,当更重要的是或许是很多人以及习惯了这种删减的日子了吧。

写在看书之后

书里解答了我很多观影之后的疑问,帆布的疑惑,栖息仓中的爆炸等等,还有关于火星上大气的气压等等。

当然在电影过后看书的一大缺点就是在看到角色名字的时候不知不觉会在脑海里浮想起电影中的面孔,所以在看大部分沃特尼的自述的时候会想起马特达蒙。不过对我还好,我能记住的演员也就是赫尔梅斯上得几个航天员。当然下面我还要说,其实书中对这些角色的描写我觉得更成功,甚至从几句对白中表现出来的感觉抵得上电影中的画面和情节。

电影对书中内容的改编:

  1. 两辆漫游车 书中对于漫游车的改造远远超出电影中的描述,沃特尼花费了大量的时间去改造漫游车,而这部分情节在电影上被省去了,或许是从电影表现来看并不是最佳的情节。在电影后半段时期,火星上的交代变少,更多的是展现火星神奇的地貌,而书中反而不是这样,在漫游车改造的过程中,沃特尼失去了地球的联络,只能依靠自己的知识改造漫游车。并且在之后的移动过程中是没有和 NASA 的联络的。

  2. 电影中删减了很多沃特尼去往3000+公里外的 MAV 的情节 这也是在上面说到的一点,沃特尼在前往 MAV 的过程中没有人去协助,只依靠自己的努力,小说中甚至描述了他遭遇火星沙尘暴的情节,而在电影中几乎完全没有被提及,这也导致我在观影中感受到的电影中后段故事趋于平缓,当然这可能也是为了缩减电影时长而不得已为之,但是这一段沃特尼自救的部分真是惊心动魄,既紧张又充满刺激,当然在我为沃特尼这种临危不乱的精神敬佩的时候,沃特尼用自己的聪明才智已经快到达目的地了。

  3. 小说中对配角形象的塑造更加成功 这里我不得不说,小说对这些配角的形象塑造更加生动。小说中在赫尔梅斯上得情节描述较电影多,而小说对地面 NASA 等的描述较小说少,所以从小说中能看到诙谐幽默,时常开玩笑的马丁尼兹,能看到指挥果断地刘易斯指挥官,还有搞办公室恋爱的约翰森,他们的形象,加上之前在电影中留下的记忆,共同组成他们成为一个角色的特征。

  4. 对指挥官刘易斯的改编 看过电影的人应该都知道,最后是指挥官刘易斯去营救的沃特尼,其实当时看完电影并没有感觉到什么不适,但是后来想一想,虽然航天员什么方面都会训练一下,但是指挥官并没有什么特殊的理由让自己代替另一个专业航天员去营救沃特尼,当然这也可能是电影剧本的要求吧,因为我对那个人也真没多少印象,赫尔梅斯上一共六个人,上面提到的3个加上沃特尼,剩下的两个实在是没什么印象了,所以在最后电影中换成指挥官也情有可原吧。


2015-11-26 影评 , MattDamon

lua installation

Install Lua in Linux

You can install lua in Linux Mint/Debian/Ubuntu.. You can find all verions of lua here.

wget http://www.lua.org/ftp/lua-5.3.1.tar.gz
tar zxf lua-5.3.1.tar.gz
cd lua-5.3.1
make linux test

Finally, if test have passed, then install lua into the right place by running sudo make install:

einverne@mint ~/Downloads/lua-5.3.1 $ sudo make install
[sudo] password for einverne:
cd src && mkdir -p /usr/local/bin /usr/local/include /usr/local/lib /usr/local/man/man1 /usr/local/share/lua/5.3 /usr/local/lib/lua/5.3
cd src && install -p -m 0755 lua luac /usr/local/bin
cd src && install -p -m 0644 lua.h luaconf.h lualib.h lauxlib.h lua.hpp /usr/local/include
cd src && install -p -m 0644 liblua.a /usr/local/lib
cd doc && install -p -m 0644 lua.1 luac.1 /usr/local/man/man1

According to the output, we know that lua header files are located under /usr/local/include. And liblua.a lib is located under /usr/local/lib. This two paths may be used later when coding with C/C++. And most important thing executalbe file is located under /usr/local/bin. Most of the Linux distributions are installed lua by default. But most of them don’t have liblua.a installed.

Install Lua on Mac OS X

If you want to build from source code like under linux, just change make linux test into make macosx test. And all the following steps are the same as I mentioned in the Linux section.

If you want a more convenient way to install lua, you can download binary package here. And click next and next to finish installation.Default installation path is same as in Linux.

And id you are using Homebrew just run brew install lua, everything is done.

And you can find more ways to install lua on lua-users.org

For other OS

please see: http://lua-users.org/wiki/LuaDistributions

Testing Lua

After installation , run lua -v to check the lua version. Test lua by printing “hello world” using following code. Run lua in terminal:

einverne@mint ~ $ lua
Lua 5.3.1  Copyright (C) 1994-2015 Lua.org, PUC-Rio
> print "hello world"
hello world

Type Control+D to exit.

lua IDE

If you want to find a lua IDE, I highly recommend Zerobrane Studio. It is cross-platform and support different versions of lua from 5.1 to lastest 5.3. And it has a debugger build-in, which is great for debug lua code from local or remote. It is worth to have a try.


2015-10-31 lua , linux

Things to do after install Linux Mint

I have changed my desktop environment to Linux, and after I tried Ubuntu and Debian, I finally choose the Linux Mint distribution. I think there are some reasons why this distribution take the first place in distrowatch. User-friendly desktop environment and convenient software package manager make me very comfortable. Cause it is based on the Debian and Ubuntu, most of the applications are familiar.

Install a theme

The simplest way to install a new Cinnamon theme is with the Themes manager in System settings.

Go to System Settings -> Themes -> Get More Online -> Refresh list. You can choose Most Popular or Latest. The theme will be installed to your hidden folder ~/.themes

Dark Blue Glass

I highly recommend my modified Dark Blue Glass theme link. It is a mix of Dark Glass and mint numix blue theme. Or you can find more themes on the following sites:

icons

You can install a new icon set in two ways. One is by adding a PPA. You add the PPA, install the icon set. But you won’t find icon sets for all the icon themes. Therefore, the other way round is to download the compressed file and extract it to ~/.icons or ~/.local/share/icon . If this directory doesn’t exist, create one using the following command:

mkdir ~/.icons

The icons extracted in the above directory will be available for the current user only. If you want the icons to be available for all the users, you should extract the icons to /usr/share/icons .

Now, once you have installed the icon set, you can use a Unity Tweak Tool to change the icon theme. Use the following command to install Unity Tweak Tool:

sudo apt-get install unity-tweak-tool

Or in Linux mint you can just change icons under setting -> theme -> icons.

I highly recommend this one: papirus icons

sudo add-apt-repository ppa:varlesh-l/papirus-pack
sudo apt update
sudo apt install papirus-icons

Software Sources

You didn’t need to edit/etc/apt/sources.list and files under /etc/apt/sources.list.d/ mannually. All customs can be changed through UI. Just click “start menu” and choose the “Software Sources”. And this application can even custom the PPAs.

linux mint software sources managers

Necessary applications

Chrome

First is web browser, and of course Chrome. I am crazy about Google, and all Google related things. I have used Chrome since year 2011, after I am tried of the Firefox’s slowness. Although Firefox become more and more light, faster this years, I get used to Chrome. And what Chrome done makes me really happy. First thing is the bookmark and extension etc sync. I can reach all of my staff and customizations, after I login into my account. I don’t even need to worry about anything. All my Apps, Extensions, Settings, Autofill informations, History, Themes, Bookmarks, Passwords, and even Open tabs always follow my account. I can reach my opening tab on desktop from my Android phone. I can reopen bookmarks on my home laptop, which I added in my laboratory computer. And I can open chrome://history page to check all current opening tags from signed-in devices, and even check the unread article in the opening tab on my phone and browser all my chrome history.

sogou input method

It is necessary to have an input method for typing Chinese which I speak. I choose the sogou input method, because it is easy to use and have a very Good word dictionary. Sogou input method is based on fcitx. In Linux mint setting panel, we have the Language setting, we can choose to install fcitx components.

More detail information can be found in this blog article.

Following can be done through user interface, no need to run. Pasting here only for reference.

sudo apt-get install fcitx fcitx-table-wubi-large fcitx-frontend-all fcitx-frontend-gtk2 fcitx-frontend-gtk3 fcitx-frontend-qt4 fcitx-config-gtk fcitx-ui-classic fcitx-module-kimpanel fcitx-module-dbus fcitx-libs-qt
sudo apt-get install fcitx fcitx-bin fcitx-config-common fcitx-config-gtk fcitx-data fcitx-frontend-all fcitx-module-cloudpinyin fcitx-module-dbus fcitx-module-kimpanel fcitx-module-x11 fcitx-modules fcitx-qimpanel-configtool

After installation, “start”, “Fcitx Configuration” can config the input method, just add “Sogou Pinyin” to the panel.

shadowsocks

Use to cross China’s great firewall. Don’t need to talk more.

 pip install shadowsocks # install command line tool

If pip is missing, install pip first.

PPA is for Ubuntu >= 14.04.

sudo add-apt-repository ppa:hzwhuang/ss-qt5
sudo apt-get update
sudo apt-get install shadowsocks-qt5

To install Qt version of shadowsocks. From:GitHub.

Nvidia driver

“System settings” , “Driver Manager”, choose the right latest driver and install. After installation, you will find Nvidia icon at the right-bottom corner. Double click the icon to open the setting panel. In order to save the battery , you can use Intel(Power Saving Mode) for most time. And if choose NVIDIA(Performance Mode) for high performance need.

Nvidia driver

hardinfo

Install hardinfo tool to check hardware information through GUI

 sudo apt-get install hardinfo

System tools

If there is no special instruction, all of the following applications can be installed from the Software Manager in Linux Mint.

gnome do

As it official introduction said “Do things as quickly as possible (but no quicker) with your files, bookmarks, applications, music, contacts, and more!”. I set a shortcut Alt+Space to launch Gnome do. And you can just type several keys to start any application quickly.

install following package:

  • gnome-do
  • gnome-do-plugins

guake

Use F12 to open a terminal. Dropdown terminal, you can right click the terminal after you press F12 to configure your guake.

PlayOnLinux

“PlayOnLinux is a front-end for wine. It permits you to easily install Windows Games and software on Linux. It is advised to have a functional internet connection.” I use playonlinux to install Evernote and cloudmusic(网易云音乐). Although I met a lot of problems during installation of Evernote. But finally evernote 5.8.x can be installed on wine 1.7.x.

There are several packages you need to install to make PlayOnLinux work.

  • wine
  • wine mono
  • wine gecho
  • ttf-mscorefonts-installer

Tools

Most of the following can be installed from default Software Manager. Just type name of the application and search then click install.

网易云音乐

cloud music client and my favourite music client. Here is the link to it’s official site, where you can found clients for all platforms include linux.

Evernote

my favourite cloud notebook with a very clean Android client.

shutter

Linux mint 17 has a default screenshot software called Screenshot. It is a very simple screenshot software. Shutter is more powerful.

Dropbox

Sync all my files. When I installed Dropbox through it’s offical installer, there was a problem I cannot connect to Dropbox directly from China. Here is a solution to redirect connections to shadowsocks sock5 proxy. You should install proxychains.

sudo apt install proxychains
# config socks4 127.0.0.1 9050  To socks5 127.0.0.1 1080 which is the default of shadowsocks
vi /usr/local/etc/proxychains.conf
# then use proxychains to start dropbox
proxychains4 dropbox start -i

Then dropbox will start to start and install, then after installation you can set sock5 proxy in dropbox settings.

BCloud

Baidu pan linux port. It is really a great work. Thank the author.

You can download here

remmina

Remote desktop connection client able to display and control a remote desktop seesion. It supports multiple network protocols in an integrated and consistant user interface. Currently RDP, VNC, NX, XDMCP and SSH protocols are supported.

Gufw

linux firewall.

Calibre

E-book manager, 电子书管理. It is very efficient when you plug in kindle using USB port Calibre is prepare to serve.

WizNote

Evernote like cloud notebook client. Find more information here. You can install through PPA:

$ sudo add-apt-repository ppa:wiznote-team
$ sudo apt-get update
$ sudo apt-get install wiznote

SimpleScreenRecorder

one of the screenrecoders I use.

Picasa

Best image and picture manager ever from Google.

audacity audio editor

record and edit audio files

kdenlive video editor

non-linear video editing suite.

WPS Office for Linux

Office software include writer, spreadsheets and presentation.

KeePassX

Password manager. But I prefer LastPass.

youdao dict

This client really make me impressed. It is faster and simple than any other platform client. Launch it with Gnome do, and use it to check English word is a very happy work. Someone used to recommand me the StarDict, but I think youdao dict is a better choice for me.

Docky

Elegant, powerful, clean dock.

Or there is another choice Cairo Dock.

ntfs configuration tool

Install this tool using this command:

 sudo apt-get install ntfs-config

and you can find NTFS Configuration Tool in the menu. It is a very efficient tool to auto mount windows NTFS partitions. You can setup to auto-mount when your Linux mint start up. It is really useful if you have a second hard drive installed and you want it to auto-mount each time you restart your system.

smplayer or vlc

video player always need one. Personally, I like smplayer more.

Nuvola Player 3

You can follow the instruction on it’s official site. It was great, espcially when you want to listen to music at Google Play Music, or other cloud stream music. It support a lot of services, like Amazon Cloud Player, Play Music, Plex Music, Spotify, Tuneln, etc.

birdie

Birdie is beautiful Twitter client for GNU/Linux.

PPA (14.04) Birdie can be installed from our PPA, which provides automatic updates whenever we improve the application.

$ sudo add-apt-repository ppa:birdie-team/stable
$ sudo apt-get update
$ sudo apt-get install birdie

from it official site:http://www.birdieapp.eu

FFmpeg

all the detail information can be found at it’s official site.

$ sudo add-apt-repository ppa:mc3man/trusty-media
$ sudo apt-get update
$ sudo apt-get install ffmpeg

Teamviewer

Remote control application. I need it to help to connect my mac in lab and other Windows machine. You can download here. And because it is cross-platform. You can install in other OS and connect it easily.

Programming tools

vim

Use apt-get search vim to search related vim packages, you will find several packages,like vim-gtk, vim-gnome etc. Install vim and vim-gtk package to install vim and gvim. And config my vim with my dotfile, https://github.com/einverne/dotfiles.

git

best version control system. And I am using SmartGit.

SmartGit

Git GUI

Sublime Text

Text Editor. Later I found Atom which is also great.

haroopad

markdown editor.

eclipse with jdt and cdt

sometime need java and c++ IDE for test.

boost

install boost library from source using the following code:

 sudo apt-get install libboost-all-dev

all boost library is located at /usr/include/boost

Android Studio

Check official site for more information.

PyCharm

Python IDE

ZeroBrane Studio

Lua IDE

SQLiteman

Sqlite manager

Applets

Weather

You can have your local weather forecast in desktop.

Desktop Capture

Screenshot and screencasting tools which saves me a lot of time.

I have created a list in Youtube, you can check it for information.


2015-10-24 linux , linux mint , applications

Install fonts under Linux

Most of computer fonts people using are TrueTpye fonts. TrueType fonts end with .ttf , which stand for TrueType Font. This tutorial shows how to install TrueType fonts in Linux (Debian, Ubuntu, Linux Mint, etc).

General way to install TrueType fonts

All of the TrueType fonts are under /usr/share/fonts/truetype, simplest way is to copy ttf file to this directory and give it the right permission. For example, if you want to install Ubuntu font family manually. You can download the font file from official site.

In the terminal, download the package:

 wget http://font.ubuntu.com/download/ubuntu-font-family-0.80.zip

unzip the file into directory ubuntu-font-family-0.80

 unzip ubuntu-font-family-0.80.zip

and then use copy command to copy all the files to /usr/share/fonts/truetype,/usr/share/fonts directory and sub directory need root to write, so you should add sudo before command. The -r paramater represent recursive, it means all the files under ubuntu-font-family-0.80 will be copied to the right place.

 sudo cp -r ubuntu-font-family-0.80/ /usr/share/fonts/truetype/

finally, you shoulde give this directory and all the ttf under this directory right permission. All the new fonts now can only be used by root. We need to change the permission to let all the users to use these fonts:

 sudo chmod 755 /usr/share/fonts/truetype/ubuntu-font-family-0.80/ -R

then, refresh the font cache to let system detect these fonts:

 fc-cache -f -v

Install new fonts only for current user

As I mentioned in the first part, if you copy the ttf file to /usr/share/fonts directory, all the users can use these new fonts. But if you only want to provide these fonts to specific user, like current login user , you can just copy the file to ~/.fonts directory. If there is no such directory, just create it. The ~ stand for current user’s home directory, full path is /home/<username>. So repeat the operation to install Ubuntu font family:

mkdir ~/.fonts
cp -r ubuntu-font-family-0.80/ ~/.fonts/
fc-cache -fv

Install microsoft core fonts

Microsoft Core Fonts include these fonts:

  • Andale Mono
  • Arial Black
  • Arial (Bold, Italic, Bold Italic)
  • Comic Sans MS (Bold)
  • Courier New (Bold, Italic, Bold Italic)
  • Georgia (Bold, Italic, Bold Italic)
  • Impact
  • Times New Roman (Bold, Italic, Bold Italic)
  • Trebuchet (Bold, Italic, Bold Italic)
  • Verdana (Bold, Italic, Bold Italic)
  • Webdings

Debian/Ubuntn/Linux Mint user just open terminal and run these command:

sudo apt-get install ttf-mscorefonts-installer

or Linux Mint user can find this package in the Software Manager, just search it and click install.

Install Chinese fonts

.ttf files are the English fonts, while .TTF files are Chinese fonts. If we check the C:\Windows\Fonts under Microsoft Windows, there are 3 kind of fonts. One is the .fon fonts, which is the DOS system font, and other two fonts are .ttf and .TTF. We can just make a copy of all .ttf and .TTF file and copy all the files to /usr/share/fonts/ directory under Linux. Although it is illegal under Microsoft’s TOC, but we can still do it. :)

If you dual boot your computer, mount the Windows and copy the files

sudo mkdir /usr/share/fonts/truetype/WindowsFonts
sudo cp -r /media/Windows/Fonts/*.ttf /usr/share/fonts/truetype/WindowsFonts/
sudo cp -r /media/Windows/Fonts/*.TTF /usr/share/fonts/truetype/WindowsFonts/

Install open source Chinese fonts, like文泉驿-微米黑 文泉驿-正黑

sudo apt-get install ttf-wqy-microhei ttf-wqy-zenhei

several Chinese font we can choose:

To check more about Chinese font visit Arch wiki

Tip

Install Software Manager under Linux Mint

Linux Mint user can find a font manager under Software Manager. It is really a cool tool to manager your fonts.

List all available fonts

fc-list is a quick and handy command to lists fonts and styles available on the system for applications using fontconfig. You can use fc-list to find out whether particular language font is installed or not.

To list all font faces:

$ fc-list

To lists font faces that cover Chinese language:

$ fc-list :lang=zh

Output will be all available Chinese fonts.

Fix WPS for Linux font missing error

After I installed WPS for Linux under Linux Mint 17.2, I met this problem, “系统缺失字体symbol、wingdings、wingdings 2、wingdings 3、wedding”. According to the copyright, WPS for Linux doesn’t contains these five fonts. You can only find these five fonts and install them in the right place like I said before. One way to find these fonts is to find them in Microsoft Windows system. And another way is to download these files from Internet and install.

Install Korean fonts

Use following command to search Korean font

apt-cache search korean font

and use this command to install Korean font to linux:

sudo apt-get install fonts-unfonts-core fonts-unfonts-extra

Common sense

Fonts type:

  • Sans-serif=无衬线体=黑体:并不是具体一款字体,而是一类字体,选择它其实等于选择这类字体中优先级最高的那款字体。
  • Serif=衬线体=白体:同上
  • Monospace=等宽字体,意思是字符宽度相同:同上
  • 点阵字体=位图字体

无衬线体更适合电脑屏幕阅读,衬线体适合打印。因为衬线可以使得人视线平齐于一行。也就是说不会读破行。

中文显示时有不同的方式,一方面因为中文本身拥有的横和同高度就可以导致这种平齐。行距对中文更重要。

For more information check Debian page Arch wiki and Ubuntu wiki


2015-10-21 linux , linux mint , fonts

git presentation

之前实验室有个培训

What is Git

Git is a free and open source distributed version control system(VCS) designed to handle everything from small to very large projects with speed and efficiency.

Git是一个分散式版本控制软件,最初由林纳斯·托瓦兹(Linus Torvalds)创作,于2005年以GPL发布。最初目的是为更好地管理Linux内核开发而设计。Linus Torvalds 自嘲的取名“git”,该词源自英国俚语,意思大约是“混账1”。

版本控制系统

Version Control Example

Microsoft Word 如果你用Microsoft Word写过长篇大论,那你一定有这样的经历:

想删除一个段落,又怕将来想恢复找不回来怎么办?有办法,先把当前文件“另存为……”一个新的Word文件,再接着改,改到一定程度,再“另存为……”一个新文件,这样一直改下去,最后你的Word文档变成了这样:

Wikis https://zh.wikipedia.org/w/index.php?title=Git&action=history

Undo Windows: Ctrl+z Mac: Command+z

History

Version control has a very long histroy.

  • Source Code Control System (SCCS)
  • 1972, closed source, free with Unix
  • Revision Control System (RCS)
  • 1982, open source
  • Concurrent Versions System (CVS)
  • 1986-1990, open source
  • Apache Subversion (SVN)
  • 2000, open source

BitKeeper SCM

  • 2000, closed source, proprietary
  • distributed version control
  • “community version” was free
  • used for source code of the Linux kernel from 2002-2005
  • Controversial to use proprietary SCM for an open source project
  • April 2005: the “community version” not free anymore

Git is born

  • April 2005
  • created by Linus Torvalds
  • replacement for BitKeeper to manager Linux kernel source code
  • distributed version control
  • open source and free software
  • compatible with Unix-like systems (Linux, Mac OS X, and Solaris) and Windows
  • faster than other SCMs (100x in some cases)

Git become popular, GitHub launched in 2008 to host Git repositories:

  • 2009: over 50,000 repositories, over 100,000 users
  • 2011: over 2 million repositories, over 1 million users

分布式

Git 是一种分布式版本控制,不需要服务器端软件也可运行

  • 不同用户维护自己的版本库,而不是和核心版本库交换数据
  • 追踪 “change sets” 或者 ”patches”
  • 无需网络,随时随地进行版本控制
  • 分支的新建、合并非常方便、快速,没有任何成本,基本不耗时

Who use Git?

anyone wanting to track edits

  • review a histroy log of changes made
  • view differences between versions
  • retrieve old versions

anyone needing to share changes with collaborators

anyone not afraid of command-line tools

需要注意以下几点:

  1. 只能跟踪文本文件的改动,二进制文件不行,也就是说 如果使用 Git 追踪 Word ,版本控制系统并不知道改动了那些行,只能知道二进制变化了。

    programmer

    • HTML, CSS, JavaScript
    • PHP, Ruby, Ruby on Rails, Perl, Python, ASP
    • Java, C, C++, C#, Objective-C
    • ActionScript, CoffeeScript, Haskell, Scala, Shell scripts

    not as useful for tracking non-text files

    • images, movies, music, fonts
    • word processing files, spreadsheets, PDFs
  2. 编码问题,如果在多平台使用请千万使用 UTF-8 编码

    使用Windows的童鞋要特别注意: 千万不要使用Windows自带的记事本编辑任何⽂文本⽂文件。原因是Microsoft开发记事本的团 队使⽤用了⼀一 个非常弱智的⾏行为来保存UTF-8编码的⽂文件,他们⾃自作聪明地在每个⽂文件开头添 加了0xefbbbf(⼗十六进制)的字符,你会遇到很多不可思议的问题,比 如,网页第一⾏行可 能会显⽰示⼀一个“?”,明明正确的程序⼀一编译就报语法错误,等等,都是由记事本的弱智⾏行 为带来的。建议你下载Notepad++代替记事本,不但功能强⼤大,而且免费!记得把 Notepad++的默认编码设置为UTF-8 without BOM即可

install

  • Linux

sudo apt-get install git or sudo yum install git

  • mac

brew install git

  • windows

https://git-scm.com/

Git basic

在开始使用 Git 之前有些配置

git config --global user.name "John Doe"  # 配置提交用户名
git config --global user.email johndoe@example.com  # 配置提交邮箱


git init  
git status  
git add filename  
暂存区  
git commit -m “"  
git log  

commit message best practices

  • short single-line summary ( less then 50 characters 或者 小于25个汉字)
  • optionally followed by a blank line and a more complete description
  • keep each line to less than 72 characters
  • write commit messages in present tense, not past tense
    • “fix bug” or “fixes bug”, not “fixed bug”

branch

git branch <branchname>  
git checkout <branchname>  
git checkout -b <branchname>  

git push origin <branchname>

git push origin --delete <branchname>

http://nvie.com/posts/a-successful-git-branching-model/

remote

git remote add origin git@blcu.tk:einverne/gitdemo.git  
git push -u origin master  
git remote show origin  

tag

git tag     # list all tags  
git tag v0.9  
git tag -a v1.0 -m “my version 1.0"  
git show tag name #show tag details  
git push origin tag name  
git push origin --tags  

git GUI

other

gitignore

https://github.com/github/gitignore

alias

git config –global alias.st status
git config –global alias.co checkout
git config –global alias.ci commit
git config –global alias.br branch
git config –global alias.unstage ‘reset HEAD –’
git config –global alias.last ‘log -1 HEAD’

GitLab server

http://server.address

  1. http://git.or.cz/gitwiki/GitFaq#head-90fa13ebe170116f1586156e73b549cc2135b784 


2015-10-12 git

残忍的战争

接触韩国电影并不是很长时间,而之前在我看过的电影中推荐过《10部不得不看的韩国电影》,这之后通过周围的推荐和影评,渐渐的看到了更多的韩国电影。《追击者》《太极旗飘扬》《汉江怪物》,这些都是非常不错的片子,可惜当时并不知道。而这部《太极旗飘扬》终于在昨天看完了。

如何去定义这部电影呢?战争片,历史片,影片主要讲述朝鲜战争,也就是韩国说的6.25战争,兄弟俩被强制征兵到前线抵抗北朝鲜的进攻,而哥哥为了保护弟弟屡次铤而走险,完成战功,获得勋章,而过程中哥哥却变的残暴。故事中的哥哥多次的反转,或许这里真的要称赞一下电影的编剧,从来没想到故事的发展会如此的曲折,而最后终也能将电影所要衬托出的主题凸显出—-这是一部彻彻底底的反战电影—-就像之前看的一篇影评中所说,历史上的朝鲜战争,在世界各国的书本中都描述成中国,前苏联和美国的势力角逐。而这部电影让我们看到韩国人对这次战争的思考,当世界两大力量在小小的朝鲜半岛展开时,血腥,暴力是无法想象的,而导演也同样没有回避,用大量的镜头描写战争场面的残酷。

太极旗飘扬

作为一个中国人来看,或许很多人的印象中都是“雄赳赳气昂昂,踏过鸭绿江”,我们的教科书,我们的老师,我们的教育从来没有教育我们战争对于人类来说是什么。多少次观影的过程中,我希望中国从来没有参战,没有之后的更加疯狂的杀戮,也同样不会有那些年战死的中国志愿军。而历史就是历史,一直知道中国会参战,而当韩国军队获得胜利朝鸭绿江挺近的时候,我依然会和主人公一样的开心。这是一部很长的电影,长得让人难受的电影,导演用镜头诉说着那段历史,一个个的反转让人思考。

其中最大的反转就是哥哥这个角色,最开始哥哥弟弟并不愿意参战,而后来哥哥为了弟弟变得疯狂,看到北朝鲜屠杀村民,哥哥变得嗜血,屠戮战俘,哥哥甚至为了功勋而忘记了初心,勋章荣誉让哥哥沉迷其中,成为战争英雄。而之后哥哥看到自己的未婚妻因为战时投奔共产党讨得一点饭吃而被韩国同胞处死,而自己的弟弟被关在仓库烧死(哥哥并不知道弟弟侥幸逃走),从而变得更加疯狂,被北朝鲜俘虏之后成为了北朝鲜的主力“大旗部队”,哥哥的一生,为自己的弟弟,为自己的国家战斗过,也为北朝鲜战斗过,他甚至并不知道为什么要打来打去,莫名其妙的被拉上战场,而之后的一切都被动的产生了。导演很聪明,没有直接明了的说道理,去站在上帝的视角去评价这场战争,同样也很聪明的屏蔽了外界的一切的干扰,中国志愿军只出现了一幕,而美国军队的登陆也只是在收音机中出现,所有的镜头都是正面的战场,保留了观众对这场战争的评价,是非曲直,看完的观众心中自有一个定论。

而弟弟的表现则告诉我们,一个人保留有一丝的人性是多么的重要,即使战争再残酷,人作为人最基本的人性应该保存着,这也就是他即使再忙也会跑到家里去看望自己的母亲和嫂嫂,这也就是他即使所有人都认为那个投降朝鲜的天真擦皮鞋的老乡该杀的时候他会跑出来保护他,这也就是他即使知道前线的危险也会再跑到战场去寻找他的哥哥的原因。人作为人,是应该像哥哥那样,还是像弟弟那样?就像电影中弟弟告诉他哥哥的那样,“如果把那些战俘都杀死,那我们和那些北朝鲜的人又有什么两样?”。

很多人提到这部片子会想到另外一部战争大片《拯救大兵瑞恩》,有的时候我真的会问自己,“为了一个人,又牺牲了那么多的人,真的值得吗?”,我的回答肯定是“值!”,因为这里面就包含着人对生命的尊敬,对战争的敬畏,我相信看完这些电影的人一定是反战的,战争是反人类的。说到底战争只是政府政治斗争的一枚棋子,而受到伤害的永远都是社会底层的平民。

PS.

写完本来是要分享到豆瓣的,只是又不过审了。


2015-09-27 影评 , 韩国

Bash 学习笔记之基本使用

echo $BASH_VERSION

命令行编辑 Emacs mode vs Vi Mode

可以使用 set -o | egrep -w "(vi|emacs)" 命令查看,当前命令行编辑模式。

$ set -o vi
$ set -o|egrep -w "(vi|emacs)"
emacs           off
vi              on

All the above assume that bash is running in the default Emacs setting, if you prefer this can be switched to Vi shortcuts instead.

Set Vi Mode in bash:

$ set -o vi 

Set Emacs Mode in bash:

$ set -o emacs 

using set -o to check all the bash options.

Emacs 编辑模式

完整 Emacs编辑模式快捷键,文档link

Bash Keyboard Shortcuts 在绝大多数情况下一下快捷键可以直接使用

Moving the cursor:

Command Explain
Ctrl + a Go to the beginning of the line (Home)
Ctrl + e Go to the End of the line (End)
Ctrl + p Previous command (Up arrow)
Ctrl + n Next command (Down arrow)
Alt + b Back (left) one word
Alt + f Forward (right) one word
Ctrl + f Forward one character
Ctrl + b Backward one character
Ctrl + xx Toggle between the start of line and current cursor position

Editing:

Command Explain
Ctrl + L Clear the Screen, similar to the clear command
Alt + Del Delete the Word before the cursor.
Alt + d Delete the Word after the cursor.
Ctrl + d Delete character under the cursor
Ctrl + h Delete character before the cursor (Backspace)
Ctrl + w Cut the Word before the cursor to the clipboard.
Ctrl + k Cut the Line after the cursor to the clipboard.
Ctrl + u Cut/delete the Line before the cursor to the clipboard.
Alt + t Swap current word with previous
Ctrl + t Swap the last two characters before the cursor (typo).
Esc + t Swap the last two words before the cursor.
ctrl + y Paste the last thing to be cut (yank)
Alt + u UPPER capitalize every character from the cursor to the end of the current word.
Alt + l Lower the case of every character from the cursor to the end of the current word.
Alt + c Capitalize the character under the cursor and move to the end of the word.
Alt + r Cancel the changes and put back the line as it was in the history (revert).
ctrl + _ Undo
TAB Tab completion for file/directory names

For example, to move to a directory ‘sample1’; Type cd sam ; then press TAB and ENTER. type just enough characters to uniquely identify the directory you wish to open.

History:

Command Explain
Ctrl + r Recall the last command including the specified character(s)
searches the command history as you type.
Equivalent to : vim ~/.bash_history.
Ctrl + p Previous command in history (i.e. walk back through the command history)
Ctrl + n Next command in history (i.e. walk forward through the command history)
Ctrl + s Go back to the next most recent command.
(beware to not execute it from a terminal because this will also launch its XOFF).
Ctrl + o Execute the command found via Ctrl+r or Ctrl+s
Ctrl + g Escape from history searching mode
!! Repeat last command
!abc Run last command starting with abc
!abc:p Print last command starting with abc
!$ Last argument of previous command
ALT + . Last argument of previous command
!* All arguments of previous command
^abc­^­def Run previous command, replacing abc with def

Process control:

Command Explain
Ctrl + C Interrupt/Kill whatever you are running (SIGINT)
Ctrl + L Clear the screen
Ctrl + s Stop output to the screen (for long running verbose commands)
  Then use PgUp/PgDn for navigation
Ctrl + q Allow output to the screen (if previously stopped using command above)
Ctrl + D Send an EOF marker, unless disabled by an option, this will close the current shell (EXIT)
Ctrl + Z Send the signal SIGTSTP to the current task, which suspends it.
To return to it later enter fg ‘process name’ (foreground).

最常使用的应该还是 Ctrl-a, Ctrl-e, Ctrl-f, Ctrl-b, Ctrl-l, Ctrl-h, Ctrl-w, Ctrl-k, Ctrl-u, Ctrl-y, Ctrl-r.

命令 说明
Ctrl-B 后移一个字符
Ctrl-F 向前移动一个字符
DEL 向后删除一个字符
Ctrl-D 向前删除一个字符
Ctrl-A 移到行首
Ctrl-E 移到行尾
Ctrl-K 向前删除到行尾
Ctrl-P 移到前一行
Ctrl-N 移到后一行
Ctrl-R 向后搜索
Ctrl-J 等同于 RETURN
Ctrl-L 清除屏幕,将当前行放到屏幕最上面
Ctrl-M 等同于 RETURN
Ctrl-O 等同于 RETURN 随后在显示历史命令中下一行
Ctrl-T 颠倒光标左右两个字符,将光标向前移一个
Ctrl-U 从光标位置开始删除行 ,向后删除到行首
Ctrl-V 引用插入

Vi 编辑模式

通过设置 set -o vi 进入Vi编辑模式,正常环境为输入模式,对命令进行修改则按 Esc。完整命令参考.

命令包括 h, l, w, b 等等Vi中使用的命令,可参考另外一篇Vim学习笔记

  • 通过按键 Esc , Ctrl+l(L lower case) ,clear screen。
  • Ctrl-w
  • Ctrl-u
  • Ctrl-k
  • Ctrl-y
  • Ctrl-r

环境配置

特殊文件

最重要的 Bash文件是 .bash_profile ,它在每次用户登陆系统时被读取 /etc/profile 。Bash 允许有 .bash_profile 两个同义文件, C Shell 的 .bash_login 以及 Bourne Shell 和 Korn Shell 的 .profile 。登录时三者中只有一个被读取,如果用户根目录下 .bash_profile 不存在,则 bash 依次查找 .bash_login , .profile.

.bash_profile 只被登录 shell 读取并执行,如果通过命令键入 Bash 启动一个新 Shell, 它就会读取 bashrc 中的命令。

.bash_logout 在每次 shell 退出时被读取并执行。

可以使用 source ~/.bashrc 来使配置文件立即生效。

修改 .bashrc 文件可以精确到对当前用户有效。修改 /etc/profile 对全局用户生效。

别名

给命令添加熟悉的别名

alias name=command

指定 name 是 command 的别名。在“=”两边没有空格,严格语法。

别名是可递归的,可以使用别名定义另外的别名。

选项

别名可以为命令创建方便的名字,它们实际上并不改变shell的行为。选项则不然。基本命令:

set -o optionname	-号 开启
set +o optionname	+号 关闭

检查bash所有可选项,使用 set -o 打印所有列表。

shopt 选项

选项 含义
-p 显示可选设置及其当前取值
-s 设置
-u 失效
-o 允许选项名取值通过 set 命令 -o 选项定义

列表选项如下:

allexport           off
braceexpand         on
emacs               off
errexit             off
errtrace            off
functrace           off
hashall             on
histexpand          on
history             on
ignoreeof           off
interactive-comments     on
keyword             off
monitor             on
noclobber           on
noexec              off
noglob              off
nolog               off
notify              off
nounset             off
onecmd              off
physical            off
pipefail            off
posix               off
privileged          off
verbose             off
vi                  on
xtrace              off
选项 解释
emacs emacs编辑模式
vi vi 编辑模式
ignoreeof 不允许单独使用 Ctrl-D 退出
noclobber 不允许输出重定向(>)覆盖已存在的文件
noglob 不允许扩展文件名通配符如*和?
nounset 试图使用未定义变量时给出错误

变量

Shell变量也是一个拥有取值的名字,bash有一些内置的变量,shell编程也可以自定义变量。按照惯例,内置变量名均为大写,当然也有两个例外。

varname=value

等号两边必须没有空格

引用变量,使用符号 $ , 单引号内部的变量会直接使用而不需要转义,而双引号内部变量需要转义

echo $varname

bash 有很多内置变量分布在各个配置文件中。

内置变量

PATH变量,帮助shell找到输入的命令。输入 echo $PATH 得到类似:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
变量 含义
HOME 主目录
SECONDS 调用 shell 的秒数
BASH 正在运行的 shell 实例路径名
BASH_VERSION shell 版本号
BASH_VERSINFO shell 版本信息数组
PWD 当前目录
OLDPWD 最后一个 cd 命令前的目录

2015-09-26 Linux , bash , vim

Linux学习笔记 User and Group

##User

/etc/passwd

类似如下:

root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh

7个部分:

  • 账户名称
  • 密码,已被移到 /etc/shadow 目录中
  • UID
    • 0 代表“系统管理员”
    • 1~499 保留系统使用,1~99保留系统默认帐号,另外100~499 则保留给服务使用
    • 500~65535 一般用户使用,Linux 2.6.x 已经可以支持 2 的32次方减1 UID
  • GID
  • 用户信息说明
  • home dir
  • shell

/etc/shadow

加密的密码

9个部分:

  • 帐号名称
  • 密码,加密过,如果为* 或 ! 则表示这个帐号并不会用来登陆
  • 最近更改密码日期,1970年1月1号作为1
  • 密码不可更改天数
  • 密码需要重新更改天数
  • 密码更改期限前的警告期限
  • 密码过期的宽限时间
  • 帐号失效日期
  • 保留

useradd

root@linux ~#  useradd username

/etc/default/useradd

新增用户模板

GROUP=100 #默认用户组
HOME=/home #默认Home目录
INACTIVE=-1 # /etc/shadow 内第7栏
EXPIRE= # /etc/shadow 内第8栏
SHELL=/bin/bash #默认shell
SKEL=/etc/skel #home目录内容数据参考

/etc/skel/*

新增用户home目录参考

passwd

设置密码,直接 passwd 则是修改自己密码

root@Linux ~# passwd username

usermod

调整用户帐户信息

userdel

删除用户

root@linux /# userdel [-r] username

-r 连同home目录一起删除

##Group

/etc/group

类似

root:x:0:root
daemon:x:1:root,bin,daemon
bin:x:2:root,bin,daemon
sys:x:3:root,bin,adm

4部分:

  • 用户组名称
  • 用户组密码 /etc/gshadow
  • GID
  • 支持的帐号名称

####有效用户组 查看已einverne用户身份登录,支持的用户组命令:

pi@linux / $ groups
pi adm dialout cdrom sudo audio video plugdev games users netdev gpio i2c spi input

使用命令 newgrp groupname 切换有效用户

/etc/gshadow

类似:

root:::root

4个字段:

  • 用户组名称
  • 密码栏,以 ! 开头表示无法登陆
  • 用户组管理员帐号
  • 用户组所属帐号

groupadd

命令:

root@linux ~# groupadd groupname

groupmod

调整 group 相关参数

root@linux ~# groupmod -g 103 -n groupname groupothername

groupdel

删除用户组

root@linux ~# groupdel groupname

su & sudo

/etc/sudoers 文件,建议使用 visudo 编辑该文件

格式:用户帐号 登录主机 = (可变换的身份) 可执行的命令

用户
einverne ALL = (ALL) ALL
用户组内
%groupname ALL = (ALL) ALL
不需要密码
%groupname ALL = (ALL) NOPASSWD: ALL

chgrp

change file group

chgrp users dirname/filename [-R]

chown [-R]

chown change file owner

chown root:root filename

chmod

change file property, SUID

  • number

      r:4
      w:2
      x:1
    

    chmod [-R] xyz filename/dir

  • 符号

+加入 -除去 =设置
u user g group o others a all


2015-09-24 linux , user , group

GitLab 学习笔记

Here is some config file paths and some commands I used to deal with GitLab. This is a learning note, not an instruction of installing GitLab on your server. For the detail of installation, please check the official site and playlist I create on Youtube.

gitlab icon

##config gitlab主要配置目录 /etc/gitlab/gitlab.rb

##command

  • gitlab-ctl reconfigure always run this command after modifying the config file /etc/gitlab/gitlab.rb. All the config files are generated by this command and located under opt/gitlab/embedded/service/gitlab-rails/config.

  • gitlab-ctl start|stop|restart start stop and restart gitlab service

  • gitlab-ctl status 输出类似下面的格式:

      run: logrotate: (pid 744) 197s; run: log: (pid 737) 197s
      run: nginx: (pid 743) 197s; run: log: (pid 731) 197s
      run: postgresql: (pid 748) 197s; run: log: (pid 738) 197s
      run: redis: (pid 746) 197s; run: log: (pid 734) 197s
      run: sidekiq: (pid 747) 197s; run: log: (pid 736) 197s
      run: unicorn: (pid 745) 197s; run: log: (pid 735) 197s
    
  • gitlab-ctl tail trace the log, and check error

  • gitlab-ctl tail postgresql 单独查看 postgresql 日志

##file path

  • /opt/gitlab gitlab和依赖应用的代码

  • /var/opt/gitlab/bin gitlab-ctl reconfigure命令写入的地方,存放应用数据和配置文件 /etc/gitlab omnibus 版本 gitlab的配置文件,平常只需要修改这个配置文件就够了

  • /var/opt/gitlab/git-data/repositories all the repo are stored here.

  • /var/log/gitlab 包含 omnibus 版本 gitlab 所有组件的日志数据

  • /var/opt/gitlab/nginx/conf/ nginx.conf and gitlab-http.conf

GitLab SMTP setting

official document is here

Following is my setting to use 163 NetEase’s SMTP service. But after I test for a while, most of GitLab emails were blocked by the service. So I change my setting to use mailgun.

# If your SMTP server does not like the default 'From: gitlab@localhost' you 
# can change the 'From' with this setting.
# 网易服务器smtp机器要求身份验证帐号和发信帐号必须一致
# 如果用户在发送邮件时,身份验证帐号和发件人帐号是不同的,因此拒绝发送。
gitlab_rails['gitlab_email_from'] = 'username@163.com'
gitlab_rails['gitlab_email_reply_to'] = 'username@163.com'

#send gitlab notification via SMTP by 163.com
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.163.com"
gitlab_rails['smtp_port'] = 25
gitlab_rails['smtp_user_name'] = "username@163.com"
gitlab_rails['smtp_password'] = "smtp password"
gitlab_rails['smtp_domain'] = "163.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true

This is my setting for mailgun

# Sending email via SMTP using mailgun, following is the config
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.mailgun.org"
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = "gitlab@domain.com created in the console of mailgun"
gitlab_rails['smtp_password'] = "password created in the console of mailgun"
gitlab_rails['smtp_domain'] = "your domian.com same as the @domain.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true

##Ref

http://doc.gitlab.com/omnibus/


2015-09-20 GitLab , Git

1980也不会存在的爱情

莫名奇妙的陪同学看了这场电影,看之前完全没有了解,只是听说这部电影是在他们那里拍摄的,其他的一无所知。而看之前也同样在豆瓣了解过,5.2的评分让我完全不抱希望,只是同学一再推荐就去了。

1980年代的爱情

只是一部文艺电影,坐在电影院里我一再告诫自己,于是电影就开始了。开场部分大段大段的自白,缓慢的镜头,那个叫做公母寨的地方确实很美,其实整个故事很简单,一个下乡的青年遇到了曾经的初恋,发生了一段美好的故事,虽然结局很悲惨,但过程很美好。这是一个很美好的青春故事,夹杂着那个时代,那个地点特有的符号,特有的宁静,特有的风景,原本应该是一个既能看风景又能看颜值的美好爱情片,却分分钟让我出戏,太过文艺的对白,让我觉得整个过程就像是两个人在背书,虽然作为一个90后并不知道80年代人们的对话,但是总觉得如电影中那样的对话是不大会出现的,你能随口一句话就能引发人生无限思考还能保证押韵?其二就是无法忍受的慢镜头,虽然爱情片总该有那两个镜头能够让人感受到浪漫,但,但对我来说更多的是无聊的等待,当然也有一些记忆深刻的镜头,就比如那个两人坐在竹桥上彻夜谈天,男主吹口琴的瞬间让人感觉到了些许浪漫。其他的镜头和叙述真的很让人出戏。

不过还有些需要被提起的,乡长和老田真是片中最喜欢的两个角色了,在这样的怀旧爱情片中能够出现这样的小插曲还是挺好,一个就是男主和乡长同上厕所,一个就是男主女友来找老田在楼下扫地说,饭菜能准备,床没法准备,再一个就是乡长拿错男主写的情书的时候。也就这样的时候让人会心的一笑。

如果按照观影风向标的打分标准来说,我可以给的分数分别是剧情5分,表演4分,可以给乡长和老田5分,而娱乐性是2分,有一个好的故事却没有一个会讲故事的好导演,哎。

当然此类电影的出现本来就是值得赞扬的,电影院长期被小时代,匆匆那年等等青春爱情片占领的时候出现这样一部稍微文艺一点的爱情片的时候,也不能苛求过多,只是这部电影能让我记住的也就只有那山间的风景了,远眺满山的茶树,中间些许采茶人,也有一条或隐或现的小道,主人公走在这条小路上去找女主的爸爸。

而对比我们的邻居韩国,他们一向以爱情片为人所知,但当然他们什么类型片都能产出了的,但他们拍摄爱情片总让人不能忘却,我的野蛮女友已经过了十多年,我依然会为男女主角的美好爱情所感动,我脑海中的橡皮擦,这只是一部偶然间看过的电影却让我无法忘怀,假如某一天我失忆了,我的另一半会有这样的坚持,陪我重走一遍曾经走过的地方吗?而假如爱有天意,讲过去的爱情故事,其实和这部1980有着相同的背景,却拍出来完全不一样的感觉,这些韩国电影却总有一两个镜头让人无法忘却,总有一两首让人记忆犹新,而回想这部片子,我真的已经想不到什么了,那两首出现过的歌,真是让看得我无比的尴尬,那真的是那个时代人唱的歌嘛?

而更加让我无法接受的便是片尾追加的几十年过后,一次同学聚会,一次滚床单,一次拒绝,而后又是几十年的离别,最后男主想要回到那个宁静的山村的时候,女主却得绝症去世了。世上有这样巧的事情,真巧想到她的时候,她就不再了?虽然知道电影是由小说改编,可是这样的离奇巧合让我无法接受更让我无法接受的是女主嫁人,而丈夫车祸去世了,女主还得了绝症,这是再拍韩剧么?如果导演或者小说作者想要在最后营造悲伤氛围的话,这并不是最佳的方法,我们的眼泪并不会这么留下来,而在此过程中我看到的是男主作为一个男人无法承担起的责任,虽然女主怕步她母亲的后尘怕连累男主,而选择留在山村,如果说女主留在山村最后的目的只是照顾年老的父亲的话,那么父亲去世之后,她便没有了继续留着的理由,她也有理由追寻自己的梦想,追寻自己的理想,甚至是追寻自己的情人,虽然片中并没有对女主有太多的感情描写,但我坚信女主并不是不喜欢男主,不然何必几年前给的笔记本还留着,几年前给的口琴还留着,当然这也可能只是故事太过悲剧,我并不想接受而已啦,我只是尽可能的讲了我的感受,我并没有看过小说或者了解过作者和导演本身。

而最后片中浅尝辄止的历史背景,大家都知道77年恢复高考,78年改革开放,而之前是整整十年的浩劫,乡政府的老田,我倒是很愿意听一听老人家的故事,女主的建筑师父亲,我也愿意听一听您的故事,那是真真的爱情,虽然片中老田也说过了,他说他并不记恨他的妻子,但是他们有感情,虽然那可能并不是我们通常说的爱,而桥梁建筑师的爱情则更加让人惋惜,老人会后悔一辈子吗?电影中也没有交代,只是给了一个老人看着墙上妻子的照片久久不能走动的背影。或许是因为审查的关系亦或许导演或者作者想要说明什么,这世上的爱情并不是什么天长地久,而是就是远隔天涯也能默默的祝福彼此。

http://movie.douban.com/review/7601848/


2015-09-17 影评 , 霍建起 , 野夫

Google+

最近文章

  • celery best practice 不要使用数据库作为 AMQP Broker 随着worker 的不断增多可能给数据库IO和连接造成很大压力。 Docker 上很多 相关的镜像。
  • Git 使用过程中遇到的小技巧 Git 使用过程中遇到的小技巧,平时没有 commit, merge, branch 用的那么勤快,但是需要时也需要查看一下,因此记录一下,以免忘记。
  • URL 短域名 逛博客看到别人在讨论短URL的设计实现,然后偶然间发现了 GitHub 曾经推出1过的短域名服务 Git.io https://github.com/blog/985-git-io-github-url-shortener ↩
  • 目录 /usr/local vs /opt 的区别 今天看 JDK 的路径突然发现我在两台机子上,一台装在了 /usr/local/ 目录下,而我自己的 Mint 装在了 /opt/ 目录下。感觉对 Linux 目录结构还需要增加了解,就Google了一下。
  • SQLAlchemy session 使用问题 在更改 SQLAlchemy Session 从每次请求都创建到共享同一个 Session 之后遇到了如下问题: