Skip to content

Instantly share code, notes, and snippets.

View fub2's full-sized avatar

Bryan Fu fub2

View GitHub Profile
@fub2
fub2 / gist:7caa2c630e9c4887492554b3503db46d
Last active October 4, 2017 09:18
Docker hub mirror in China
# Example:
```
$ sudo echo "DOCKER_OPTS=\"--registry-mirror=http://hub-mirror.c.163.com\"" >> /etc/default/docker
$ service docker restart
```
Or another way with updating /usr/lib/systemd/system/docker.service with:
```
deb http://mirrors.aliyun.com/ubuntu/ xenial main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main multiverse restricted universe
@fub2
fub2 / gist:a0fc78157fb8f8e7dbba41a4503ced25
Created June 20, 2017 10:09
enable login with password in UEC ubuntu image
# Epitome
I want to have os image that can login with password.
download UEC image.
for example, this precise.
http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img
this image was forbidden to password login feature in terminal console.
it's reasonable for use of cloud image.
@fub2
fub2 / .vimrc
Created March 2, 2017 12:25 — forked from rocarvaj/.vimrc
Minimal .vimrc for C/C++ developers
" VIM Configuration File
" Description: Optimized for C/C++ development, but useful also for other things.
" Author: Gerhard Gappmeier
"
" set UTF-8 encoding
set enc=utf-8
set fenc=utf-8
set termencoding=utf-8
" disable vi compatibility (emulation of old bugs)