Skip to content

Instantly share code, notes, and snippets.

View jollychang's full-sized avatar
🎼
Focusing

William Zhang jollychang

🎼
Focusing
View GitHub Profile
# This script adds a "Webclip" shortcut to your homescreen.
# The shortcut can be used to open a web page in full-screen mode,
# or to launch a custom URL (e.g. a third-party app).
# You'll be asked for a title, a URL, and an icon (from your camera roll)
import plistlib
import BaseHTTPServer
import webbrowser
import uuid
from io import BytesIO
nbproject
@jollychang
jollychang / install.sh
Created August 22, 2014 06:14
install and launch apk by adb
mvn clean package
adb uninstall com.douban.shuo
adb install app/target/*mvn.apk
adb shell am start -n com.douban.shuo/.app.WelcomeActivity
@jollychang
jollychang / echo_robot_testcase_name.py
Created August 22, 2014 06:15
echo robotframework testcase name
from robot.parsing import TestCaseFile
def print_tag_is_core():
suite = TestCaseFile(source='./test_base.txt').populate()
for test in suite.testcase_table:
if 'core' in test.tags.value:
print test.name
#!/usr/bin/env bash
#
# Copyright (c) 2013 Jonathan Penn (http://cocoamanifest.net)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@jollychang
jollychang / appium_highlife.py
Created September 4, 2014 06:51
appium for highlife android script
#!/usr/bin/env python
# coding: utf-8
import os
from time import sleep
from selenium import webdriver
# Returns abs path relative to this file and not cwd
PATH = lambda p: os.path.abspath(os.path.join(os.path.dirname(__file__), p))
for i in $(printf '%03d\n' {500..1000})
do
url="http://qaci.intra.douban.com/job/peteris-opening-pull-request-scanner/5$i/consoleText"
if curl -s $url| grep -q "FAILURE"; then
echo $url
curl -s $url | grep "for PR"
fi
done

模板


标题

设备信息: 型号、系统版本

软件信息: 版本号

前提条件:

@jollychang
jollychang / Jenkins email macro.html
Created September 4, 2014 06:58
Jenkins email macro.html
<style type="">
/**
* GitHub theme
*
* @author Craig Campbell
* @version 1.0.4
*/
pre {
border: 1px solid #ccc;
word-wrap: break-word;
@jollychang
jollychang / lastp.sh
Created September 4, 2014 06:58
lastp.sh
lastp() {
filename=`find ~/Desktop/ScreenShots/ -type f -exec stat -f "%m %N" {} \; | sort -n | tail -1 | cut -f2- -d" "`
url=`curl -s -F file=@"$filename" http://p.dapps.douban.com/`
echo $url
}