Skip to content

Instantly share code, notes, and snippets.

@to
to / Default.ahk
Created September 14, 2012 02:53
Windows 7 - キーボード設定
;; #InstallKeybdHook
/*
^ Ctrl
+ Shift
! Alt
# Win
<! 左Alt
>! 右Alt
*/
@to
to / gist:4748997
Created February 10, 2013 09:47
iOSで以下ファイルをホーム画面にアプリとして置き開くと、テキストのスタイルがリンクのように下線が付き青色になる。中のテキストを0、10、20など以外に変えると発生しない。また30や0を削り3つにしても発生しない。Safariで普通に開くと装飾なしのテキストが表示される。
<!doctype html>
<html>
<head>
<meta name="apple-mobile-web-app-capable" content="yes">
</head>
<body>
<div style="display: inline-block;">0</div><div style="display: inline-block;">10</div><div style="display: inline-block;">20</div><div style="display: inline-block;">30</div>
</body>
</html>
// ==UserScript==
// @name Gigazine - Load Image Immediately
// @include http://gigazine.net/*
// ==/UserScript==
Array.forEach(document.querySelectorAll('.lazy'), function(img){
img.src = img.dataset.original;
});
// ==UserScript==
// @name LDR - Fix Unmatched Print
// @include http://reader.livedoor.com/reader/
// ==/UserScript==
with(unsafeWindow){
addAround(API.prototype, 'post', function(proceed, args, target, name){
switch(target.ap){
case '/api/unread':
case '/api/all':
@to
to / gist:6870406
Last active December 24, 2015 22:09
<body onkeydown="alert(event.key)"></body>
if(!Array.slice)
Array.slice = Function.prototype.call.bind(Array.prototype.slice);
// ==UserScript==
// @name iTS - Protect Auto Launch
// @include https://itunes.apple.com/*
// @run-at document-end
// ==/UserScript==
document.body.onload = function(){};
@to
to / logicalCompare.js
Last active January 2, 2018 15:22
Windowsのエクスプローラーの名前順ソートロジック
var expects = [
'!aa-a',
'_______z',
'___a',
'__a',
'_1',
'_a',
'_aa-a',
'1-a',
'a',
@to
to / Normalization.js
Last active February 1, 2018 11:36
NFD/NFC
var Normalization = {
conds : [
['\u3099', 78, '\u3094\u30F4'],
['\u3099', 1, 'がぎぐげござじずぜぞだぢづでどばびぶべぼガギグゲゴザジズゼゾダヂヅデドバビブベボ'],
['\u309A', 2, 'ぱぴぷぺぽパピプペポ']
]
,
decompress : function(text){
// 濁音/半濁音を分離する
Normalization.conds.forEach(function(cond){
'use strict';
var context = {a : 1, b : 2};
withContext(context, () => {
console.log(a); // 1
});
function withContext(context, func){
eval(