Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@to
to / auto_fade_audio.lua
Last active April 16, 2024 19:30
OBS: シーンが切り替わるタイミングでメディアをフェードアウト/フェードインする
local obs = obslua
local duration = 1200
local interval = 50
local steps = duration / interval
local current_scene_name
local debug = false
// ==UserScript==
// @name Twitter Title Chop
// @include http://twitter.com/*
// ==/UserScript==
window.addEventListener('load', function(){
document.title = document.title.replace(/Twitter[ \/]*/, '');
}, true);
// ==UserScript==
// @name Unity - Open Japanese Page
// @version 0.1
// @author to
// @namespace https://github.com/to
// @license MIT
//
// @match file:///C:/Program%20Files/Unity/Hub/Editor/*
// @match https://docs.unity3d.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=unity3d.com
@to
to / gist:ead92502183764774a417b78a39a05e8
Created April 14, 2022 11:44
「ツリーにぶらさがった漫画をイッキに読むやつ」を開く ブックマークレット
javascript:window.open('https://peraimaru.site/show?tweet_url='+encodeURIComponent(location.href));void(0);
@to
to / gist:2295332
Created April 3, 2012 20:40
Google Chrome 18 - svg & absolute bug
<!doctype html>
<html>
<head>
<style type="text/css">
.frame {
position: absolute;
width: 100px;
height: 100px;
}
'use strict';
var context = {a : 1, b : 2};
withContext(context, () => {
console.log(a); // 1
});
function withContext(context, func){
eval(
@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){
@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',