Skip to content

Instantly share code, notes, and snippets.

@JohnnyChiang
JohnnyChiang / Jenkinsfile
Last active March 20, 2023 20:48
Extract parameters from a jenkins previous build (Declarative pipeline example)
#!groovy
pipeline {
agent any
parameters {
string(name: 'CAUSE', defaultValue: 'anonymous', description: 'Build Cause')
}
stages {
stage('Test Previous Build Status') {
steps {
@JohnnyChiang
JohnnyChiang / get_activate_win.py
Created November 28, 2014 07:14
pyautoit basic usage
import pyautoit
s = autoit.win_get_title("[ACTIVE]")
autoit.control_click(s, "Button2")
@JohnnyChiang
JohnnyChiang / kill_processes.py
Last active November 1, 2019 09:53
windows console killing processes command
import os
#make sure every chromedriver.exe is closed
with os.popen('tasklist') as task_list_file:
task_list_str = task_list_file.read()
flag = task_list_str.find("chromedriver.exe")
if flag != -1:
os.system("taskkill /F /IM chromedriver.exe")