Author: | Baiju Muthukadan |
---|---|
Email: | baiju.m.mail AT gmail.com |
Version: | 0.4.0 |
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/sh | |
#kill firefox pid | |
pidlist=`ps -ef|grep firefox | grep -v "grep"|awk '{print $2}'` | |
#ps -u $USER|grep "java"|grep -v "grep" | |
echo "firefox Id list :$pidlist" | |
if [ "$pidlist" = "" ] | |
then | |
echo "no firefox pid alive" | |
else | |
for pid in ${pidlist} |
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
#登陆豆瓣 | |
#基于协议利用Curl测试页面 | |
#change EMAIL and PASSWORD | |
curl --user-agent "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" –L -c cookie -d 'form_email=EMAIL&form_password=PASSWORD&user_login=登录' https://www.douban.com/accounts/login >login.html | |
#获取我的豆瓣的页面 | |
curl -L -b cookie http://www.douban.com/mine >my.html | |
#获取某人的友邻列表 | |
curl -L -b cookie http://www.douban.com/contacts/listfriends | |
#利用其他的东西,获得所有的友邻 #给这个友邻发个豆邮问候一下 cul -d ‘......' http://www.douban.com/ |
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
Attribute VB_Name = "split_by_date" | |
Function split_by_date(start_date) | |
' | |
' For My Darling Lotusblue :) | |
Sheets(1).Select | |
Cells.Select | |
Selection.AutoFilter |
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
Public BlockMatchRow(100, 100) As Integer | |
Public WhoMax(100, 100) As Integer | |
Public cell_index(2) As Integer | |
Sub Run() | |
sheets_number = 3 | |
tv_number = 5 'counter | |
start_sheet = 2 | |
SetArray sheets_number, start_sheet, tv_number |
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
Dim s_number As Integer | |
Sub main() | |
s_number = Sheets.Count | |
ad_counter "宝马汽车" | |
ad_counter "节目预告(宝马汽车)" | |
End Sub |
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
$ head -1000 /etc/conf.d/xvfb* /etc/init.d/{xvfb,selenium-daemon} | |
==> /etc/conf.d/xvfb <== | |
XVFB=/usr/bin/Xvfb | |
XVFBARGS=":90 -auth /etc/conf.d/xvfb.cfg -nolisten tcp" | |
PIDFILE=/var/run/xvfb.pid | |
==> /etc/conf.d/xvfb.cfg <== | |
localhost | |
==> /etc/init.d/xvfb <== |
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
find . -name "*.pyc" -exec rm -rf {} \; |
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
>>>hub machine (ip=192.168.1.208)<<< | |
# /etc/init.d/selenium-grid-hub | |
#!/sbin/runscript | |
# Copyright 1999-2011 Gentoo Foundation | |
# Distributed under the terms of the GNU General Public License v2 | |
# $Header: $ | |
PIDFILE=/var/run/selenium-hub.pid | |
DISPLAY=:90 | |
#JAVA=/usr/lib/jvm/icedtea6-bin/bin/java | |
JAVA=/usr/lib/jvm/sun-jdk-1.6/bin/java |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import time, os, string | |
from selenium import webdriver | |
def downloader(link, host='http://shimory.com/'): | |
file = open('/Users/jollychang/Downloads/firebug-1.7.3.xpi') | |
fp = webdriver.FirefoxProfile() | |
fp.add_extension(file) | |
b = webdriver.Firefox(fp) |
OlderNewer