<WinNT.h>
#define FILE_SHARE_READ 0x00000001
#define FILE_SHARE_WRITE 0x00000002
#define FILE_SHARE_DELETE 0x00000004
CreateFile(filename, access, sharemode, creation, attributes, ...);
CAtlFile::Open(filename, access, sharemode, creation, attributes, ...);
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
alias=doskey /macros | |
a=doskey /macros | |
h=doskey /history | |
l=dir /b $* | |
ziplist=unzip -l $* | |
7zlist=7z l $* | |
patchzip=perl -n -e "print if s/^Index: //;" patch.diff | zip patch.zip -@ | |
..=pushd ..\$* | |
...=pushd ..\..\$* | |
....=pushd ..\..\..\$* |
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
@echo off | |
setlocal | |
set NAME=%1 | |
if "%1"=="" set NAME=PATH | |
perl -e "print join(qq/\n/,split(q/;/,$ENV{%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
@echo off | |
if "%1"=="sjis" goto sjis | |
if "%1"=="utf8" goto utf8 | |
if "%1"=="clear" goto clear | |
echo usage: %0 [ sjis ^| utf8 ^| clear ] | |
goto end | |
:sjis | |
set LANG=ja_JP.SJIS | |
set LESSCHARSET=dos | |
set TZ=JST-9 |
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
/// smart buffer for C++11 | |
template<typename T, size_t N=256> class auto_buffer { | |
T mSmallBuf[N]; | |
T* mBuf = mSmallBuf; | |
size_t mHeapSize = 0; | |
size_t mBufSize = N; | |
public: | |
auto_buffer() = default; | |
auto_buffer(const auto_buffer&) = delete; // no copy | |
auto_buffer& operator=(const auto_buffer&) = delete; // no copy |
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
Set objExcel = CreateObject("Excel.Application") | |
objExcel.Visible = True | |
For Each strFname In WScript.Arguments | |
Set objDoc = objExcel.Workbooks.Open(strFname) | |
' clear all names (comment out) | |
For Each N In objDoc.Names | |
'' N.Delete | |
Next | |
' clear all user style |
- https://github.com/adoxa/ansicon/releases から ansi166.zip をダウンロードして適当なフォルダへ展開する.
- 展開したフォルダの x64 フォルダ下の ansicon.exe -i を実行すると、機能ONとなる.
- 機能OFFするなら -u オプションで実行する.
prompt コマンドにANSIエスケープシーケンスを追加して色付けする. 色設定は各自の好みで調整する.
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
# git config --global -e | |
[core] | |
autocrlf = true | |
excludesfile = C:/Users/hkuno/Documents/gitignore_global.txt | |
quotepath = false | |
## http://orangeclover.hatenablog.com/entry/20121004/1349353957 | |
## editor = 'C:/Program Files (x86)/Hidemaru/Hidemaru.exe' //fu8 | |
## editor = 'C:/Program Files (x86)/sakura/sakura.exe' -code=4 | |
## editor = 'C:/Program Files (x86)/EmEditor/EmEditor.exe' //cp 65001 | |
## editor = 'C:/Program Files (x86)/TeraPad/TeraPad.exe' //cu8 |
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
#{{{ my add | |
# sytem folders | |
vssver.scc | |
.svn/ | |
Debug/ | |
Release/ | |
Unicode_Debug/ | |
Unicode_Release/ | |
Mbcs_Debug/ |
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
#include <stdio.h> | |
#include <stdlib.h> | |
int main() | |
{ | |
char buf[200]; | |
puts("*** test printf NULL"); | |
printf( "printf :%s,%S,%ws\n", NULL, NULL, NULL); | |
#ifdef _MSC_VER | |
sprintf_s(buf, "sprintf_s:%s,%S,%ws\n", NULL, NULL, NULL); puts(buf); | |
#endif |
NewerOlder