This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server 初始化配置 及 VPN的搭建 | |
先给ubuntu用户设置密码 | |
sudo passwd ubuntu | |
更改ssh 允许用户名密码登录 | |
sudo vi /etc/ssh/sshd_config | |
PasswordAuthentication 改成 yes | |
重启ssh 服务 | |
sudo service ssh restart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
下载 free gate | |
下载wine | |
sudo apt-get install wine | |
如何解决UBUNTU下用WINE报 “CAN’T FIND MFC42.DLL….BALABALA”问题 | |
错误原因:老winpe程序使用了mfc相关动态链接库,而新版的wine中不含此库,win用户可以通过安装 Microsoft Visual C++ Redistributable Package获取相关库 | |
ubuntu下获取此库方法: | |
下载 winetricks: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.通用选择器 | |
* 所有元素 | |
E 标签选择器 div etc html tag | |
.info class选择器 or div.info | |
# id选择器 | |
2.组合选择器 | |
E,F 匹配多元素,同时匹配标签1与标签2 | |
E F 后代元素选择器 注意:这里可以是后代的后代 | |
E > F 子元素选择器 注意:这里只能是直系后代,后代的后代不起作用 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.mysql 默认不允许其他主机访问。 | |
修改配置。vi /etc/mysql/my.cnf | |
把bind-address = 127.0.0.1 or localhost 注掉 | |
service mysql restart or init.d/mysql restart | |
2.添加用户 | |
mysql 中的用户对应的表是 database:mysql,table:user | |
insert into mysql.user(Host,User,Password) values('localhost','phplamp',password('1234')); | |
host 代表可以访问的主机。如果允许所有主机访问则为% | |
2. 授权。例如,你想myuser使用mypassword从任何主机连接到mysql服务器的话。 | |
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'benjamin' WITH GRANT OPTION; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//中文支持 | |
sudo locale-gen zh_CN.UTF-8 | |
//修改时区 | |
sudo dpkg-reconfigure tzdata | |
//同步时间 | |
sudo ntpdate cn.pool.ntp.org | |
cn.pool.ntp.org是位于中国的公共NTP服务器 | |
----------------------------------------create a desktop icon on ubuntu--------------------------------------------------------------------- | |
[Desktop Entry] | |
Categories=Development; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
首先:安装用于加密的 travis工具 | |
sudo apt-get install ruby | |
sudo apt-get install ruby-dev | |
//安装完毕之后执行 | |
gem -v | |
截至到发帖日 14.4.29 最新版本为2.2.2 不是此版本的同鞋升级一下,以免不必要的隐患 | |
sudo gem install rubygems-update | |
sudo update_rubygems | |
gem -v 版本应该是2.2.2了 | |
sudo gem install travis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ }} 的问题 | |
在页面初始化的时候,用户可能会看到 {{ }},然后闪烁一下才出现真正的内容。 | |
解决办法: | |
使用 ng-cloak directive 来隐藏它 | |
使用 ng-bind 替代 {{ }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.compile:function(elment,attrs){ | |
//....执行scope与dom绑定之前的操作 | |
//ng-repeat为例 | |
//1.clone一个node | |
var node = element.children().clone(); | |
for(var i=0;i<repeaterCount-1;i++){ | |
element.append(node); | |
} | |
//end 到了这一步 所有的node对象都已插入dom元素 | |
//2.link 阶段 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* init | |
*/ | |
(function(bus){ | |
//var data = []; | |
var op1 = {}; | |
var total = 12; | |
var channel = 'realtime.search'; | |
var indexAction = { | |
'action':'index', |