Skip to content

Instantly share code, notes, and snippets.

// ==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 / auto_fade_audio.lua
Last active November 1, 2024 17:32
OBS: シーンが切り替わるタイミングでメディアをフェードアウト/フェードインする
local obs = obslua
local duration = 1200
local interval = 50
local steps = duration / interval
local current_scene_name
local debug = false
'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',
// ==UserScript==
// @name iTS - Protect Auto Launch
// @include https://itunes.apple.com/*
// @run-at document-end
// ==/UserScript==
document.body.onload = function(){};
if(!Array.slice)
Array.slice = Function.prototype.call.bind(Array.prototype.slice);