Skip to content

Instantly share code, notes, and snippets.

@ukikagi
ukikagi / keybase.md
Last active November 21, 2020 12:36

Keybase proof

I hereby claim:

  • I am ukikagi on github.
  • I am ukikagi (https://keybase.io/ukikagi) on keybase.
  • I have a public key ASCYL4Fagw76HfEdkVgg3prSpu1C1vE6bUkdT890mLD_Bgo

To claim this, I am signing this object:

const title = document.title;
const url = location.href;
function listener(e) {
e.clipboardData.setData("text/html", `<a href="${url}">${title}</a>`);
e.clipboardData.setData("text/plain", `[${title}](${url})`);
e.preventDefault();
}
document.addEventListener("copy", listener);
document.execCommand("copy");
document.removeEventListener("copy", listener);
@ukikagi
ukikagi / topprover27.lean
Created November 29, 2019 14:16
Lean solution for TopProver #27 ( https://top-prover.top/problem/27 )
inductive Two : Type
| C21: Two
| C22: Two
inductive Three : Type
| C31: Three
| C32: Three
| C33: Three
definition at_most_two (t: Type): Prop
@ukikagi
ukikagi / string_concat_performance.py
Created June 16, 2019 17:19
Performance of string concatenation
import timeit
def concat1(N):
res = 'a'
for _ in [0] * N:
res += 'a'
def concat2(N):
res = 'a'
for _ in [0] * N:
@ukikagi
ukikagi / README.md
Last active May 1, 2016 11:10
gcj2016-1b
@ukikagi
ukikagi / regexp.hs
Last active September 25, 2015 16:39
import Control.Applicative ((<$>), (<*), (*>))
import Control.Monad (liftM2)
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Set (Set, singleton, unions, empty)
import qualified Data.Set as Set
import Data.List (intercalate)
import qualified Data.List as List