家里有一个Raspberry Pi,想弄来做个小的网页服务器玩玩。用lighttpd搭了个测试页面,内网可以正常访问。
路由器已经刷成dd-wrt,设置了DMZ主机和端口映射。听说国内已经禁了普通家庭用户的80端口,也特地设置了不一样的端口号。。。。但是就是无法从外网访问。
然后注意到dd-wrt上显示的WAN IP和www.ip138.com上显示的不一样。。。。。。
原来家里的IP不是外网IP,中间还隔着一个联通宽带的二级ISP。所以无法远程访问内网主机。
联通太坑了。。。以前用电信的光纤宽带好像还是可以的。
参考:这里
Monday, May 12, 2014
Tuesday, May 6, 2014
Mavericks!
Helped upgrade a friend's 2011 MacBook Pro to Mavericks.
Found a nice tutorial on macworld. It indicates 2 options for the upgrade installation:
http://www.macworld.com/article/2056561/how-to-make-a-bootable-mavericks-install-drive.html
http://eric.gavaletz.com/2013/10/making-os-x-mavericks-usb-installer.html
Found a nice tutorial on macworld. It indicates 2 options for the upgrade installation:
- use createinstallmedia OR
- use disk utility
The first option never works, it always returns an error when creating a bootable drive:
Failed to start erase of disk due to error (-9999, 0).
A error occurred erasing the disk.
The second one works like a charm :)
Two useful links:
http://eric.gavaletz.com/2013/10/making-os-x-mavericks-usb-installer.html
Wednesday, April 23, 2014
Latex script
If you are tired of making multiple clicks in TexWorks everytime just to get one .tex compiled into a PDF, here is a quick windows script. Note that bibtex works with the .aux file.
P.S. JabRef is nice bib management tool on Windows.
echo %~f0 pdfLatex sample.tex bibtex sample.
aux
pdfLatex sample.tex pdfLatex sample.tex echo "Press any key to close (or your own message here)" pause > nul del *.aux del *.bbl del *.log del *.blg del *.out sample.pdf
P.S. JabRef is nice bib management tool on Windows.
Friday, April 18, 2014
MathJax Test
$$
x_{1,2} = \frac{-b \pm \sqrt{b^2-4ac}}{2b}.
$$
Here is the link that shows how to use MathJax to show \( \LaTeX \) typesetting on Blogspot. Well written. :)
Try a linear inverted pendulum dynamic equation:
\[ \ddot{y}=\frac{g}{z_c}-\frac{1}{m z_c}u_r \]
Note that enclosing math in single $'s does not work in the default setting for MathJax.
By default, use "\(\backslash(\)" and "\(\backslash)\)" for inline math and double dollar signs or "\(\backslash[\)" and "\(\backslash]\)" for displayed math.
Examples: inline equations: \((y+\sqrt z)^{-1}\) and \( \sin^2 x^2 \). And displayed equations
$$\frac{2}{3}$$
\[ {H}(q)\ddot{q} + C(q,\dot{q})\dot{q}+G(q)\dot{q} = S^T \tau + J^T f \]
One downside is, you will not see the typesetting result in the edit (compose) mode. It will show up after you press publish or update button.
Try a linear inverted pendulum dynamic equation:
\[ \ddot{y}=\frac{g}{z_c}-\frac{1}{m z_c}u_r \]
Note that enclosing math in single $'s does not work in the default setting for MathJax.
By default, use "\(\backslash(\)" and "\(\backslash)\)" for inline math and double dollar signs or "\(\backslash[\)" and "\(\backslash]\)" for displayed math.
Examples: inline equations: \((y+\sqrt z)^{-1}\) and \( \sin^2 x^2 \). And displayed equations
$$\frac{2}{3}$$
\[ {H}(q)\ddot{q} + C(q,\dot{q})\dot{q}+G(q)\dot{q} = S^T \tau + J^T f \]
One downside is, you will not see the typesetting result in the edit (compose) mode. It will show up after you press publish or update button.
Tuesday, April 15, 2014
Subscribe to:
Posts (Atom)