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
set shell = CreateObject("WScript.Shell") | |
shell.run"YourLotusPath\notes.exe" | |
WScript.Sleep 1000 | |
shell.run"YourLotusPath\notes.exe mailto:[email protected]?subject=Hello?attach=Result.txt" | |
WScript.Sleep 2000 | |
shell.SendKeys"{TAB}" | |
shell.SendKeys"{ENTER}" | |
shell.SendKeys"^(+{ENTER})" | |
WScript.Sleep 1000 | |
shell.SendKeys"{ENTER}" |
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
import sys | |
from pygerrit2 import GerritRestAPI, HTTPBasicAuth | |
import base64 | |
import json | |
from urllib2 import HTTPError | |
auth = HTTPBasicAuth('username','passwd') | |
rest = GerritRestAPI(url='http://gerrit.xxxxxx.com:8080', auth=auth) | |
class Gerrit: |
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
from lxml import html | |
from lxml import etree | |
import requests | |
taipei_district_dic = {1:[527,644], 2:[644,786], 3:[1214,1402], 4:[786,919], 5:[1001,1097], 6:[919,1001], | |
7:[1097,1214], 8:[1402,1564], 9:[455,527], 10:[305,455], 11:[142,305], 12:[1,142]} | |
print '==================== Vote for Same-Sex Marriage ====================' | |
for num in range(1,13): | |
url_head = 'http://referendum.2018.nat.gov.tw/pc/zh_TW/08/m6300000' |
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
FROM ubuntu:18.04 | |
# docker build -t firefox . | |
# docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix firefox | |
# install firefox | |
# -y: assume yes as answer | |
RUN apt-get update && apt-get install -y firefox | |
# add user |
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
/* | |
* BootstrapTableBuilder bsTable = new BootstrapTableBuilder(); | |
* bsTable.addTableHeader("Weight Table", 3, "Age", "Name", "Weight"); | |
* bsTable.addRowValues("26", "Corey", "75"); | |
* bsTable.addRowValues("25", "Daisy", "60"); | |
* bsTable.addRowValues("30", "Kevin", "100"); | |
* String table = bsTable.build(); | |
*/ | |
public class BootstrapTableBuilder { |
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
@ECHO off | |
for /f "tokens=1,2,3,4,5,6" %%a in ('adb devices -l') do ( | |
if "%%b" == "device" ( | |
ECHO Serial Number : %%a | |
for /f "tokens=2 delims=:" %%A in ( "%%f" ) do ( | |
ECHO Transport Id : %%A | |
start adb_by_transportid.bat %%A | |
) | |
) | |
) |
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
task checkCommand{ | |
doLast{ | |
def result = exec{ | |
def command = "command -v docker" | |
ignoreExitValue = true | |
executable "bash" args "-l", "-c", command | |
} | |
if(result.getExitValue()==0){ | |
println "Has Docker" | |
}else{ |
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 | |
# | |
# Program: | |
# This program will merge multiple sheets in an excel file. | |
import sys | |
import xlwt | |
from xlrd import open_workbook | |
def main(orig_args): |
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 ruby | |
=begin | |
Pass the serial number of device to this program, it will print the corresponding usb bus/port info. | |
Example: | |
$ adb devices | |
List of devices attached | |
56789AAAAAAAAAA device |
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
Key | Section | Default Vlue | |
---|---|---|---|
wim_file_path | default | D:\Sources\install.wim | |
image_name | default | Windows Server 2012 R2 SERVERSTANDARD | |
image_path | default | ${ENV:TEMP}\win-image.vhdx | |
virtual_disk_format | default | VHDX | |
image_type | default | HYPER-V | |
cpu_count | vm | 1 | |
ram_size | vm | 2147483648 | |
disk_size | vm | 42949672960 | |
external_switch | vm | external |
OlderNewer