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
$Dst = "F:\tmp" | |
$TargetDrive = "I" | |
cd $Dst | |
#mkdir TP4ISOから | |
Copy-Item ($TargetDrive + ":\NanoServer") NanoServer -Recurse | |
cd NanoServer | |
mkdir dism | |
Copy-Item ($TargetDrive + ":\sources\api*downlevel*.dll") dism | |
Copy-Item ($TargetDrive + ":\sources\dism*") dism |
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
<?xml version="1.0" encoding="utf-8"?> | |
<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<settings pass="offlineServicing"> | |
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> | |
<ComputerName>NanoServer</ComputerName> | |
</component> | |
</settings> | |
<settings pass="oobeSystem"> | |
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> | |
<UserAccounts> |
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
$ServerName = (Get-Date -Format "yyMMddHHmmss") + "_Ns" | |
$Ram = 1024MB | |
$VhdSize = 40GB | |
$VhdLocation = "F:\vhd" | |
$Network = "HypervNet" | |
$ImagePath = "F:\tmp\NanoServer" | |
mkdir $VhdLocation\$ServerName\vhd\ |
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
Func<string, string> toHex = x => | |
{ | |
var sb = new StringBuilder(); | |
foreach (char c in x) | |
{ | |
int intValue = Convert.ToInt32(c); | |
sb.AppendFormat(" {0:X2}", intValue); | |
} | |
return sb.ToString().TrimStart(' '); | |
}; |
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
using System; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
namespace Sample { | |
class Program { | |
static void Main(string[] args) { | |
Lzh.CompressFile(@"D:\work\test\Hoge.exe", @"D:\work\fuga.lzh"); | |
Lzh.CompressFolder(@"D:\work\test1\", @"D:\work\test1.lzh"); | |
Lzh.Extract(@"D:\work\fuga.lzh", @"D:\work\hoge"); |
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
using FirebirdSql.Data.FirebirdClient; | |
using System; | |
namespace FireBirdTest { | |
class Program { | |
static int Main(string[] args) { | |
int i = 0; | |
int max = args.Length < 1 ? 1 : int.Parse(args[0]); | |
while (i < max) { | |
var connectionBuilder = new FbConnectionStringBuilder(); |
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
library Test; | |
uses | |
System.SysUtils, | |
System.Classes; | |
{$R *.res} | |
function Test1: Integer; stdcall; | |
begin |
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
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
using System.Xml; | |
using System.Xml.Linq; | |
namespace DtdSample | |
{ | |
class Program | |
{ |
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
SELECT | |
name, OBJECT_NAME(parent_object_id) parent, OBJECT_NAME(referenced_object_id) referenced, delete_referential_action_desc asction | |
FROM sys.foreign_keys | |
order by referenced |
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
using System; | |
using System.Linq; | |
namespace Sample { | |
public static class StringExtensions { | |
/// <summary> | |
/// スネークケースをアッパーキャメル(パスカル)ケースに変換 | |
/// 例) sample_hoge_string → SampleHogeString | |
/// </summary> | |
public static string SnakeToUpperCamel(this string str) { |