Skip to content

Instantly share code, notes, and snippets.

View pzzrudlf's full-sized avatar
💭
I may be slow to respond.

pzzrudlf pzzrudlf

💭
I may be slow to respond.
View GitHub Profile
export all_proxy='socks5://127.0.0.1:1080'
public function actionSignupForm()
{
$model = new SignupForm();
if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {
Yii::$app->response->format = Response::FORMAT_JSON;
return ActiveForm::validate($model);
}

昨天搞定了一个小网站的搭建,用了 node.js,另外为了能在一个 VPS 上搭建多个网站,用了 nginx 作为反向代理。

软件介绍

嗯,从维基上复制了一下~

node.js

Node.js是一个事件驱动I/O伺服端JavaScript环境,基于V8。目的是为了提供撰写可扩充网络程式,如web服务。第一个版本由Ryan Dahl于2009年释出,后来,Joyent雇用了Dahl,并协助发展Node.js。

http://blog.yunqi.li/archives/make-a-fake-ssl-cert-for-your-site.html
// 对Date的扩展,将 Date 转化为指定格式的String
// 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符,
// 年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字)
// 例子:
// (new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423
// (new Date()).Format("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9:4.18
Date.prototype.Format = function (fmt) { //author: meizz
var o = {
"M+": this.getMonth() + 1, //月份
"d+": this.getDate(), //日
1.install windows10
2.install centos7
3.edit /boot/grub2/grub.cfg
menuentry 'Windows 10'{
set root=(hd0,1)
chainloader +1
}
call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86_amd64
call "C:\Program Files (x86)\Intel\Composer XE 2013\bin\ifortvars.bat" intel64 vs2012
@echo off
"C:\SIMULIA\Abaqus\6.13-1\code\bin\abq6131.exe" %*
// by zhangxinxu welcome to visit my personal website http://www.zhangxinxu.com/
// 2010-03-12 v1.0.0
//十六进制颜色值域RGB格式颜色值之间的相互转换
//-------------------------------------
//十六进制颜色值的正则表达式
var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
/*RGB颜色转换为16进制*/
String.prototype.colorHex = function(){
var that = this;
sudo su
netstat -anp | grep 80
lsof -i :22
lsof -i tcp:22
hG8HmEZRw7te