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 | |
| import ctypes | |
| user32 = ctypes.windll.user32 | |
| def getClassName(hwnd): | |
| resultString = ctypes.create_string_buffer("\000" * 32) | |
| user32.GetClassNameA(hwnd, resultString, len(resultString)) | |
| return resultString.value |
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
| # console.log() | |
| # for jscript coffee.bat | |
| # https://github.com/thinca/coffee-script-on-jscript | |
| if (typeof console == "undefined") | |
| console = new class | |
| log: (message) -> | |
| WScript.Echo(message) |
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
| <?xml version="1.0" encoding="Shift_JIS" standalone="yes" ?> | |
| <package> | |
| <job id="Hoge"> | |
| <script language="JScript" src="./coffee-script.js"></script> | |
| <script language="jscript"> | |
| <![CDATA[ | |
| input = "./script.coffee" | |
| var rs = new ActiveXObject("ADODB.Stream"); | |
| rs.Type = 2; // adTypeText |
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
| $ cat > content.py | |
| # -*- coding: utf-8 -*- | |
| # 日本語 | |
| # あめんぼあかいなあいうえお | |
| def hello(): | |
| print "hello world!" | |
| if __name__ == "__main__": | |
| hello() | |
| ^D |
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
| curl.exe -d '{"private_token":"qp6szjqmk8bTyMBrnJo5","title":"test1","file_name":"content1.py","code":"hogehoge\nhoge"}' http://demo.gitlabhq.com/api/v2/projects/rubinius/snippets |
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
| # -*- coding: cp932 -*- | |
| import mechanize as mc | |
| import time | |
| import sgmllib | |
| import re | |
| class Stripper(sgmllib.SGMLParser): | |
| def __init__(self): | |
| sgmllib.SGMLParser.__init__(self) |
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
| username = "username" | |
| password = "password" | |
| from selenium import webdriver | |
| driver = webdriver.Ie("c:/path/to/IEDriverServer.exe") | |
| #driver.window_handles | |
| driver.get("https://websearch.rakuten.co.jp/login.html?tool_id=1") | |
| driver.find_element_by_name("u").send_keys(username) | |
| driver.find_element_by_name("p").send_keys(password) |
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
| #-*- coding: utf-8 -*- | |
| filename = "c:/TEMP/gihyosd_2001-2012_index.html" | |
| from StringIO import StringIO | |
| import gzip | |
| import BeautifulSoup as BS | |
| import urllib2 | |
| # workaround for beautifulsoup bug. | |
| # info: |
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
| rem パックアップパラメータ バックアップ元/先「SRC → TARGET」 | |
| set SRC=\\server\share | |
| set TARGET=D:\backup_data | |
| rem timestamp -> YYMMDDhhmmss | |
| rem 時刻1桁のゼロ埋め ex) " 9:00:00.00" -> "09:00:00.00" | |
| set timetemp=%time: =0% | |
| set timesec=%timetemp::=% | |
| set timestamp=%date:/=%%timesec:~0,6% |
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
| taskkill /F /IM explorer.exe | |
| set remotehome=\\server\data\username | |
| reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Personal" /d "%remotehome%\マイドキュメント" /f | |
| reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Desktop" /d "%remotehome%\デスクトップ" /f | |
| start explorer | |
| sleep 1 | |
| reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Personal" /d "%USERPROFILE%\Documents" /f | |
| reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Desktop" /d "%USERPROFILE%\Desktop" /f |
OlderNewer