Use the lines below to replace /etc/apt/source.list
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
## Problem | |
When login in, the shell prints: | |
``` | |
manpath: can't set the locale; make sure $LC_* and $LANG are correct | |
``` | |
## Solution | |
``` | |
sudo locale-gen "en_US.UTF-8" | |
sudo dpkg-reconfigure locales |
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
## Problem | |
``` | |
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? | |
``` | |
## Reasons | |
There are several graphdrivers available and Docker daemon cannot decide which one to choose. | |
You can find the reported problems in `/var/log/upstart/docker.log` | |
## Solution |
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
# Create a specified network bridge | |
``` | |
docker network create -o "com.docker.network.bridge.name"="docker1" --subnet 172.20.0.0/24 docker1 | |
``` | |
# Run a container | |
``` | |
docker run -d --rm --ip 172.20.0.50 --net docker1 --name friendly-container rastasheep/ubuntu-sshd:14.04 | |
``` |
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
#Create a new user and related home directory | |
``` | |
sudo useradd -d /home/$username -m $username | |
``` | |
#Set the passwd | |
``` | |
sudo passwd $username | |
``` |
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
Refer to "https://yeasy.gitbooks.io/docker_practice/content/image/commit.html" | |
``` | |
docker commit \ | |
--author "Tao Wang <[email protected]>" \ | |
--message "修改了默认网页" \ | |
webserver \ | |
nginx:v2 | |
``` |
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
# Error | |
NSS_VersionCheck("3.26") failed. NSS >= 3.26 is required | |
# Solution | |
``` | |
sudo apt-get install libnss3 | |
``` |
Refer to https://www.jianshu.com/p/cee2de32ca28
Modify the ~/.config/terminator/config
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
sshfs -p 22 -o auto_cache,reconnect,default_permissions seafooler@cent-dock-01:/home/seafooler /home/seafooler/mnt-cent-dock-01 |
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
import urllib.request,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by) |
OlderNewer