This file contains hidden or 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
| server { | |
| listen 80 default_server; | |
| server_name readydedis.com www.readydedis.com; | |
| return 301 https://readydedis.com$request_uri; | |
| } | |
| # HTTPS server | |
| # | |
| server { | |
| listen 443; |
This file contains hidden or 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
| #!/usr/bin/env python | |
| #-*-coding:utf-8 -*- | |
| # | |
| #Author: tony - birdaccp at gmail.com | |
| #Create by:2015-01-06 16:31:10 | |
| #Last modified:2015-01-06 16:50:27 | |
| #Filename:app.py | |
| #Description: | |
This file contains hidden or 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
| #!/usr/bin/env python | |
| #-*-coding:utf-8 -*- | |
| # | |
| #Author: tony - birdaccp at gmail.com | |
| #Create by:2017-06-19 10:28:40 | |
| #Last modified:2017-06-23 11:30:07 | |
| #Filename:demo1.py | |
| #Description: | |
| from aiomysql.sa import create_engine |
This file contains hidden or 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
| If your system uses `AccountsService`, you *can not* hide a user from the greeter screen by reconfiguring `lightdm` | |
| because it defers to `AccountsService`. That is stated very clearly in the comments in `/etc/lightdm/users.conf`. | |
| What you need to do instead is to reconfigure `AccountsService`. | |
| To hide a user named `XXX`, create a file named | |
| `/var/lib/AccountsService/users/XXX` | |
| containing two lines: |
This file contains hidden or 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
| sudo add-apt-repository ppa:nm-l2tp/network-manager-l2tp | |
| sudo apt update | |
| sudo apt install network-manager-l2tp |
This file contains hidden or 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
| vim --version | grep python | |
| sudo apt-add-repository ppa:pi-rho/dev | |
| sudo apt-get update | |
| sudo apt-get install vim | |
| sudo pip3 install jedi |
This file contains hidden or 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
| 1.docker中安装gitlab | |
| 1.1 下载镜像 | |
| docker pull sameersbn/gitlab:7.11.2 # 下载gitlab镜像 | |
| docker pull sameersbn/mysql:latest # 下载gitlab所用到的mysql镜像 | |
| docker pull sameersbn/redis:latest # 下载gitlab所用到的redis镜像 | |
| 1.2 启动redis | |
| docker run --name=gitlab_redis -tid sameersbn/redis:latest | |
| 1.3 启动mysql | |
| 1.3.1 在宿主机上创建目录 mkdir -p /opt/mysql/data #之后所有的mysql数据库文件都存放在此 | |
| 1.3.2 启动mysql |
This file contains hidden or 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
| xrdp安装配置方法 | |
| 打开终端:依次安装 | |
| sudo apt-get install xrdp | |
| sudo apt-get install vnc4server tightvncserver | |
| 设置xrdp | |
| echo "gnome-session --session=gnome-classic" > ~/.xsession | |
| 该命令的作用是由于安装了 gnome桌面,ubuntu12.04中同时存在unity、GNOME多个桌面管理器,需要启动的时候指定一个,不然即使远程登录验证成功以后,也只是背景。 | |
| xrdp的配置文档在/etc/xrdp目录下的xrdp.ini和sesman.in,一般选择默认。 | |
| 重启 xrdp | |
| sudo /etc/init.d/xrdp restart |
This file contains hidden or 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
| sudo apt-get install libmtp-common mtp-tools libmtp-dev libmtp-runtime libmtp9 | |
| sudo vim /etc/fuse.conf | |
| 将user_allow_other选项开启 | |
| lsusb查看设备型号 | |
| Bus 002 Device 003: ID 0fce:01b1 Sony Ericsson Mobile Communications AB | |
| sudo vim /lib/udev/rules.d/69-mtp.rules | |
| add this code: | |
| ATTR{idVendor}=="0fce", ATTR{idProduct}=="01b1", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" |
This file contains hidden or 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
| 在~/.bashrc最后面增加如下 | |
| function git_branch { | |
| branch="`git branch 2>/dev/null | grep "^\*" | sed -e "s/^\*\ //"`" | |
| if [ "${branch}" != "" ];then | |
| if [ "${branch}" = "(no branch)" ];then | |
| branch="(`git rev-parse --short HEAD`...)" | |
| fi | |
| echo "($branch)" | |
| fi |
NewerOlder