Skip to content

Instantly share code, notes, and snippets.

View ebibibi's full-sized avatar

Masahiko Ebisuda ebibibi

View GitHub Profile
@ebibibi
ebibibi / Auto-Logon.ps1
Created October 31, 2012 14:09
Windowsに指定したユーザー名、パスワードで自動ログオンをさせるPowerShellスクリプトです。
Param(
$DefaultUserName = "",
$DefaultPassword = "",
$DefaultDomainName = ""
)
$RegLogonKey = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
Set-itemproperty -path $RegLogonKey -name "AutoAdminLogon" -value 1
Set-itemproperty -path $RegLogonKey -name "DefaultUsername" -value $DefaultUserName
@ebibibi
ebibibi / locale_jp_amd64.xml
Created October 22, 2012 23:57
64bit windows answer file for japanese 106 keyboard layout
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<InputLocale>ja-JP</InputLocale>
<SystemLocale>ja-JP</SystemLocale>
<UILanguage>ja-JP</UILanguage>
<UserLocale>ja-JP</UserLocale>
</component>
</settings>
@ebibibi
ebibibi / locale_jp_x86.xml
Created October 22, 2012 23:56
32bit windows answer file for japanese 106 keyboard layout
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<InputLocale>ja-JP</InputLocale>
<SystemLocale>ja-JP</SystemLocale>
<UILanguage>ja-JP</UILanguage>
<UserLocale>ja-JP</UserLocale>
</component>
</settings>
@ebibibi
ebibibi / 106keyboard.reg
Last active February 1, 2019 03:39
set keyboard layout to 106
Windows Registry Editor Version 5.00
;This registry files is used to set the keyboard driver
;for the Japanese language to a 106/109 keyboard layout driver
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters]
"PollingIterations"=dword:00002ee0
"PollingIterationsMaximum"=dword:00002ee0
"ResendIterations"=dword:00000003
"OverrideKeyboardType"=dword:00000007
"OverrideKeyboardSubtype"=dword:00000002
@ebibibi
ebibibi / gist:3060973
Created July 6, 2012 15:40
get instagram picture url from page of instagram.
require 'rubygems'
require 'net/http'
require 'uri'
require 'json'
class ExpandUrl
def self.expand_url(url)
uri = url.kind_of?(URI) ? url : URI.parse(url)
Net::HTTP.start(uri.host, uri.port) { |io|
r = io.head(uri.path)
@ebibibi
ebibibi / disablesnp.bat
Created July 3, 2012 08:00
disable SNP on windows7
netsh int tcp set global chimney=disabled
netsh int tcp set global rss=disabled
netsh int tcp set global netdma=disabled
rem HW側でも無効にする必要あり。
rem you must disable function by hardware.
#include <stdio.h>
int main(void)
{
char *p;
int i;
for(i=0; i<16; i++) {
*p = "0123456789abcdef\0"[i];
printf("%s",p);
}
#include <stdio.h>
int main(void)
{
char *p;
char buf[2];
buf[1] = '\0';
p = buf;
@ebibibi
ebibibi / putxval.c
Created June 28, 2012 14:19
putxval
#include <stdio.h>
/* 数値の16進表示 */
int putxval(unsigned long value, int column)
{
char buf[9];
char *p;
p = buf + sizeof(buf) -1;
*(p--) = '\0';
@ebibibi
ebibibi / GetAllFiles.vbs
Created May 17, 2012 05:39
[vbscript]get all files recursively
Set resultFiles = CreateObject("Scripting.Dictionary")
GetAllFiles "C:\tmp", resultFiles
For Each file in resultFiles.Items
WScript.Echo file.Path
Next
Function GetAllFiles(folder, resultFiles)
Set fso = CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetFolder(folder)