目录
安装NodeJS
安装WebSocket-Node
安装NodeJS
参考这里:
curl -sL https://rpm.nodesource.com/setup | bash -
yum install -y nodejs
安装WebSocket-Node
参考这里:
npm install websocket
工具
forever是nodejs的守护进程,能够启动,停止,重启我们的app应用
forever start app.js
forever start -o console.log -e console.error app.js
forever restartall
forever stopall
forever list
遇到的问...
server {
listen 80;
server_name ws.repo;
location / {
proxy_pass http://127.0.0.1:3000/;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
或
upstream ws_server {
server 127.0.0.1:3000;
}
server {
listen 80;
server_name ws.repo;
location / {
...
更多安装方法见:https://downloads.mariadb.org/mariadb/repositories/#mirror=neusoft
步骤:
创建 /etc/yum.repos.d/MariaDB.repo 粘贴以下代码:
# MariaDB 10.1 CentOS repository list - created 2016-09-02 01:53 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB...
vsftpd在版本2.0.1开始,就支持ssl
查看 vsftpd 版本: vsftpd -v
步骤:
mkdir /etc/vsftpd/sslkey
cd /etc/vsftpd/sslkey
openssl req -new -x509 -nodes -out vsftpd.pem -keyout vsftpd.pem -days 3650
vi /etc/vsftpd/vsftpd.conf
# 添加:
ssl_enable=YES
ssl_tlsv1=YES
ssl_ciphers=HIGH
force_local_logins_ssl=NO
force_local_data_ssl=NO
allow_anon_ssl=YES
rsa_cert_file=/etc/vsftpd/sslkey/vsft...
CentOS7 的防火墙由 iptables 换成了 firewalld,
查看 firewalld 状态:systemctl status firewalld.service
关闭 firewalld:systemctl stop firewalld.service
配置文件:/etc/firewalld
允许 nginx:
systemctl start firewalld.service
firewall-cmd --add-service=http --permanent
firewall-cmd --add-service=https --permanent # http 里没有包含 https
firewall-cmd --add-port=8080/tcp --permanent #追加一个...
效果预览:
演示:点击这里查看效果
用法:
<!DOCTYPE html>
<html lang="en" ng-app="app">
<head>
<meta charset="UTF-8">
<title>imgshow</title>
<!-- 代码开始 1/2 -->
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet"...
app.controller("commonCtl", function ($scope, $uibModal) {
$scope.openDialog = function () {
var modalInstance = $uibModal.open({
templateUrl: 'dialog.html',
controller: 'formCtl',
windowClass: 'window',
size: 'lg',
resolve: {
data: function () {
return $scope.data;
}
}
});
modalInstance.result.then(
function (data) { // 关闭...
效果预览:
演示:点击这里查看效果
用法:
<!DOCTYPE html>
<html lang="en" ng-app="app">
<head>
<meta charset="UTF-8">
<title>approvalProgress</title>
<!-- 代码开始 1/2 -->
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/jquery.ap.css"...
问题描述:
之前文本文档都是用X盘里的 notepad2.exe 打开,后来因为X盘没了所以将 notepad2.exe 放到了M盘里,在更改 .txt、.css、.js、.php 文件的打开方式时,windows默认显示的一直是 X盘里的 notepad2.exe 通过“浏览”按钮选择M盘里的 notepad2.exe 无效,不能替换“选择默认程序”中原来的notepad.exe,也不能添加第二个 notepad2.exe
解决办法:
打开注册表,删除项 [HKEY_CLASSES_ROOT\Applications\Notepad2.exe] 及其下...
效果预览:
演示:点击这里查看效果
代码:
<script src="jquery.min.js"></script>
<link href="jquery.ap.css" rel="stylesheet" />
<script src="jquery.ap.js"></script>
<script>
$(function(){
$('.approvalProgress').ap({step:2});
});
</script>
<div class="approvalProgress">
<ol class=&...
打开网站时总会弹出一些烦人的对话窗口,比如商务通之类的,以下代码可以屏蔽之。
||goutong.baidu.com/*
||lxbjs.baidu.com/*
||combo.b.qq.com/*
||hm.baidu.com/*
||trust.baidu.com/*
||h.qiao.baidu.com/*
||p0.qiao.baidu.com/*
||bqq.gtimg.com/*
||live.zoosnet.net/*
||z12-cnzzcom-code-cnzzcomstat-htm.ccymf.com/*
||z11-cnzzcomstat-htm.ccymf.com/*
||wpa.b.qq.com/*
||s15.cnzz.com/*
||3g.isou....
源数据:
var data = '{
"1417":{"name":"张军玲","score":"90","second":"437"},
"1431":{"name":"苏海林","score":"70","second":"288"},
"6869":{"name":"尚迎涛","score":"50","second":"66&quo...