博客:从GitHub迁移到OpenShift
之前博客一直以纯静态的方式托管在GitHub Page里面(是基于Hexo的),遗憾的是 百度蜘蛛频繁乱爬,导致GitHub对它采取了屏蔽。(参考:解决 Github Pages 禁止百度爬虫的方法与可行性分析)另外这篇文章末尾给出了一个解决该问题的可行方法,但是我个人没有试。 GitHub Page虽然支持自定义域名,但是对https支持的不好(这是一个次要的理由)。
之前博客一直以纯静态的方式托管在GitHub Page里面(是基于Hexo的),遗憾的是 百度蜘蛛频繁乱爬,导致GitHub对它采取了屏蔽。(参考:解决 Github Pages 禁止百度爬虫的方法与可行性分析)另外这篇文章末尾给出了一个解决该问题的可行方法,但是我个人没有试。 GitHub Page虽然支持自定义域名,但是对https支持的不好(这是一个次要的理由)。
加密是一个争论无止境的话题,服务器端数据保存加密,数据传输加密,等等。在这篇文章我就简单说说我这么多年来在服务器端保存密码的方法进化史。
由于长时间在自己coding中处理英文内容,导致今天发现自己在做的一单网站在给用户发新密码邮件的时候居然中文乱码。(原来我每天都说的中文在我写代码的时候被忽略了)
工作之前的时候,做任何web项目,我都会选择用PHP,简洁,快速,有时候很赞同PHP是世界上最好的语言,但是有些时候还是不如Java来的利索。可惜的是Java“不支持”热部署(至少在生产环境下不建议热部署), 导致每次部署都会有一段服务下线的时间(更糟糕的是用户的session也会随之丢失,最最糟糕的时候,每次部署,有时候还不得不重启一下Tomcat)。
I am implementing a RESTful server inside my company. The workflow is very straight-forward: request and response. However, nothing is easy, the RESTful service is based on an existed project, which handles database operations, and the entities inside that project is pretty complex(a lot of interfaces and abstract classes).
Recently, I am playing Gradle, which is a similar tool as Maven. What I usual do is to depoly webiste into Tomcat. Refer this Deploy Website into Tomcat 7 with Maven. Here is my note to deploy website with Gradle.
I have two servers in DigitalOcean, and both of them are Ubutun with tomcat 7. Recently, I found that if I want to restart tomcat, it will cost me more than 5 minutes(No errors during this). And the worest is(almots half an hour): 1INFO: Server startup in 1497026 ms
There are many ways to check whether a file is image. For example, check the file extension(jpg, png, gif …). But this is not so safe, in a web environment, user may rename XXX.exe, to XXX.jpg, then s/he can succeed to upload it. In this case, it can induce security problem.
It happens from one month ago after I changed my windows domain password(Damn windows forced me to do that). Then every time when I want to commit to server, I need to input my password(SVN won’t save it for me), what’s more, SVN always needs more than 3 minutes to connect with server at background.
DefinitionXSL stands for EXtensible Stylesheet Language, and is a style sheet language for XML documents. (XSL = Style Sheets for XML) XSLT stands for XSL Transformations. In this tutorial you will learn how to use XSLT to transform XML documents into other formats, like XHTML. You can try a online demo here: http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&xsltfile=cdcatalog
Sometime, when I failed to restart my tomcat7 server, and in the log, it returns error: **address already in use!**
As a newcomer, I find a lot of problems when I am using AngularJS. One problem is related to Ajax request. In jQuery, the server side can easy get the parameters, such as name: “John”. 1$.post( 'test.php', { name: 'John', time: '2pm' } );
This article is a brief introduction of how to use maven to deploy your website into tomcat7 [Ubuntu].