Skip to content

Instantly share code, notes, and snippets.

View hidori's full-sized avatar
🏠
Working from home

Hiroaki SHIBUKI hidori

🏠
Working from home
  • Tokyo, Japan
  • 16:16 (UTC +09:00)
View GitHub Profile
@hidori
hidori / TaskIEnumerableT3.cs
Created August 7, 2012 14:35
Task<IEnumerable<T>> #3
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
@hidori
hidori / SystemParametersInfoIssue.cs
Created August 9, 2012 07:34
SystemParametersInfo Issue
using System;
using System.Runtime.InteropServices;
namespace CSConsoleApplication1
{
class Program
{
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
delegate bool SystemParametersInfoDelegate(uint uiAction, uint uiParam, ref uint pvParam, uint fWinIni);
@hidori
hidori / TaskCancellation.cs
Created August 17, 2012 13:26
Task Cancellation
using System;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
@hidori
hidori / Enable-AzurePowerShell.ps1
Created August 19, 2012 01:10
Enable Azure PowerShell
$ProgramFilesX86 = ${ENV:ProgramFiles(x86)}
Get-ChildItem -Path $(Join-Path -Path $ProgramFilesX86 -ChildPath "Microsoft SDKs\Windows Azure\PowerShell\Azure\*.psd1") | %{ Import-Module -Name $($_)}
@hidori
hidori / WindowsAzurePowerShell.cmd
Created August 19, 2012 01:51
Windows Azure PowerShell
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -NoExit -Command "cd 'C:\'; Get-ChildItem 'C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\*.psd1' | ForEach-Object {Import-Module $_}"
@hidori
hidori / Get-IisLog.ps1
Created August 19, 2012 08:22
Get-IisLog.ps1
Param(
[Parameter(Mandatory=$True,Position=0)]
[String[]]
$Path,
[Switch]
$Utc)
Function FindIndex
{
Param (
@hidori
hidori / u_ex120818.log
Created August 19, 2012 09:11
IIS8 Log
#Software: Microsoft Internet Information Services 8.0
#Version: 1.0
#Date: 2012-08-18 19:46:23
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2012-08-18 19:46:57 ::1 GET / - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+10.0;+Windows+NT+6.2;+WOW64;+Trident/6.0) - 200 0 0 0
2012-08-18 19:46:57 ::1 GET /msweb-brand.png - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+10.0;+Windows+NT+6.2;+WOW64;+Trident/6.0) http://localhost/ 200 0 0 0
2012-08-18 19:46:57 ::1 GET /iis-8.png - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+10.0;+Windows+NT+6.2;+WOW64;+Trident/6.0) http://localhost/ 200 0 0 0
2012-08-18 19:46:57 ::1 GET /w-brand.png - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+10.0;+Windows+NT+6.2;+WOW64;+Trident/6.0) http://localhost/ 200 0 0 0
2012-08-18 19:46:57 ::1 GET /favicon.ico - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+10.0;+Windows+NT+6.2;+WOW64;+Trident/6.0) - 404 0 2 0
2012-08-18 19:46:57 ::1 GET /bkg-blu.jpg - 80 - :
@hidori
hidori / Get-IisLog.txt
Created August 19, 2012 09:27
Get-IisLog.txt
Path : C:\INetPub\logs\LogFiles\W3SVC1\u_ex120818.log
FileName : u_ex120818.log
LineNumber : 5
Line : 2012-08-18 19:46:57 ::1 GET / - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+10.0;+Windows+NT+6.2;+WOW64;+Trident/6.0) - 200 0 0 0
DateTime : 2012/08/18 19:46:57
Date : 2012-08-18
Time : 19:46:57
SIp : ::1
CsMethod : GET
@hidori
hidori / Get-IisLogFile.ps1
Created August 19, 2012 12:33
Get-IisLogFile.ps1
Param(
[Parameter(Mandatory=$True,Position=0)]
[String[]]
$Path,
[Switch]
$Recurse,
[Switch]
$Utc,
[DateTime]
$After,
@hidori
hidori / IisLogFiles.txt
Created August 20, 2012 05:17
IisLogFiles.txt
u_ex120801.log
u_ex120802.log
u_ex120803.log
u_ex120804.log
u_ex120805.log
u_ex120806.log
u_ex120807.log
u_ex120808.log
u_ex120809.log
u_ex120810.log