Skip to content

Instantly share code, notes, and snippets.

@azechi
azechi / sampleImage.cs
Created February 21, 2013 07:10
指定した文字を入れた画像ファイルを作る
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Drawing.Imaging;
namespace TextImage
{
@azechi
azechi / 2003eventlog_clear.ps1
Created February 21, 2013 05:52
windows 2003 のイベントログ ローテーション
# windows 2003 向けのイベントログローテーションタスク
param($logname="[logname]", $backupFolder=(&{Split-Path $MyInvocation.ScriptName}))
$logfiles = Get-WmiObject win32_nteventlogfile -Filter "LogfileName='$logname'" -EnableAllPrivileges
if ($logfiles -eq $null)
{
throw "ログファイル $logname は存在しません。"
}
@azechi
azechi / gist:89eebaef73b9ba8e497b
Last active October 13, 2015 07:27
PowerShell よく忘れる
select-object @{ n = "propertyName"; e = { /* expression $_ */ } }