Skip to content

Instantly share code, notes, and snippets.

@hkuno9000
hkuno9000 / push-to-multi-mirror-repos.sh
Last active September 13, 2018 00:00
git puth to multi mirror repos.
git clone https://who@github.com/who/proj.git
cd proj
# set remote mirror URL
git remote add --mirror=push mirror1 https://who@bitbucket.org/who/proj.git
git remote add --mirror=push mirror2 https://who@abc.com/who/proj.git
# push to remote-mirrors
git push mirror1
git push mirror2
# push to direct-URL
git push --mirror https://who@xyz.com/who/proj.git
@hankei6km
hankei6km / git-rebase--onto-tldr.md
Last active February 8, 2024 09:01
git のブランチを別のブランチへ付け替える (git rebase --onto)

git のブランチを別のブランチへ付け替える (git rebase --onto)

たまに --onto を使おうと思うと忘れているのでメモ.

基本(普通に rebase)

これを

%%{init: { 
@hkuno9000
hkuno9000 / file-sharemode.md
Last active December 22, 2022 18:18
CheetSheet file share mode

Win32/ATL

<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, ...);
@hkuno9000
hkuno9000 / excel-clear-junk-style.vbs
Last active August 7, 2018 04:26 — forked from YoshihitoAso/gist:311b0a1d40174e1bfdae
[Excel]excelシートの書式をすべて削除するマクロ
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
y - 処理中の hunk を索引に追加します。
n - 処理中の hunk を索引に追加しません。
q - 終了します。処理中の hunk およびそれ以降の hunk は索引に追加しません。
a - 処理中の hunk およびそれ以降のファイル中の hunk を索引に追加します。
d - 処理中の hunk およびそれ以降のファイル中の hunk を索引に追加しません。
g - 処理対象となる(別の) hunk を選択します。
/ - 入力した正規表現にマッチする hunk を検索します。
j - 処理中の hunk を保留にし、次の保留されている hunk を表示します。
J - 処理中の hunk を保留にし、次の hunk を表示します。