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
AddLog "test", "c:\tmp\hoge.txt" | |
AddLog "test2", "c:\tmp\hoge.txt" | |
'------------------------------------------------------------------------------------------- | |
' 特定のファイルへのログ出力 | |
'------------------------------------------------------------------------------------------- | |
' strMessage - 出力する文字列 | |
' strTargetFile - 出力対象ファイル | |
'------------------------------------------------------------------------------------------- |
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
SetRegistry "HKCU\test", "test", "REG_SZ" | |
'------------------------------------------------------------------------------------------- | |
' レジストリの設定 | |
'------------------------------------------------------------------------------------------- | |
' レジストリの現在の設定をログファイルに出力後、実際に書き換え、成功したかどうかを確認する。 | |
' UACが有効な場合には管理者権限があっても失敗するので事前に昇格させておくこと。 | |
' http://ebi.dyndns.biz/diary/20080813.html | |
'------------------------------------------------------------------------------------------- | |
' RegistryPath - レジストリのパス |
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
(net localgroup Administrators) -contains $env:username -or (net localgroup Administrators) -contains "$env:userdomain\$env:username" |
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 resultFiles = CreateObject("Scripting.Dictionary") | |
GetAllFiles "C:\tmp", resultFiles | |
For Each file in resultFiles.Items | |
WScript.Echo file.Path | |
Next | |
Function GetAllFiles(folder, resultFiles) | |
Set fso = CreateObject("Scripting.FileSystemObject") | |
Set folder = fso.GetFolder(folder) |
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
#include <stdio.h> | |
/* 数値の16進表示 */ | |
int putxval(unsigned long value, int column) | |
{ | |
char buf[9]; | |
char *p; | |
p = buf + sizeof(buf) -1; | |
*(p--) = '\0'; |
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
#include <stdio.h> | |
int main(void) | |
{ | |
char *p; | |
char buf[2]; | |
buf[1] = '\0'; | |
p = buf; |
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
#include <stdio.h> | |
int main(void) | |
{ | |
char *p; | |
int i; | |
for(i=0; i<16; i++) { | |
*p = "0123456789abcdef\0"[i]; | |
printf("%s",p); | |
} |
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
netsh int tcp set global chimney=disabled | |
netsh int tcp set global rss=disabled | |
netsh int tcp set global netdma=disabled | |
rem HW側でも無効にする必要あり。 | |
rem you must disable function by hardware. |
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
require 'rubygems' | |
require 'net/http' | |
require 'uri' | |
require 'json' | |
class ExpandUrl | |
def self.expand_url(url) | |
uri = url.kind_of?(URI) ? url : URI.parse(url) | |
Net::HTTP.start(uri.host, uri.port) { |io| | |
r = io.head(uri.path) |
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
Windows Registry Editor Version 5.00 | |
;This registry files is used to set the keyboard driver | |
;for the Japanese language to a 106/109 keyboard layout driver | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters] | |
"PollingIterations"=dword:00002ee0 | |
"PollingIterationsMaximum"=dword:00002ee0 | |
"ResendIterations"=dword:00000003 | |
"OverrideKeyboardType"=dword:00000007 | |
"OverrideKeyboardSubtype"=dword:00000002 |
OlderNewer