@@ -0,0 +1,1322 @@
+from fabric.api import * %0Aenv.use_ssh_config = True%0A#env.hosts = %5B'sushi', 'polo', 'noodle'%5D%0Adef localhost():%0A    #env.use_ssh_config = False%0A    global run %0A    run = local%0A%0Adef send(file):%0A    put(file, '~/')%0A%0Adef recv(file):%0A    get(file, './')%0A%0Adef airbb():%0A    env.hosts = %5B'airbb', %5D%0A%0Adef pull():%0A    with cd('~/airbb/'):%0A        run('git pull')%0A%0Adef restart():%0A    with cd('~/airbb/'):%0A        run('supervisorctl restart airbb')%0A%0Adef update_db():%0A    with cd('~/flask/examples/minitwit/'):%0A        run('openssl enc -des -d -a -in airbb_db_enc -out airbb.db')%0A%0Adef init_db():%0A    with cd('~/airbb/'):%0A        run(%22python -c 'from models.model_test import *;init_db()'%22)%0A%0Adef free():%0A    run('free -mh')%0A%0Adef net():%0A    run('vnstat')%0A    run('vnstat -h')%0A    run('vnstat -d')%0A    run('vnstat -w')%0A    run('vnstat -m')%0A%0Adef fd():%0A    run('cat /proc/sys/fs/file-nr')%0A%0Adef dns(url):%0A    dns_server = %5B'', #local%0A                  '8.8.8.8', #Google%0A                  '8.8.4.4', #Google%0A                  '114.114.114.114', #ChinaTele%0A                  '4.2.2.2', #Legend%0A                  '208.67.222.222', #OpenDNS%0A                  '180.76.76.76', #Baidu%0A                  '223.5.5.5', #Ali%0A                  '223.6.6.6', #Ali%0A                  %5D%0A    for dns in dns_server:%0A        run('nslookup %25s %25s' %25 (url, dns))%0A%0A

add fab