Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
fish touching

青鸟 blue-bird1

🏠
fish touching
View GitHub Profile
@blue-bird1
blue-bird1 / install.sh
Last active Oct 9, 2018
debian docker install #debian #docker
View install.sh
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
lsb-release \
software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo add-apt-repository \
@blue-bird1
blue-bird1 / install.sh
Last active Oct 9, 2018
composer install #debian
View install.sh
sudo apt-get install curl php5-cli git
php -r "copy('https://getcomposer.org/installer', '/tmp/composer-setup.php');"
sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
@blue-bird1
blue-bird1 / install.sh
Last active Oct 10, 2018
ngork install #debian
View install.sh
cd ~
git clone https://github.com/inconshreveable/ngrok.git
export GOPATH=~/ngrok/
cd ngrok
$NGROK_DOMAIN = “fake.com”
openssl genrsa -out rootCA.key 2048
openssl req -x509 -new -nodes -key rootCA.key -subj "/CN=$NGROK_DOMAIN" -days 5000 -out rootCA.pem
openssl genrsa -out server.key 2048
openssl req -new -key server.key -subj "/CN=$NGROK_DOMAIN" -out server.csr
openssl x509 -req -in server.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out server.crt -days 5000
View docker-compose.yml
version: '3'
services:
miniflux:
image: miniflux/miniflux:latest
ports:
- "80:8080"
depends_on:
- db
environment:
- DATABASE_URL=postgres://miniflux:secret@db/miniflux?sslmode=disable
@blue-bird1
blue-bird1 / docker-compost.yml
Last active Oct 10, 2018
docker php mysql #docker
View docker-compost.yml
version: '3'
services:
db:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: my_secret_pw_shh
MYSQL_DATABASE: test_db
MYSQL_USER: devuser
MYSQL_PASSWORD: devpass
@blue-bird1
blue-bird1 / install.sh
Last active Oct 9, 2018
debian node and yarn install #debian
View install.sh
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
@blue-bird1
blue-bird1 / .vimrc
Last active Oct 9, 2018
install Vundle #vim
View .vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
@blue-bird1
blue-bird1 / install.sh
Last active Oct 9, 2018
YouCompleteMe install #vim
View install.sh
git clone https://github.com/Valloric/YouCompleteMe ~/.vim/bundle/YouCompleteMe
sudo apt install build-essential cmake python3-dev
cd ~/.vim/bundle/YouCompleteMe
python3 install.py --clang-completer
# The following additional language support options are available:
# C# support: install Mono and add --cs-completer when calling install.py.
# Go support: install Go and add --go-completer when calling install.py.
# JavaScript and TypeScript support: install Node.js and npm then install the TypeScript SDK with npm install -g typescript.
# Rust support: install Rust and add --rust-completer when calling install.py.
# Java support: install JDK8 (version 8 required) and add --java-completer when calling install.py
@blue-bird1
blue-bird1 / readme.md
Last active Oct 9, 2018
docker file write #docker
View readme.md

FROM指令和MAINTAINER指令

脚本的第1行是FROM指令。通过FROM指令,docker编译程序能够知道在哪个基础镜像执行来进行编译。所有的Dockerfile都必须以FROM指令开始。第二条指令MAINTAINER,用来标明这个镜像的维护者信息。

RUN指令

@blue-bird1
blue-bird1 / install.sh
Last active Oct 9, 2018
vim 编译 #vim
View install.sh
git clone https://github.com/vim/vim.git
cd vim
./configure --with-features=huge --enable-python3interp --enable-pythoninterp --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu/ --enable-rubyinterp --enable-luainterp --enable-perlinterp --with-python3-config-dir=/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/ --enable-multibyte --enable-cscope --prefix=/usr/local/vim/
make install