Skip to content

Instantly share code, notes, and snippets.

View aisuhua's full-sized avatar
:octocat:
Flying

aisuhua aisuhua

:octocat:
Flying
  • 黑暗帝国
  • 广东深圳
View GitHub Profile
@aisuhua
aisuhua / PhpStorm Keymap
Created June 19, 2016 09:05 — forked from niweea/PhpStorm Keymap
PhpStorm快捷键
### 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` 实现方法
#!/usr/bin/env php
<?php
if (count($argv) == 1) {
throw new InvalidArgumentException('Missing tables');
}
$tables = array_slice($argv, 1);
$db = new PDO('mysql:dbname=uniqueway_development;host=127.0.0.1;charset=utf8mb4', 'root', '');
@aisuhua
aisuhua / README.md
Created June 10, 2017 02:59 — forked from nichtich/README.md
How to automatically deploy from GitHub

Deploy your site with git

This gist assumes:

  • you have an online remote repository (github / bitbucket etc.)
  • you have a local git repo
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by Apache
  • the Apache user is named www-data (may be apache on other systems)
@aisuhua
aisuhua / mysql.sql
Last active December 24, 2019 00:47
# Run a new instance
# https://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization.html
#
mysqld --initialize-insecure --user=mysql --datadir=/mnt/mysql/data
mysqld_safe --defaults-file=/etc/mysql/my-3307.conf &
mysql -h 127.0.0.1 -P 3307 -u root -p
# Shutdown the instance
mysqladmin -h 127.0.0.1 -P 3307 -u root -p123456 shutdown
find -size +5M -exec ls -lh {} \;
@aisuhua
aisuhua / install.sh
Created September 21, 2019 01:30 — forked from chuyik/install.sh
Bandwagon(搬瓦工) CentOS 7 安装 shadowsocks-libev 和 kcptun
######################
## shadowsocks-libev
######################
# install dependencies
yum install epel-release -y
yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto udns-devel libev-devel -y
# install shadowsocks-libev
cd /etc/yum.repos.d/
# Install AUR
wget "https://aur.archlinux.org/cgit/aur.git/snapshot/php-phalcon.tar.gz"
tar -zxvf php-phalcon.tar.gz
cd php-phalcon
makepkg
pacman -U php-phalcon-3.4.2-1-x86_64.pkg.tar.xz
```
alias -p
alias 别名='原命令 -选项/参数'
unalias 别名
```
@aisuhua
aisuhua / git.md
Last active October 23, 2019 11:42

初始化

git config --global user.name "John Doe"
git config --global user.email johndoe@example.com

代理

安装

安装

apt-get -y install apt-transport-https ca-certificates curl software-properties-common
curl -f sSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg| sudo apt-key add -
add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
apt-get -y update
apt-get -y install docker-ce