sudo apt-get install software-properties-common -y
sudo add-apt-repository ppa:max-c-lv/shadowsocks-libev -y
sudo apt-get update
sudo apt install shadowsocks-libev
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
#!/bin/bash | |
echo " = = = = = back up start @ `date` = = = = = " | |
BACKUP_DIR="/opt/data/backup" | |
DUMP_CMD="/usr/bin/mysqldump" | |
HOST="127.0.0.1" | |
PORT="3306" | |
USER="root" | |
PASSWORD="123456" | |
cd $BACKUP_DIR | |
TIMESTAMP=`date +%F-%H%M` |
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
#coding:utf-8 | |
from gevent import monkey | |
monkey.patch_all() | |
import logging | |
import gevent | |
import datetime | |
logging.basicConfig(level=logging.DEBUG) | |
LOGGER = logging.getLogger("GeventCelery") |
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
#!/bin/bash | |
default_user="vpn" | |
default_password="123456" | |
read -p "Input VPN username:(default is ${default_user})" user | |
read -p "Input VPN password:(default is ${default_password})" password | |
if [ $user=="" ];then | |
user=$default_user |
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
# corelib.mixin.comment | |
# -*- coding: UTF-8 -*- | |
from datetime import datetime | |
from MySQLdb import IntegrityError, OperationalError | |
from corelib.config import DOUBAN | |
from corelib.sqlstore import store | |
from corelib.mc import mc, cache, pcache | |
from corelib.accounts.public import Account |