Skip to content

Instantly share code, notes, and snippets.

View yshrsmz's full-sized avatar

Yasuhiro SHIMIZU yshrsmz

View GitHub Profile
@yshrsmz
yshrsmz / aquavice-instruction.md
Created April 23, 2026 04:58
aquavice-instruction

Japanese Voice Input Processing Instructions

PROCESSING ORDER (Must follow this exact sequence)

  1. Filler Word Removal
  2. Line Break and Bracket Handling
  3. Text Formatting and Cleanup
  4. Style and Expression Normalization
  5. Proper Noun Correction
  6. Final Output Generation

turns out we simply use nitro.devProxy.

At first hostRewrite option seems to rewrite request header, but it actually rewrites host field of the response header. So we need to manually pass headers option.

https://github.com/http-party/node-http-proxy

const endpoint = 'https://api.example.com/graphql'
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
@yshrsmz
yshrsmz / build.gradle
Created May 6, 2022 15:37
Gradle plugins
buildscript {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
dependencies {
// https://github.com/Kotlin/kotlinx.atomicfu/issues/56
classpath "org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.17.2"
}
@yshrsmz
yshrsmz / LoggerTest.kt
Last active January 23, 2020 02:35
KMP logger comparison
package com.codingfeline.loggertest
import com.github.aakira.napier.DebugAntilog
import com.github.aakira.napier.Napier
import ru.pocketbyte.kydra.log.KydraLog
import ru.pocketbyte.kydra.log.debug
import ru.pocketbyte.kydra.log.initDefault
import kotlin.native.concurrent.TransferMode
import kotlin.native.concurrent.Worker
import kotlin.test.Test
@yshrsmz
yshrsmz / HomeFragment.kt
Last active January 17, 2020 02:51
ViewBinding sample
class HomeFragment: Fragment(R.layout.fragment_home) {
private val binding by viewBinding { FragmentHomeBinding.bind(it) }
// do not implement onCreateView!
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
binding.mainText.text = "Hello World!"
}
}
@yshrsmz
yshrsmz / AbstractStateNotifier.kt
Created December 5, 2019 02:57
AbstractStateNotifier
abstract class AbstractStateNotifier<ACTION : Action, STATE : State, EFFECT : Effect, VM : MviViewModel<*, ACTION, STATE, EFFECT>>(
uiContext: CoroutineContext
) : CoroutineScope {
private val job = SupervisorJob()
override val coroutineContext: CoroutineContext = job + uiContext
fun stateChanged(vm: VM, state: (state: STATE) -> Unit): Job {
return launch { vm.states.collect { state(it) } }
Verifying my Blockstack ID is secured with the address 1HTj28w1QgzARDLpxBepDFEMb1fGc8kBtp https://explorer.blockstack.org/address/1HTj28w1QgzARDLpxBepDFEMb1fGc8kBtp
@yshrsmz
yshrsmz / schema.json
Created April 25, 2019 02:05
kibela api schema
{
"data": {
"__schema": {
"queryType": {
"name": "Query"
},
"mutationType": {
"name": "Mutation"
},
"subscriptionType": null,
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
subscriptionType { name }
types {
...FullType
}
directives {
name
@yshrsmz
yshrsmz / IntrospectionQuery.gql
Last active April 22, 2019 04:45
GitHub GraphQL API schema
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
subscriptionType { name }
types {
...FullType
}
directives {
name