I hereby claim:
- I am ichenhe on github.
- I am chenhe (https://keybase.io/chenhe) on keybase.
- I have a public key ASC6Lc1lhOdKxv58kI17e3X2HYkEXTT1n7N5z1ffYmhsTAo
To claim this, I am signing this object:
import kotlin.concurrent.thread | |
import kotlin.coroutines.* | |
typealias Callback<T> = (T) -> Unit | |
class Promise<T>(private val run: (Callback<T>) -> Unit) { | |
fun then(callback: Callback<T>) { | |
run(callback) | |
} | |
} |
import kotlin.coroutines.* | |
fun <T> generator(block: suspend GeneratorScope<T>.() -> Unit) = Generator(block) | |
class Generator<T>(private val block: suspend GeneratorScope<T>.() -> Unit) { | |
operator fun iterator(): Iterator<T> = GeneratorIterator(block) | |
} | |
@RestrictsSuspension | |
interface GeneratorScope<T> { |
# !! restriction: trigger must be push:tags !! | |
name: Demo | |
on: | |
push: | |
tags: | |
- v[0-9]+* | |
permissions: | |
contents: read |
I hereby claim:
To claim this, I am signing this object:
import org.jetbrains.annotations.NotNull; | |
import org.jetbrains.annotations.Nullable; | |
import java.nio.charset.StandardCharsets; | |
import java.util.ArrayDeque; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
public class AcAuto { |
import java.util.* | |
import kotlin.math.abs | |
import kotlin.math.sin | |
class MathParser { | |
companion object { | |
private const val ZERO_CODE = '0'.toInt() // 便于通过字符串编码快速 char -> int | |
private const val TOKEN_NULL: Short = -1 | |
private const val TOKEN_NUM: Short = 1 |
/* | |
* Copyright 2019 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
.bashrc
.source .bashrc
to reload.proxy
to setup proxy, and unproxy
to unproxy.function getip {
export winip=$(ip route | grep default | awk '{print $3}')
export wslip=$(hostname -I | awk '{print $1}')
echo "WIN IP: ${winip}"
echo "WSL IP: ${wslip}"