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/local/services/python/bin/python | |
# -*- coding: utf-8 -*- | |
import MySQLdb | |
import MySQLdb.cursors | |
class DB: | |
def __init__(self): | |
self.con = MySQLdb.connect(host=DBHOST,port=DBPORT,user=DBUSER,passwd=DBPASSWD,db=DB) | |
self.cur = self.con.cursor(MySQLdb.cursors.DictCursor) |
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
/* | |
_ooOoo_ | |
o8888888o | |
88" . "88 | |
(| -_- |) | |
O\ = /O | |
____/`---'\____ | |
.' \\| |// `. | |
/ \\||| : |||// \ | |
/ _||||| -:- |||||- \ |
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/expect -f | |
#自动登录服务器 | |
set ip [lindex $argv 0] | |
set password "this is password" | |
set timeout 10 | |
spawn ssh root@$ip | |
expect { | |
"*yes/no" { send "yes\r"; exp_continue} | |
"*assword:" { send "$password\r" } |
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
package com.utils; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.ObjectInputStream; | |
import java.io.ObjectOutputStream; | |
import java.security.*; | |
import javax.crypto.Cipher; | |
import javax.crypto.KeyGenerator; |
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
/** | |
* jQuery SHA1 hash algorithm function | |
* | |
* <code> | |
* Calculate the sha1 hash of a String | |
* String $.sha1 ( String str ) | |
* </code> | |
* | |
* Calculates the sha1 hash of str using the US Secure Hash Algorithm 1. | |
* SHA-1 the Secure Hash Algorithm (SHA) was developed by NIST and is specified in the Secure Hash Standard (SHS, FIPS 180). |
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 -*- | |
import urllib2 | |
from pyquery import PyQuery as pyq | |
import MySQLdb | |
''' | |
def download(): | |
content = urllib2.urlopen('http://www.daoiqi.com/iptv6.html').read() | |
print content |
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
<?php | |
/* PHP SDK | |
* @version 2.0.0 | |
* @author [email protected] | |
* @copyright © 2013, Tencent Corporation. All rights reserved. | |
* @modify_author daoiqi | |
* @modify_date 20140416 | |
*/ | |
class QQ_Oauth{ |