Disqus module's UTF8 characters in URL is missing
Ok, I give up my 30 days continuous blog,
but i will keep blogging as much as possible.
As there are disqus comments appeared,
I found that the UTF8 url send to disqus is actually incorrect, UTF8 characters is removed.
And as i cannot found a bug logged,
the temp. solution is remove UFT8 from generated path from pathauto
and report a bug. http://drupal.org/node/1809742
5th Oct (Friday) day 23 Freelance life
作為一個自由職業者
有公司提出一個星期有兩日的辦工時間都預留的話
我究竟還是否一個自由職業者?
還是我只是一個合約者?
預留時間的話的確提供了某程度的月收入基礎
但這其實並不是我所需求的「假安全」才是
現階段還是先什麼都試試再看看如何修改我的工作模式吧
4th Oct (thur) Day 22 Complete failure,台灣宜蘭遊小感
我當初想旅行台灣期間仍日日更新這Blog 完全是一個錯誤
我甚至乎無辦法閱讀我一般每日的必讀物
更不用說是每天寫些什麼
但台灣的流動互聯網對旅客的方便程度是非一般的高
香港是完全比不上
每一家7﹣11,車站都有免費的wifi可以使用
所以你就算是旅遊在外,仍然可以一直「保持連線」
最後提一提台灣的女生,因為這次我沒有留在台北的原固
我看到的女生沒有在台北的時候的那種感動
老實說我是有點失望的
It is a complete failure trying to update this blog everyday during my holiday.
I do not even have time to read all the information I normally read
not to mention write something everyday.
BTW Taiwan have very good penetration on internet service for tourist,
I think even HK do not provide sure coverage
Every 7-11 have free wifi to use, train stations etc
so you can "stay connected" for free even though you are travelling
For the girls in Taiwan, as i do not stay in Taipei this time
the girls on the street is not as impressive as it is in Taipei
I am honestly disappointed.
28th Sept (Fri) Cross domain ajax POST proxy php file
As discussed yesterday,
this is the php file that can act as a proxy to post cross domain for you:
<?php
$ch = curl_init($_GET['url']);
unset($_GET['url']);
$data_string = http_build_query($_GET);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string))
);
$result = curl_exec($ch);
header('Cache-Control: no-cache, must-revalidate');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Content-type: application/json');
echo $result;
Pass in extra url params as query string, it will post to that URL, while not sending the URL to remote server.
27th Sept (Thur) Day 15 Cross domain ajax
好了,我知道我脫了兩日的稿,我會補回的
正在做新的 minimal value product (MVP)
碰到很多 cross domain 的 AJAX
總結一下,cross domain 可以使用 jquery 的jsonp
會自動使用 success 的 callback 函數
cross domain GET 只是小菜一碟dataType: 'jsonp',
一下就好了
但 POST 卻是不可以 cross domain 的
我正在寫一個 PHP 是可以做中間的跳板
應該是一個很簡單的curl 吧
edit (28th Sept 2012): The php 跳板: http://www.joetsuihk.com/28th_sept_fri_cross_domain_ajax_post_proxy_php_...
p.s. 明天要去台灣六日,真的補得回脫的稿嗎?