Skip to content

Instantly share code, notes, and snippets.

View tanishiking's full-sized avatar
🎓

Rikito Taniguchi tanishiking

🎓
View GitHub Profile
package dotty.tools.dotc
package transform
import ast.{TreeTypeMap, tpd}
import config.Printers.tailrec
import core.*
import Contexts.*, Flags.*, Symbols.*
import Constants.Constant
import NameKinds.{TailLabelName, TailLocalName, TailTempName}
import StdNames.nme
#!/usr/bin/env -S scala-cli shebang --quiet
//> using lib "com.softwaremill.sttp.client3::core:3.8.3"
//> using lib "com.lihaoyi::os-lib:0.8.1"
//> using lib "com.mitchtalmadge:ascii-data:1.4.0"
//> using lib "com.lihaoyi::ujson:2.0.0"
// 147.47 ┤ ╭╮ ╭──╮ ╭─╮
// 146.52 ┤ ╭╯╰─╮ │ │╭─╯ ╰╮ ╭─╮╭──╮
// 145.56 ┤ │ ╰──╯ ╰╯ ╰╮│ ╰╯ │ ╭──╮╭─╮
  • (easy) Enables metals-vscode to fire textDocument/*
  • Adjust the LSP request position to the actual source position (generated by almond / ammonite)
    • How to know the URI of generated Scala file for the ipynb? Can we get that information from running Kernel somehow?
    • How to map "uri of notebook cell" + "position inside the cell" to the position of generated Scala source file?

Enables metals-vscode to fire textDocument/*

According to notebookCellTextDocumentFilter of LSP 3.17. We can enable vscode to fire textDocument/* for all jupyter-notebook, where the Cell's language is Scala.

@tanishiking
tanishiking / aho-corasick.ts
Last active May 16, 2020 04:48
Naive implementation of AhoCorasick in TypeScript
interface State {
id: number
next: { [key: string]: State }
}
function hasKey(state: State, char: string): boolean {
return !!state.next[char]
}
export class AhoCorasick {
state: State[] = [{ id: 0, next: {} }]

Pub/Sub push endpoint の JWT 検証流れ

#GCP #GAE #Pub/Sub

メモ: image 2020/4/14

参考

10 Swamp (RIX) 194
8 Island (RIX) 193
4 Death Baron (M19) 90
2 Diregraf Ghoul (M19) 92
2 Doomed Dissenter (M19) 93
2 Soul Diviner (WAR) 218
3 Eternal Taskmaster (WAR) 90
3 Lazotep Plating (WAR) 59
3 Aven Eternal (WAR) 42
4 Dimir Guildgate (GRN) 245
CREATE TABLE `blog` (
`id` BIGINT UNSIGNED NOT NULL,
`title` VARCHAR(512) NOT NULL,
`content` TEXT NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
@tanishiking
tanishiking / typesafe_config_load_memo.md
Created November 26, 2018 09:05
Type safe config のコード呼んだときのメモ
package main
import (
"io"
"fmt"
"bufio"
"os"
"flag"
"github.com/tidwall/gjson"