Skip to content

Instantly share code, notes, and snippets.

View amano41's full-sized avatar

Amano, Yoichi amano41

View GitHub Profile
@amano41
amano41 / dump-access.ps1
Created November 17, 2021 13:42
Dump tables, relationships and queries from Access database file
# 実行には ACE14.0 以降が必要
# Microsoft Access Database Engine 2010 Redistributable
# http://www.microsoft.com/en-us/download/details.aspx?id=13255
Param (
[Parameter()]
[String] $DirPath = ".",
[String] $FileName = "*",
[ValidateSet("Table", "Query", "SQL", "Relation")][String] $Type = "Table",
@amano41
amano41 / config.py
Created December 31, 2020 02:45
Keyhac config file to use JP106 keyboard as US101 keyboard
from keyhac import *
def configure(keymap):
keymap_global = keymap.defineWindowKeymap()
if 0:
keymap_global["S-2"] = "Atmark"
@amano41
amano41 / Xorshift.java
Created October 24, 2018 15:21
Xorshift and xorshift+ implementation in Java
public class Xorshift {
private long x = 123456789;
private long y = 362436069;
private long z = 521288629;
private long w = 88675123;
public long random() {
long t = x ^ ((x << 11) & 0xFFFFFFFFL); // 32bit
x = y;
@amano41
amano41 / xorshift.py
Created October 24, 2018 13:26
Xorshift and xorshift+ implementation in Python
def xorshift128():
'''xorshift
https://ja.wikipedia.org/wiki/Xorshift
'''
x = 123456789
y = 362436069
z = 521288629
w = 88675123
@amano41
amano41 / clear-temp.bat
Created November 8, 2017 14:58
Temp フォルダの中身を削除するバッチファイル
@echo off
pushd %USERPROFILE%\AppData\Local\Temp
del /q *.*
for /d %%f in ( * ) do rmdir /s /q "%%f"
popd
pushd %SystemRoot%\Temp
del /q *.*
for /d %%f in ( * ) do rmdir /s /q "%%f"
@amano41
amano41 / remove-store-apps.ps1
Created March 29, 2017 05:36
Windows 10 の標準ストアアプリをアンインストールする
$store_apps = @(
"Microsoft.3DBuilder",
"Microsoft.WindowsAlarms",
"Microsoft.WindowsCalculator",
"microsoft.windowscommunicationsapps",
"Microsoft.WindowsCamera",
"Microsoft.MicrosoftOfficeHub",
"Microsoft.SkypeApp",
"Microsoft.Getstarted",
"Microsoft.WindowsMaps",
@amano41
amano41 / boxsync.reg
Created November 18, 2016 07:19
Box Sync フォルダーの場所を変更する
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Box\BoxSync]
"SyncRootFolder"="D:\\Home\\%USERNAME%\\BoxSync"
@amano41
amano41 / fstab
Created November 4, 2016 08:42
Cygwin のマウント設定
# /etc/fstab
#
# This file is read once by the first process in a Cygwin process tree.
# To pick up changes, restart all Cygwin processes. For a description
# see https://cygwin.com/cygwin-ug-net/using.html#mount-table
# This is default anyway:
# none /cygdrive cygdrive binary,posix=0,user 0 0
none / cygdrive binary,posix=0,user,noacl 0 0
@amano41
amano41 / caps2ctrl.reg
Last active March 25, 2020 03:26
CapsLock キーを Ctrl キーに変更する
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
@amano41
amano41 / keyboard-us101.reg
Created November 1, 2016 06:39
キーボードレイアウトを英語配列に変更する
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters]
"LayerDriver JPN"="kbd101.dll"
"OverrideKeyboardIdentifier"="PCAT_101KEY"
"OverrideKeyboardType"=dword:00000007
"OverrideKeyboardSubtype"=dword:00000000