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
| # -*- coding:utf8 -*- | |
| __author__ = 'newbie0086#foxmail.com' | |
| import Queue | |
| import threading | |
| from ftplib import FTP | |
| import os,sys,string,datetime,time | |
| import socket | |
| class MyFtp: | |
| def __init__(self,host,username,password,port=21): | |
| self.host=host |
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
| queue = Queue.Queue() | |
| out_queue = Queue.Queue() | |
| class ThreadUrl(threading.Thread): | |
| """Threaded Url Grab""" | |
| def __init__(self, queue, out_queue): | |
| threading.Thread.__init__(self) | |
| self.queue = queue | |
| self.out_queue = out_queue |
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
| # -*- coding:utf8 -*- | |
| import urllib | |
| import curl | |
| import pycurl | |
| import StringIO | |
| def initCurl(): | |
| c=pycurl.Curl() | |
| c.setopt(pycurl.FOLLOWLOCATION,0) |
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
| chksectorcount() { | |
| local -a drives=(/dev/sd*) | |
| # Iterate through array to remove partitions i.e /dev/sda1 and so on | |
| ((n_elements=${#drives[@]}, max_index=n_elements - 1)) | |
| for ((i = 0; i <= max_index; i++)); do | |
| if [[ $(echo ${drives[i]} | grep -v '[0-9]') ]]; then | |
| smartctl -a ${drives[i]} | grep "Sector Sizes:"|sed "s:^:${drives[i]} :" | |
| else |
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
| api = 2 | |
| core = 7.x | |
| projects[drupal][type] = core | |
| projects[drupal][download][type] = git | |
| projects[drupal][download][branch] = 7.x | |
| projects[drupal][download][url] = http://git.drupal.org/project/drupal.git |
NewerOlder