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 / php.md
Last active November 16, 2019 01:34

Composer

wget https://github.com/composer/composer/releases/download/1.8.0/composer.phar
mv composer.phar /usr/local/bin/composer
chmod 755 /usr/local/bin/composer

composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
composer config -g repo.packagist composer https://packagist.phpcomposer.com

防止 ssh 自动断开

# /etc/ssh/ssh_config
ServerAliveInterval 60

# /etc/ssh/sshd_config
ClientAliveInterval 60
systemctl restart ssh

安装

curl -L https://get.daocloud.io/docker/compose/releases/download/1.24.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

使用

启动应用

使用代理

FROM python:3.4-alpine

ENV HTTP_PROXY "http://192.168.1.2:1080"
ENV HTTPS_PROXY "http://192.168.1.2:1080"
ENV FTP_PROXY "http://192.168.1.2:1080"
ENV NO_PROXY ".aliyuncs.com,*.aliyuncs.com"
@aisuhua
aisuhua / ubuntu.md
Last active October 23, 2019 06:22

vim

# /etc/vim/vimrc.local
set tabstop=4

alias

MariaDB10 开启远程登录功能

cd /volume1/@appstore/MariaDB10/usr/local/mariadb10/bin
./mysql -u root -p
use mysql
select host,user from user;
FLUSH PRIVILEGES;
```
apt-get install python3
apt-get install python3-pip
pip install pip -U
# ~/.config/pip/pip.conf
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = mirrors.aliyun.com
@aisuhua
aisuhua / laravel.md
Last active November 24, 2019 02:26

Nginx Config

server {
    listen 80;
    server_name blog.demo.com;

    root /www/web/blog/public;
    index index.html index.htm index.php;