您在這裡

Linux

UTF-8 for SASS, Screen

分類: 

前陣子一直被一個問題搞到想殺人,因為SASS裡有....

font-family: "微軟正黑體"......

然後他就再也沒有成功編譯過了.......(眼神死)

在網路上查了很久,大家都說是Rails的UTF-8要指定,還有要在.sass前面加上@charset utf-8;
結果都沒效。

但是回家用Putty又正常了(公司是Mac),整個百思不得其解啊啊啊啊啊!!!!

搞到最後終於發現是Shell的預設編碼不知道跑去那了,造成他一直用ASCII來編譯,會成功才有鬼啊= =

所以把指定UTF-8的方式來記一下,有需要的人可以參考一下。

Bash shell: /etc/bash.bashrc

export LC_ALL=zh_TW.UTF-8
export LANG=zh_TW.UTF-8
export LANGUAGE=zh_TW.UTF-8

Screen: /etc/bash.bashrc

Linode Nodebalancer with HTTPS

分類: 

Linode Nodebalancer is use Proxy to make balancer.

Before we can use HTTP (80 port) on it, but HTTPS (443 port) only can use TCP.
So we can't get real ip from remote user.

Now HTTPS is worked, but it use HTTP to callback, then nginx will block.
We need to fix https variable to make it work.

This is get real ip from remote for HTTP and HTTPS