This file contains 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
### Editing ### | |
`Ctrl + Space` 基本代码完成(任意类的,方法的或者变量的名称) | |
`Ctrl + Shift + Enter` 补全当前语句 | |
`Ctrl + P` Parameter info (within method call arguments) | |
`Ctrl + Q` 快速查找文档 | |
`Ctrl + 鼠标滑过` 简明信息查看 | |
`Ctrl + F1` 在插入符号处显示错误或者警告信息 | |
`Alt + Insert` 生成代码...(Getters,Setters,Constructors) | |
`Ctrl + O` 重写方法 | |
`Ctrl + I` 实现方法 |
This file contains 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
#!/bin/bash | |
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04 | |
# Inspired from https://gist.github.com/faleev/3435377 | |
# Remove any existing packages: | |
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev | |
# Get the dependencies (Ubuntu Server or headless users): | |
sudo apt-get update |
This file contains 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
# the following command will convert all the files to HTML which has the DOC extension. | |
find . -name "*.DOC" -type f -print0 |xargs -0 -I {} libreoffice --headless --convert-to html:HTML --outdir /home/nasir/output {} |
This file contains 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
<?php | |
/** | |
* ECSHOP 模版类 | |
* ============================================================================ | |
* * 版权所有 2005-2012 上海商派网络科技有限公司,并保留所有权利。 | |
* 网站地址: http://www.ecshop.com; | |
* ---------------------------------------------------------------------------- | |
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和 | |
* 使用;不允许对程序代码以任何形式任何目的的再发布。 |
This file contains 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
http://www.ruilog.com/blog/view/5267.html | |
团队用git 管理代码,公司则用svn, 需要定期将代码同步到svn归档 | |
1. 安装 git svn 插件 | |
apt-get install git-svn | |
2. 建立本地 git-svn 库 | |
本地代码目录为 /opt/src/search-git | |
为 git-svn 建立新目录 /opt/src/search-svn | |
cd /opt/src/ | |
git svn clone -s http://192.168.48.100/svn/resource/search search-svn |
This file contains 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
<?php | |
namespace Drupal\batch_example\Form; | |
use Drupal\Core\Form\FormBase; | |
use Drupal\Core\Form\FormStateInterface; | |
/** | |
* Class DeleteNodeForm. | |
* |
This file contains 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
来源: https://www.digitalocean.com/community/tutorials/how-to-install-git-on-centos-7 | |
Option One — Install Git with Yum | |
简单安装发现版本为1.8 但是git新版本到了2 | |
sudo yum install git | |
git --version | |
This file contains 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
#step1:加脚本 cut_nginx_log.sh,主进程把USR1信号发给worker,worker接到这个信号后,会重新打开日志文件 | |
#!/bin/bash | |
logs_path="/usr/local/nginx-1.6.0/logs" | |
log_name="access.log" | |
pid_path="/usr/local/nginx-1.6.0/logs/nginx.pid" |
This file contains 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
DDOS的全称是Distributed Denial of Service,即"分布式拒绝服务攻击",是指击者利用大量“肉鸡”对攻击目标发动大量的正常或非正常请求、耗尽目标主机资源或网络资源,从而使被攻击的主机不能为合法用户提供服务。 | |
DDOS攻击的本质是: | |
利用木桶原理,寻找利用系统应用的瓶颈;阻塞和耗尽;当前问题:用户的带宽小于攻击的规模,噪声访问带宽成为木桶的短板。 | |
可以参考下面的例子理解下DDOS攻击。 | |
1)某饭店可以容纳100人同时就餐,某日有个商家恶意竞争,雇佣了200人来这个饭店坐着不吃不喝,导致饭店满满当当无法正常营业。 | |
(DDOS攻击成功) | |
2)老板当即大怒,派人把不吃不喝影响正常营业的人全都轰了出去,且不再让他们进来捣乱,饭店恢复了正常营业。 | |
(添加规则和黑名单进行DDOS防御,防御成功) |
This file contains 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
链接: https://www.jianshu.com/p/bad33004bb4f | |
永久的开放需要的端口 | |
sudo firewall-cmd --zone=public --add-port=3000/tcp --permanent | |
sudo firewall-cmd --reload | |
之后检查新的防火墙规则 | |
firewall-cmd --list-all |
OlderNewer