This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Hatena bookmark compatibility for DuckDuckGo | |
| // @description add Hatebu images for DuckDuckGo | |
| // @namespace https://htsign.hateblo.jp | |
| // @version 0.0.11 | |
| // @author htsign | |
| // @match https://duckduckgo.com/?* | |
| // @updateURL https://gist.github.com/htsign/700c4ea725acb9e38c97900b1aa04633/raw/hatebu-for-duckduckgo.user.js | |
| // @downloadURL https://gist.github.com/htsign/700c4ea725acb9e38c97900b1aa04633/raw/hatebu-for-duckduckgo.user.js | |
| // @grant GM_xmlhttpRequest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Embedded YouTube fix | |
| // @description this monitors and auto-refreshes crashed embedded YouTube players in the background for a seamless viewing experience | |
| // @namespace https://htsign.hateblo.jp | |
| // @version 0.5.5 | |
| // @author htsign | |
| // @match *://*/* | |
| // @match https://www.youtube.com/embed/* | |
| // @updateURL https://gist.github.com/htsign/cc246428156299e2028e87813d3b95d8/raw/Embedded-YouTube-fix.user.js | |
| // @downloadURL https://gist.github.com/htsign/cc246428156299e2028e87813d3b95d8/raw/Embedded-YouTube-fix.user.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class MyMath | |
| { | |
| public interface ITypeConverter<T, TResult> | |
| { | |
| TResult Convert(T value); | |
| } | |
| /// <summary><c>TResult.CreateChecked</c> を用いて型変換を行います。</summary> | |
| public readonly struct CheckedTypeConverter<T, TResult> : ITypeConverter<T, TResult> | |
| where T : INumberBase<T> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name YouTube Comment Username Reveals | |
| // @description add user name for comment | |
| // @namespace https://htsign.hateblo.jp | |
| // @version 0.3.12 | |
| // @author htsign | |
| // @match https://www.youtube.com | |
| // @match https://www.youtube.com/* | |
| // @match https://m.youtube.com | |
| // @match https://m.youtube.com/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; -*- mode: fundamental; coding: utf-8 -*- | |
| ;; Mathmatical Alphanumeric Symbols dictionary for SKK system | |
| ;; | |
| ;; https://www.asahi-net.or.jp/~ax2s-kmtn/ref/unicode/u1d400.html | |
| ;; | |
| ;; okuri-nasi entries | |
| A /𝔸/ | |
| B /𝔹/ | |
| C /ℂ/ | |
| D /𝔻/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Hatena bookmark compatibility for Bing | |
| // @namespace https://htsign.hateblo.jp | |
| // @version 0.0.3 | |
| // @description add Hatebu images for Bing | |
| // @author htsign | |
| // @match https://www.bing.com/search?* | |
| // @downloadURL https://gist.github.com/htsign/b2c913f28e4b8646d0b30c4170e7d34c/raw/hatebu-for-bing.user.js | |
| // @updateURL https://gist.github.com/htsign/b2c913f28e4b8646d0b30c4170e7d34c/raw/hatebu-for-bing.user.js | |
| // @grant none |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let string_of_list ~to_string xs = | |
| "[" ^ String.concat "; " (List.map to_string xs) ^ "]" | |
| let string_of_opt ~to_string = | |
| function None -> "None" | Some x -> Printf.sprintf "Some(%s)" @@ to_string x | |
| let () = | |
| let print_optlist theme xs = | |
| let xs = OptionList.to_optlist xs in | |
| let lstr = string_of_list ~to_string:(string_of_opt ~to_string:string_of_int) xs in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module List = struct | |
| include Stdlib.List | |
| let hd_opt xs = try Some (hd xs) with Failure _ -> None | |
| end | |
| let char_list_of_string string = | |
| let rec aux acc idx = | |
| if idx >= 0 then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (* libraries definitions *) | |
| (* Haskell's Data.Function.on implementation in OCaml *) | |
| module Data : sig | |
| module Function : sig | |
| val on : ('b -> 'b -> 'c) -> ('a -> 'b) -> ('a -> 'a -> 'c) | |
| end | |
| end = struct | |
| module Function = struct | |
| let on bf f = fun x y -> bf (f x) (f y) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module List = struct | |
| include Stdlib.List | |
| let group_by (projection : 'a -> 'key) (xs : 'a list) : ('key * 'a list) list = | |
| let pairs = xs |> List.map (fun x -> projection x, x) in | |
| let rec aux acc = function | |
| | [] -> acc |> List.rev | |
| | ((k, _) :: _) as xs -> | |
| let ys, zs = xs |> List.partition (fun t -> fst t = k) in |
NewerOlder