2017年12月21日 星期四

[PHP] 取得圖片的大小與類型 getimagesize

[PHP] 取得圖片的大小與類型 getimagesize
php 的中要取得圖片的大小與類型資訊,可以使用 getimagesize


list($width, $height, $type, $attr) = getimagesize("img/flag.jpg");
除了寬度長度,還能取得 image 的 content-type如果是 PNG 檔,就會得到 3 。

  $imageTypeArray = array
    (
        0=>'UNKNOWN',
        1=>'GIF',
        2=>'JPEG',
        3=>'PNG',
        4=>'SWF',
        5=>'PSD',
        6=>'BMP',
        7=>'TIFF_II',
        8=>'TIFF_MM',
        9=>'JPC',
        10=>'JP2',
        11=>'JPX',
        12=>'JB2',
        13=>'SWC',
        14=>'IFF',
        15=>'WBMP',
        16=>'XBM',
        17=>'ICO',
        18=>'COUNT' 
    );

[PHP] PHP Parse error: syntax error, unexpected '$value' (T_VARIABLE) in vendor/aws/aws-sdk-php/src/functions.php

PHP Parse error: syntax error, unexpected '$value' (T_VARIABLE) in vendor/aws/aws-sdk-php/src/functions.php on line 36
問題出現在 aws/aws-sdk-php/src/functions.php on line 36
/**
 * Filters values that do not satisfy the predicate function $pred.
    *
 * @param mixed    $iterable Iterable sequence of data.
 * @param callable $pred Function that accepts a value and returns true/false
    *
 * @return \Generator
    */
    function filter($iterable, callable $pred)
    {
    foreach ($iterable as $value) {
        if ($pred($value)) {
            yield $value;
        }
    }
    }
使用的 yield 需要 PHP 5.5 後才支援。
PHP Parse error: syntax error, unexpected '$value' (T_VARIABLE) in /statamic/vendor/aws/aws-sdk-php/src/functions.php on line 36 · Issue #971 · statamic/v2-hubhttps://github.com/statamic/v2-hub/issues/971

2017年12月7日 星期四

[GUID] Flickr 的 Unique ID 產生方法 Ticket Servers


Flickr 的 Unique ID 是一個非常實際的解決問題方式,稱作 Ticket Servers 。
使用 MySQL 來達成 master -master 與 sharding 。

在使用一個table

CREATE TABLE `Tickets64` (
  `id` bigint(20) unsigned NOT NULL auto_increment,
  `stub` char(1) NOT NULL default '',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `stub` (`stub`)
) ENGINE=MyISAM

SELECT * from Tickets64 returns a single row that looks something like:
+-------------------+------+
| id                | stub |
+-------------------+------+
| 72157623227190423 |    a |
+-------------------+------+ 
 
先插入一個ID值

使用

REPLACE INTO Tickets64 (stub) VALUES ('a');
SELECT LAST_INSERT_ID();
 
 
就會得到下一個ID

然後透過兩臺不同的設定奇偶數分開避免SPOF

TicketServer1:
auto-increment-increment = 2
auto-increment-offset = 1

TicketServer2:
auto-increment-increment = 2
auto-increment-offset = 2

Ticket Servers: Distributed Unique Primary Keys on the Cheap | code.flickr.com http://code.flickr.net/2010/02/08/ticket-servers-distributed-unique-primary-keys-on-the-cheap/

2017年12月2日 星期六

[食記] 朵頤排餐館 Doricious 京站 2017.12.02



很久沒在 blog 記下食記了

一年一度的聚餐A , S , J 。
暢聊更新一下近況 ,期待下一次的聚餐。
本來約在隔壁開飯川食堂,因為訂位滿了,所以,同在京站尋找吃的地方。
四人套餐一個人加服務費 550,吃的很滿足。












2017年11月30日 星期四

[docker] Docker image 怎麼 build 沒 cache 的 images --no-cache


我們會使用 docker build 來 build image
當docker 辨識是同樣 layer 的時候他會使用已經產生的 layer cache。

當 我們Dockerfile 中有 RUN apt-get update 這類型的指令時,很容易就有過時的狀況,
container 沒有辦法獲取過期或是已經消失的 file 或是url 。

這時候我們就要使用 $ docker build -t "mytest" --no-cache .

舉個例子來看 Dockerfile
$ cat Dockerfile
FROM ubuntu:16.04
RUN apt-get update

第一次 build image

$ docker build -t "mytest" .
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM ubuntu:16.04
 ---> d355ed3537e9
Step 2/2 : RUN apt-get update
 ---> Running in e9efeedd4b03
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Get:3 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [53.1 kB]
Get:4 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [505 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [12.9 kB]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [229 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [3479 B]
Get:10 http://archive.ubuntu.com/ubuntu xenial/universe Sources [9802 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1558 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [14.1 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [9827 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [176 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources [231 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [866 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [13.7 kB]
Get:18 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [719 kB]
Get:19 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [18.5 kB]
Get:20 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [5174 B]
Get:21 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [7150 B]
Fetched 24.6 MB in 8s (2966 kB/s)
Reading package lists...
 ---> 5821cf494987
Removing intermediate container e9efeedd4b03
Successfully built 5821cf494987
Successfully tagged mytest:latest

第二次 build 的時候已經有cache

$ docker build -t "mytest" .
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM ubuntu:16.04
 ---> d355ed3537e9
Step 2/2 : RUN apt-get update
 ---> Using cache
 ---> 5821cf494987
Successfully built 5821cf494987
Successfully tagged mytest:latest

這時候注意到已經沒有在 apt-get update 要是有些檔案已經從sourcelist移除 就發生狀況

怎麼不使用 cache 再 build 一次呢

$ docker build -t "mytest" --no-cache .
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM ubuntu:16.04
 ---> d355ed3537e9
Step 2/2 : RUN apt-get update
 ---> Running in 76da71f4b31b
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Get:3 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [53.1 kB]
Get:4 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [505 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:6 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [12.9 kB]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [229 kB]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [3479 B]
Get:9 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial/universe Sources [9802 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1558 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [14.1 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [9827 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [176 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources [231 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [866 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [13.7 kB]
Get:18 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [719 kB]
Get:19 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [18.5 kB]
Get:20 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [5174 B]
Get:21 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [7150 B]
Fetched 24.6 MB in 9s (2597 kB/s)
Reading package lists...
 ---> 7ffb5d5b40ab
Removing intermediate container 76da71f4b31b
Successfully built 7ffb5d5b40ab
Successfully tagged mytest:latest



ref
「Allen 谈 Docker 系列」docker build 的 cache 机制
http://open.daocloud.io/docker-build-de-cache-ji-zhi/

2017年11月19日 星期日

[life] 產出是真的獲得 記即時記錄的反思


最近,有幾場旅行,來去匆匆的都沒有好好把它記錄下來。

以旅遊遊記為例,從以往的旅程來看,覺得要在當天或是在事前先做好記錄,然後,在回程的一兩週內迅速整理,最有效率,內容也比較精采。

技術類的文章,應該也是要及時的整理,不然,要在整理起來隨筆就很耗費時間。

只有在產出的時候,你在清楚的在回顧跟整理。

2017年11月18日 星期六

[mac] bash bash-completion 指令自動補齊


在ubuntu 中在 bash 打指令,
像是 git checkout 按上 tab 他會幫你自動補齊。

如果在mac bash 中呢?
使用 bash-completion

$ brew install bash-completion
==> Downloading https://homebrew.bintray.com/bottles/bash-completion-1.3_1.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring bash-completion-1.3_1.el_capitan.bottle.tar.gz
==> Caveats
Add the following lines to your ~/.bash_profile:
  if [ -f $(brew --prefix)/etc/bash_completion ]; then
    . $(brew --prefix)/etc/bash_completion
  fi

Homebrew's own bash completion script has been installed to
  /usr/local/etc/bash_completion.d

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
🍺  /usr/local/Cellar/bash-completion/1.3_1: 188 files, 605.9K

2017年11月2日 星期四

[電影] 雷神索爾3 :諸神黃昏 Thor: Ragnarok


在「蘇科維亞戰役」兩年後,索爾得知諸神黃昏的預言並希望全力阻止火焰巨人蘇爾特爾毀滅阿斯嘉。同時,索爾與洛基來到地球尋找奧丁時碰到奇異博士,在奇異博士的指引下,終於找到身處於挪威的奧丁,奧丁向他們兄弟二人道出他們還有一位姐姐-「死亡女神」海拉。在一場戰鬥裡雷神之鎚被海拉所毀,然後返回阿斯嘉時被推離彩虹橋而來到薩卡星(Sakaar),於此星上成為階下囚被逼在當地統治者宗師所舉辦的競技場展開角鬥士對決,而對手居然是自己的老戰友浩克。索爾請浩克幫助以便及時趕回阿斯嘉,阻止海拉和即將到來的諸神黃昏。
在最後一戰中,索爾被奪一目後陷入苦戰,奧丁及時出現索爾的幻像之中,提醒他是雷神索爾的真正身份,重拾他本來的力量,並且說出「阿斯嘉從來不是一個地方,而是一個民族。」即便如此,合兄弟二人之力仍無法擊敗海拉,他們最後決定讓火焰巨人蘇爾特爾在永恆火焰中重生,引發諸神黃昏以打敗海拉。阿斯嘉被毀後,成為阿斯嘉之王的索爾帶領著阿斯嘉人民前往地球,前方卻迎面而來一艘巨型戰艦……

週四抽空去看雷神索爾三 with L ,有一陣子沒在電影院看電影了。本來在想說這樣的片長,能夠坐滿嗎?
後來才發現這個是marvel 系列電影中,可能是最短的片長了。電影的節奏滿緊湊的,感覺也很跳,幾乎沒有冷場的度過。難怪有人說這是威漫近期的搞笑片了。

用了指定電影兌換券,還有電影券去換票的。不過,在信義威秀平日還是滿滿人潮,本來想再7:20 排隊時間已經過了,就想說看8:00的,但是只有四排的位置。只好再下一場8:20 的電影。有最後一排與中前右旁邊選擇,剛好選到了 H排 17 18 ,距離不錯,不過有點稍微偏旁邊了點。

從上次到美麗華看了場四個人的平日電影 敦克爾克大作戰,這次的體驗還算不錯。

[問題] 信義威秀選位 (5廳) - 看板 Theater - 批踢踢實業坊 https://www.ptt.cc/bbs/Theater/M.1389962595.A.455.html


雷神索爾3:諸神黃昏 - 維基百科,自由的百科全書  片長130 分鐘 
https://zh.wikipedia.org/wiki/%E9%9B%B7%E7%A5%9E%E7%B4%A2%E7%88%BE3%EF%BC%9A%E8%AB%B8%E7%A5%9E%E9%BB%83%E6%98%8F
諸神黃昏挪威語Ragnarök)是北歐神話預言中的一連串巨大劫難,包括造成許多重要死亡的大戰(奧丁索爾弗雷海姆達爾火巨人霜巨人洛基等),無數的自然浩劫,之後整個世界沉沒在水底。然而最終世界復甦了,存活的神與兩名人類重新建立了新世界。這是北歐神話極重要的一部份,也是許多學術研討與理論的主題。
諸神黃昏主要記錄在詩體埃達散文埃達。其原名RagnarökrRagnarökkr意為「諸神的末日」。

諸神的黃昏 - 維基百科,自由的百科全書
https://zh.wikipedia.org/wiki/%E8%AB%B8%E7%A5%9E%E7%9A%84%E9%BB%83%E6%98%8F
後設笑點連發!《雷神索爾 3:諸神黃昏》中暗藏的 9 個小秘密 - Punchline 娛樂重擊 http://punchline.asia/archives/47122

"已經看過電影的人應該都有注意到,電影中海拉接住雷神之鎚那場景的背景,與預告中看起來完全不一樣,那是因為原來這場戲設定在紐約,但導演覺得不妥就改掉了;不過預告中的版本背景中還是有藏著一個小彩蛋,眼尖的人會發現索爾背後的塗鴉寫著「skux life」,正是導演的前一部電影《神鬼嚎野人》中出現過的詞。"

2017年11月1日 星期三

[linux] xargs 怎麼在多個指令使用相同的參數 xargs with multiple commands as argument

xargs 怎麼在多個指令使用相同的參數 xargs with multiple commands as argument
我們常常使用 xargs , awk 與 grep 來組合複合式的command,但是,要怎麼使用同一個 arguments 再不同的 command中呢 ?
xargs - build and execute command lines from standard input

   -I replace-str
          Replace occurrences of replace-str in the initial-arguments with names read
          from standard input.  Also, unquoted blanks do not terminate  input  items;
          instead the separator is the newline character.  Implies -x and -L 1.
舉一個例子,想要刪除git 不需要的branch 還有刪除遠端的 branch。
先使用grep 與 awk 濾出這些 branch 名稱
$ git branch | grep fix fix/ios_poster_zip fix_langs_admin fix_langs_key fix_poster_counts
使用 xargs -I 來 產生參數 (-I 後面可以使用能使用的字,來當作替代)
$ git branch | grep fix | awk '{print $1}' | xargs -I {} git push origin :{}
刪除本地 branch
$ git branch | grep fix | awk '{print $1}' | xargs -I {} git branch -d {}
如果我們想刪除本地與遠端branch呢?
先看看怎麼在單個 xargs 使用多個command 。
$ git branch | grep fix | awk '{print $1}' | xargs -I {} sh -c 'echo {};echo {}'fix/ios_poster_zipfix/ios_poster_zipfix_langs_adminfix_langs_adminfix_langs_keyfix_langs_keyfix_poster_countsfix_poster_counts
$ git branch | grep fix | awk '{print $1}' | xargs -I {} sh -c 'git push origin :{}; git branch -d {}'
這樣在單一 xargs 中多個指令使用同一個變數
bash - xargs with multiple commands as argument - Stack Overflowhttps://stackoverflow.com/questions/6958689/xargs-with-multiple-commands-as-argument

2017年10月31日 星期二

[php] php 怎麼使用 RSA 非對稱式加密



首先,要先產生 RSA 公私鑰,我們使用公鑰放在client 端,然後,在server 端使用 private key 來解密。

先產生私鑰
  openssl genrsa -out private_pg_report.key 1024
再用私鑰生成公鑰
  openssl rsa -in private_pg_report.key -out public_pg_report.pem -outform PEM -pubout

放置下面兩個路徑 REPORT_PUBLIC_KEY_PATH , REPORT_PRIVATE_KEY_PATH
這邊要注意的是,RSA 只能加密117 位,所以 使用str_split 去分隔成chunk ,分段加密,最後再使用 base64_encode 成 string 。
解密是反過來的過程,加密後的長度就是固定128。所以使用 128 去做str_split 。


    public function encrypt($plain)
    {
        $fp = fopen(REPORT_PUBLIC_KEY_PATH, "r");
        $pubKey = fread($fp, 8192);
        fclose($fp);
        $pubKeyRes = openssl_get_publickey($pubKey);
        if (!$pubKeyRes) {
            throw new Exception('Public Key invalid');
        }
        $finalCrypt = '';
        foreach (str_split($plain, 117) as $chunk) {
            if (openssl_public_encrypt($chunk, $crypt, $pubKeyRes)) {
                $finalCrypt .= $crypt;
            }
        }
        openssl_free_key($pubKeyRes);
        return base64_encode($finalCrypt);
    }

    public function decrypt($encrypted)
    {
        $fp = fopen(REPORT_PRIVATE_KEY_PATH, "r");
        $privateKey = fread($fp, 8192);
        fclose($fp);
        $privateKeyRes = openssl_get_privatekey($privateKey);
        if (!$privateKeyRes) {
            throw new Exception('Private Key invalid');
        }
        $finalDecrypted = '';
        foreach (str_split(base64_decode($encrypted), 128) as $chunk) {
            openssl_private_decrypt($chunk, $decrypted, $privateKeyRes);
            $finalDecrypted .= $decrypted;
        }
        openssl_free_key($privateKeyRes);
        return $finalDecrypted;
    }

PHP 使用 RSA 公钥对 JSON 对象进行加密,加密不了? - V2EX
https://www.v2ex.com/t/327672
PHP加密的几种方式 - 简书
http://www.jianshu.com/p/5f42699d8af5


[logstash] logstash 怎麼取得 nested 的 json 內的值


怎麼取得 json 的 值呢?

filter {
    if [type] == "my_report_text" {
        json {
            source => "message"
        }
        date {
            match => ["server_timestamp", "UNIX"]
            remove_field => ["server_timestamp"]
        }

        mutate {
             remove_field => ["message","source","input_type","offset","count","fields"]
             add_field => {
                 "gid" => "%{[text_v1][id]}"
                 }
        }
        if ![text_v1][id] {
            drop {}
        }

    }

其實,只要使用 "%{[text_v1][id]}" 方式就可以了。
範例中的 message 內是 json string  下列有兩筆範例參考。


{"@timestamp":"2017-10-31T12:21:23.896Z","beat":{"hostname":"pccm","name":"pccm","version":"5.5.1"},"input_type":"log","message":"{\"server_ip\":\"172.19.0.5\",\"server_timestamp\":1509450155,\"uid\":813837017074237440,\"pid\":0,\"text_v1\":{\"feature\":1,\"content\":\"Cool\",\"platform\":0,\"country\":\"us\",\"app_version\":\"6.30\"}}","offset":630,"source":"/data/log/report_text.log","type":"my_report_text"}

{"@timestamp":"2017-10-31T12:21:23.896Z","beat":{"hostname":"pccm","name":"pccm","version":"5.5.1"},"input_type":"log","message":"{\"server_ip\":\"172.19.0.5\",\"server_timestamp\":1509450155,\"uid\":813837017074237440,\"pid\":0,\"text_v1\":{\"id\":\"AMX76rwXQ36inHnbYZL8BA\",\"feature\":1,\"content\":\"Cool\",\"platform\":0,\"country\":\"us\",\"app_version\":\"6.30\"}}","offset":630,"source":"/data/log/report_text.log","type":"my_report_text"}

[elasticsearch][logstash] logstash 中 使用某欄位當作 elasticsearch 的 _id


一般的 elasticsearch ouput 如下 可以使用 document_id 來指定 event 的 _id

output { elasticsearch { index => "test1" document_type => "message_logs" document_id => "%{type}-%{id}" action => index hosts => "myhost" }}

一個更完整的例子如下 使用 mutate 從json裏面取值,增加一個 gid 的欄位。如果,當json 沒有id這個欄位,就捨去這筆 event 。
input { #beats { # port => 5044 #} stdin { codec => json_lines } } filter { if [type] == "my_report_text" { json { source => "message" } date { match => ["server_timestamp", "UNIX"] remove_field => ["server_timestamp"] } mutate { remove_field => ["message","source","input_type","offset","count","fields"] add_field => { "gid" => "%{[text_v1][id]}" } } if ![text_v1][id] { drop {} } } } output { if [type] == "my_report_text" { elasticsearch { hosts => ["127.0.0.1","10.2.101.163","10.2.101.164"] index => "report_text-%{+YYYY.MM.dd}" workers => 5 document_id => "%{gid}" } } }

2017年10月20日 星期五

[php] php get remote url file size 取得遠端檔案大小

[php] php get remote url file size 取得遠端檔案大小
可以使用 get_headers 來查看 url 的 file size
$head = array_change_key_case(get_headers("http://example.com/file.ext", TRUE));
$filesize = $head['content-length'];
array_change_key_casearray_change_key_case — Changes the case of all keys in an array是把array內的key都轉成同樣大小寫,預設是小寫。

PHP: array_change_key_case - Manualhttp://php.net/manual/en/function.array-change-key-case.phphttp - Easiest way to grab filesize of remote file in PHP? - Stack Overflow https://stackoverflow.com/questions/1401131/easiest-way-to-grab-filesize-of-remote-file-in-php

[tech][jquery] AJAX 在 error 時顯示錯誤訊息



AJAX 在 error 時顯示錯誤訊息
在 AJAX error 時,跳出 alert


$.post("test.php", function(data) {
   alert("Data Loaded: " + data);
})
.error(function() { 
   alert("error"); 
})
如何秀出 error message


error: function(xhr, status, error) {
  var err = eval("(" + xhr.responseText + ")");
  alert(err.Message);
}
合併起來的例子


$.post("test.php", function(data) {
   alert("Data Loaded: " + data);
}).error: function(xhr, status, error) {
  var err = eval("(" + xhr.responseText + ")");
  alert(err.Message);
}


php - How to get the jQuery $.ajax error response text? - Stack Overflowhttps://stackoverflow.com/questions/1637019/how-to-get-the-jquery-ajax-error-response-textjavascript - jQuery.post() failure callback function? - Stack Overflow https://stackoverflow.com/questions/6046898/jquery-post-failure-callback-function

2017年10月16日 星期一

[武術] 楊太極武藝 蘇清標


再次看了這幾部 楊太極武藝 蘇清標  老師的影片,真的暢快。

養生功操---蘇清標老師演示(HD) - YouTube https://www.youtube.com/watch?v=Gl3WnV65ueY&t=134s
蘇清標楊家老架緊湊套拳+推手表演20140608 - YouTube https://www.youtube.com/watch?v=cORKE2HivB0
蘇清標老師太極拳與推手 - YouTube https://www.youtube.com/watch?v=xSZtZooXCDE

生活與想法


發現已經一段時間,沒有在清醒的時候好好記錄自己的想法了。
忙碌是一個原因,不管是心理,或者是生理上的忙碌,很多事情的都一轉瞬的過了。
有時,是累到,闔著眼睛就睡著了。

  • 17.09.09(六) ~ 17.09.10(日) 去了趟新竹
    火車直接到新竹後 安頓,宵夜--> 享初食堂
    Sat
    -  新竹都城隍廟 周遭
    -  竹塹城迎曦門
    - option  元祖郭家潤餅 阿城號米粉(米粉貢丸湯) 林家肉圓(紅糟肉圓)  廟口鴨香飯

    -  清大 交大
    -  (中午)車庫餐廳
    - 竹科附近
    - 南寮漁港
    - 福源花生醬
  • 17.09.16(六) ~ 17.09.20(三) 到日本進行一趟關西行
  • 17.09.23 (六) ~ 17.09.24 (日) 去了趟日月潭
  • 17.10.07 (六) ~ 17.10.10 (二) 的 國慶日連假
    • 17.10.07 (六)烤肉
    • 17.10.09 (一) 古坑 雲頂喝咖啡
    • 17.10.10 (二) 彰化 拜訪姑姑 逢甲夜市參觀表弟的滷味店

除了生活瑣事,也處理了 project 上的問題。
無奈,可能要繼續調整策略。







2017年9月2日 星期六

[電影] One Day 真愛挑日子



真愛挑日子》(英語:One Day)是2011年由丹麥導演瓏·薛爾菲格所執導,安·海瑟薇吉姆·史特格斯主演的美國浪漫愛情電影。本片改編自作家大衛·尼克爾斯2009年發行的同名小說,於2011年8月上映。
真愛挑日子 - 維基百科,自由的百科全書
https://zh.wikipedia.org/wiki/%E6%83%85%E7%BA%A6%E4%B8%80%E5%A4%A9

《名媛教育》瓏雪兒菲格執導,安海瑟薇和英國小生吉姆史特格斯主演! 英國媒體讚譽繼《鐵達尼號》之後,最經典的愛情電影!

1988年,即將大學畢業的達斯(吉姆史特格斯)和艾瑪(安海瑟薇)初次相識。兩人的家庭背景相差甚遠,艾瑪是平凡家庭的女孩,達斯則是富裕、有魅力的男人。兩人大學四年彼此不認識,卻在畢業舞會當晚產生火花。因此,兩人約定好每年這一天,不管遇到什麼困難、不論身在何處,都一定要見面…

《真愛挑日子》愛情的時機點 - Mr.闕小豪 https://char.tw/blog/post/36082484
【電影.電癮:艾倫觀影有感】One day一天 真愛挑日子 (Ann Hathway安海瑟薇&Jim Sturgess吉姆史特格斯) @ Macchiato's Night Market :: 痞客邦 PIXNET :: http://ellenc711.pixnet.net/blog/post/38867853-%E3%80%90%E9%9B%BB%E5%BD%B1%EF%BC%8E%E9%9B%BB%E7%99%AE%EF%BC%9A%E8%89%BE%E5%80%AB%E8%A7%80%E5%BD%B1%E6%9C%89%E6%84%9F%E3%80%91one-day%E4%B8%80%E5%A4%A9-%E7%9C%9F

以前看過這部電影當時的感觸沒有這麼的深,過了幾年後再看這部電影情感居然滿溢出來。
許多片段居然帶著眼淚的刻在心理。

情結好像就發生在生活當中,或是,可能在將來不久發生。
每一次的新的錯過,感情上被迫接受那個對自己迄而不捨的人。
抑或是,結婚後,面對出去跑趴的老婆。

裡面有句話,"我愛你,可是我現在不喜歡你了。" 
過了二十年,內心的真愛,還是真愛。
生活中總是想要有一個這樣的人伴著,像他說說,自己內心的深層感受,一個讓你依靠的人。

人生總有很多無奈跟關卡要走,只能珍重那個當下珍貴的。

若是珍愛的人離開,能做的,就是過的跟他在一樣。


2017年7月31日 星期一

[電影] 北京遇上西雅圖之不二情書


《北京遇上西雅圖之不二情書》(英文:Book of Love / Finding Mr. Right 2)是2016年由薛曉璐編劇並執導的一部愛情喜劇電影,為《北京遇上西雅圖》的續集。2016年4月29日在中國大陸上映,但內容和《北京遇上西雅圖》劇情無干。
姣爺(湯唯飾)15歲就隨父親移民到澳門,從此在賭城安家,並成為賭場公關。過著朝不保夕、居無定所的落魄生活。來自北京的大牛Daniel (吳秀波飾)隻身在美國打滾多年,已貴為加州銷售成績最優秀的房地產經紀之一,更是身邊不乏女伴的鑽石王老五。姣爺一日起床後看到頭頂一本《查令十字街84號》的書,書諧音同「輸」,姣爺氣憤不已,幾次把書扔掉都意外再回來,無奈之下只好將書按照書上的地址寄了出去。無獨有偶,Daniel大牛也同時因為這本書備受困擾,將書寄到了同一地址。查令十字街84號的書店老闆也是閒來無事,又將兩人的信件寄給了對方,收到書後更加疑惑的兩人通過後續的書信來往從彼此不順眼慢慢成為靈魂知己。
姣爺分別與學霸(陸毅飾)、富豪鄧先生(王志文飾)和詩人(祖峰飾)開展一段無果的感情。Daniel則與兩名外國女子談情,並慘遭拋棄。 Daniel為了得到在洛杉磯生活的一對華裔老人(秦沛吳彥姝飾)的房屋藉機接近老人,Daniel從小在國外生活卻對中國古詩詞文化頗為精通,再加上能言善道意外贏得了性格古怪但飽讀詩書的老爺爺的信任。Daniel帶兩位老人到拉斯維加斯旅遊,為兩位老人補辦婚禮。
爺爺得知Daniel靠近他們的真相後,一度非常氣憤並且生病住院,在和老人相處過程中已經產生了感情的Daniel內疚不已,多次探望都被爺爺拒絕。轉眼到春節,遠在NASA的孫子無法和爺爺奶奶團聚,只好進行視頻對話,無奈爺爺奶奶搞不懂這些高科技,在爺爺的默許下奶奶叫來了Daniel,面對氣還沒完全消除的爺爺,奶奶說「好孩子才可以來家裡看電視」,兩人之間的關係才慢慢緩和。
=======
呼~~
邊看邊產生的投射作用,讓我再昨晚看完後,無法自拔。