Skip to content

Instantly share code, notes, and snippets.

@psyark
psyark / directory.js
Created January 6, 2015 17:09
AtomのTree Viewのソート順を文字/数字を交互に判定するように変更
// names.sort(function(name1, name2) {
// return name1.toLowerCase().localeCompare(name2.toLowerCase());
// });
names.sort(function(name1, name2) {
var a1 = name1.split(/(\d+)/);
var a2 = name2.split(/(\d+)/);
for (var i=0; i<Math.max(a1.length, a2.length); i+=2) {
var ra = (a1[i] || '').localeCompare(a2[i] || '');
var rd = a1[i+1] == a2[i+1] ? 0 : (a1[i+1] * 1 > a2[i+1] * 1 ? 1 : -1);
#!/usr/local/bin/perl
use strict;
use IO::Socket;
use IO::Select;
my $julius_socket = IO::Socket::INET->new(
Proto => 'tcp',
PeerAddr => 'localhost',
PeerPort => 10500,
@psyark
psyark / scancode-default.reg
Created April 29, 2014 11:18
scancode-default.reg
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,01,00,00,00,00,00,00,00
@psyark
psyark / keyboard-ctrl-capslock.reg
Created April 29, 2014 11:15
Swap Ctrl<->Caps Lock
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,03,00,00,00,3a,00,1d,00,1d,00,3a,00,\
00,00,00,00
@psyark
psyark / keyboard-us.reg
Created April 28, 2014 02:25
US Keyboard
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\i8042prt\Parameters]
"PollingIterations"=dword:00002ee0
"PollingIterationsMaximum"=dword:00002ee0
"ResendIterations"=dword:00000003
"LayerDriver JPN"="kbd101.dll"
"OverrideKeyboardIdentifier"="PCAT_101KEY"
"OverrideKeyboardType"=dword:00000007
"OverrideKeyboardSubtype"=dword:00000000
@psyark
psyark / keyboard-jis.reg
Last active August 29, 2015 14:00
JIS Keyboard
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\i8042prt\Parameters]
"PollingIterations"=dword:00002ee0
"PollingIterationsMaximum"=dword:00002ee0
"ResendIterations"=dword:00000003
"LayerDriver JPN"="kbd106.dll"
"OverrideKeyboardIdentifier"="PCAT_106KEY"
"OverrideKeyboardType"=dword:00000007
"OverrideKeyboardSubtype"=dword:00000002