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注释规范 | |
##通用注释写法 | |
###一、文件的注释通用样例(普通程序文件,类文件,函数文件,变量定义文件) | |
``` | |
/** | |
* XXXXX的文件 | |
* |
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
#!/usr/bin/env bash | |
mkdir /etc/nginx/ssl 2>/dev/null | |
openssl genrsa -out "/etc/nginx/ssl/$1.key" 1024 2>/dev/null | |
openssl req -new -key /etc/nginx/ssl/$1.key -out /etc/nginx/ssl/$1.csr -subj "/CN=$1/O=Vagrant/C=UK" 2>/dev/null | |
openssl x509 -req -days 365 -in /etc/nginx/ssl/$1.csr -signkey /etc/nginx/ssl/$1.key -out /etc/nginx/ssl/$1.crt 2>/dev/null | |
block="server { | |
listen ${3:-80}; | |
listen ${4:-443} ssl; |
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
aa |
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
alt+alt: 连续两次快速按下alt键不放,显示tool windows(project,database ...) | |
alt+F7: 查找选定变量,方法被调用的地方。选中一个方法或者变量,查找出所有调用的地方 | |
alt+F3: 显示搜索窗格,对当前文件进行搜索,然后配合ctrl+alt+r,可以进行替换操作 | |
alt+F1: 快速打开当前编辑文件在其他tool windows里,这个很好用的键盘 | |
alt+方向键: 左右在打开的编辑器标签间切换,上下在打开的文件中的方法里上下切换 | |
alt+shift+c: 浏览最近的修改历史 | |
ctrl+`: 选择主题,不常用 | |
ctrl+F12: 弹出一个对话框,显示当前文件里的所有方法,变量,直接输入方法变量名,回车即可跳转到定义位置 | |
ctrl+k: 快速调用 commit changes 对话框 |
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 | |
/** | |
* @param string $string 原文或者密文 | |
* @param string $operation 操作(ENCODE | DECODE), 默认为 DECODE | |
* @param string $key 密钥 | |
* @param int $expiry 密文有效期, 加密时候有效, 单位 秒,0 为永久有效 | |
* @return string 处理后的 原文或者 经过 base64_encode 处理后的密文 | |
* | |
**/ | |
function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0) { |