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
# コミット後にコミット時刻をファイルの更新時刻に変更するバッチ | |
# リリース物件など、ファイルの更新日時が重要な時は便利。 | |
# ただし、時間を変更するのは何が起きるか分からないので十分注意すること。 | |
# 必ず事前に、pre-revision property change hookに「exit 0」のみを記載しておくこと。 | |
# チェックアウト先ディレクトリ | |
$srcDir = "C:\Checkouts\repos" | |
# リポジトリURL |
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
using System; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using System.Linq; | |
using System.IO; | |
using System.Diagnostics; | |
using System.Collections.Generic; | |
namespace BNFCoder | |
{ |
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
$objMissingValue = [System.Reflection.Missing]::Value | |
[void] [Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms"); | |
# 指定した日付が平日かどうかを表す論理値を返す | |
function IsWeekday($date) | |
{ | |
$result = $true | |
switch((Get-Date $date).DayOfWeek) | |
{ |
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
; SSH Login | |
username = 'username' | |
hostname = 'IP-Address' | |
pswdfile = 'passkey.dat' | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
msg = 'Enter password for user ' | |
strconcat msg 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
<scriptlet> | |
<implements type="Automation" id="dispatcher"> | |
<property name="PluginEvent"> | |
<get/> | |
</property> | |
<property name="PluginDescription"> | |
<get/> | |
</property> | |
<property name="PluginFileFilters"> |
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
/* -------------------------------- 設定 -------------------------------- */ | |
// 抽出元ディレクトリ(エスケープシーケンスに注意。例)「\」⇒「\\」) | |
var src_dir = "C:\\ExcelMacro"; | |
// 抽出先ディレクトリ | |
var ext_dir = WScript.CreateObject("WScript.Shell").SpecialFolders("Desktop"); | |
// Excelファイルのパスワードを,SendKeys用の記法で記述 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<script src=".\node_modules\jquery\dist\jquery.min.js"></script> | |
<script src=".\src\index.js"></script> | |
</head> | |
<body> |
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
[void][Reflection.Assembly]::LoadWithPartialName("System.Drawing") | |
ls -Recurse|?{$_.Extension -eq ".jpg"}|%{ | |
$readable = $FALSE | |
[void]$image | |
try{ | |
$image = New-Object System.Drawing.Bitmap($_.FullName) | |
$readable = $TRUE |
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
function pick<T, K extends keyof T>(array: T[], allowed: K[]): Pick<T, K>[] { | |
return array.map(raw => | |
(Object.keys(raw) as (keyof T)[]) | |
.filter(key => allowed.indexOf(key as any) >= 0) | |
.reduce((pre, key) => ({ ...pre, [key]: raw[key] }), {} as Pick<T, K>) | |
); | |
} |
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
# mp4のある場所まで移動してから実行 | |
# exiftool.exe へのパスは通しておく | |
get-childitem -recurse -File "*.MP4" | ForEach-Object{ | |
#exiftool '-time:all+=9:00:00' $_ | |
exiftool '-FileCreateDate<${CreateDate}+0:00' '-FileModifyDate<${CreateDate}+0:00' $_ | |
# 結果確認 | |
$_.FullName | |
exiftool -time:all -G0:1 -s $_ | |
} |