Giter VIP home page Giter VIP logo

midoks's Introduction

《记录我的代码片段》

Record my code snippet

我的相关地址

c10k && c10m

http://openresty.org/en/

http://dpdk.org/download

常用

sublime 分屏 切换快捷键
- ctrl+shift+2,3,4,5
- ctrl+tab

vim 分屏 切换快捷键
- vim -o3 f1 f2 f3
- sp file  	水平分屏
- vsp file   垂直分屏
- ctrl + w + w
- ctrl + w + h  左
- ctrl + w + l  右

sublime phpfmt 设置

{
	"version": 1,
	"enable_auto_align": true,//自动调整对齐
	"indent_with_space": true,//自动空格,tab不会出现
	"psr4": true,
	"php_bin":"~~/php.exe",//环境没有配置php时,需要添加此项,指向php.exe
}

安装插件Package Control
View -> Show Console(或者使用快捷键 command + ` )

https://packagecontrol.io/installation

php语法检车

find ./app/ -name "*.php" | xargs -n 1 /usr/local/product/php-5.5.18/bin/php -l

mac删除@权限

xattr -c *

设置服务器时区

echo "TZ='Asia/Beijing'; export TZ" >> /etc/profile; source /etc/profile

常用跟踪调试


find /data -type f -size +100M  -print0 | xargs -0 du -h | sort -nr

#*uix
top -p `pidof php-fpm | sed 's/[[:space:]]/,/g'`
#mac
top `pidof php-fpm | sed 's/\([0-9]* \)/-pid \1/g'`


yum install -y strace

# vim /root/.bashrc 	//*uix
source /root/.bashrc
function straceall {
echo "strace $(pidof "${1}" | sed 's/\([0-9]*\)/-p \1/g')"
strace $(pidof "${1}" | sed 's/\([0-9]*\)/-p \1/g')
}


brew install pidof
brew install dtruess
# vim ~/.bash_profile 	//mac
source /root/.bashrc
function straceall {
echo "sudo dtruss $(pidof "${1}" | sed 's/\([0-9]* \)/-p \1/g')"
sudo dtruss $(pidof "${1}" | sed 's/\([0-9]* \)/-p \1/g')
}

sed '/^ *#/d' **.conf > *.bak.conf

iptables

iptables -A INPUT -p tcp -s 218.247.181.51 -j ACCEPT

#删除规则
iptables -D INPUT 2 

midoks's People

Contributors

lifeiyu2 avatar midoks avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.