- One commit one small feature or bug fix
- Include unit test in one commit
- Exclude non-associated files
- Don't commit un-finished or wrong code
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
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 |
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 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)) |
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 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: |
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
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 |
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
mvn clean package | |
adb uninstall com.douban.shuo | |
adb install app/target/*mvn.apk | |
adb shell am start -n com.douban.shuo/.app.WelcomeActivity |
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
nbproject |
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
# 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 |
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
# encoding: UTF-8 | |
namespace :simulator do | |
desc "Call 'Reset Content and Settings' in iOS Simulator menu" | |
task :reset do | |
%x{ | |
osascript <<-END | |
tell application "iPhone Simulator" to activate | |
tell application "System Events" | |
tell process "iPhone Simulator" |
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
import requests | |
url = 'http://www.quandl.com/api/v1/datasets/OFDP/MOLYBDENUM_56' | |
r = requests.get(url) | |
data = r.json().get('data') | |
print data | |
if data[0][-1] > data[1][-1]: | |
print 'price is rise' |