Skip to content

Instantly share code, notes, and snippets.

on method print("안녕하세요 ", null, null, "여기", RUN_COMMAND, "/stop", "를 클릭하세요", null, null)
import io.github.inggameteam.alert.AlertPluginImpl
class PartyPlugin : AlertPluginImpl() {
override fun onEnable() {
super.onEnable()
println(component.string.comp("enable_plugin"))
}
}
git clone -b ${{ steps.branch-name.outputs.current_branch }} --single-branch https://${{ github.actor }}@github.com/${{ env.repo }}
dir_name=$(basename ${{ env.repo }} /)
cd $dir_name
mkdir out
mkdir out/bukkit
cd out/bukkit
git init
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git remote add origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ env.repo }}
@Bruce0203
Bruce0203 / index.html
Created July 26, 2022 05:57
picots sample
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hello</title>
<link rel="stylesheet" href="https://unpkg.com/@picocss/pico@latest/css/pico.min.css">
</head>
<body>
<div>
<canvas id="myChart"></canvas>
</div>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
function getRandomInt(max) {
return Math.floor(Math.random() * max);
}
miniGames:
테스트:
maxPlayers: 20
maxStartPlayers: 1
waitForStartTime: 100
gameTime: 100
repeatList:
- wait
- timer
repeats:
@Bruce0203
Bruce0203 / FastIterator.kt
Last active March 13, 2023 09:30
performance optimized forEach in Kotlin (exclude LinkedList case)
inline fun <T> List<T>.fastForEach(callback: (T) -> Unit) {
var n = 0
while (n < size) callback(this[n++])
}
inline fun <T> Array<T>.fastForEach(callback: (T) -> Unit) {
var n = 0
while (n < size) callback(this[n++])
}
import java.util.UUID
import kotlin.system.measureTimeMillis
fun main() {
fun newRandomString() = UUID.randomUUID().toString()
val list = (0..100).map { newRandomString() }.toList()
val times = 100000
val a = measureTimeMillis {
repeat(times) {
list.forEach { }
@Bruce0203
Bruce0203 / DoesHashMapWorkWithNonHashCodeEquals.kt
Last active April 3, 2023 07:59
DoesHashMapWorkWithNonHashCodeEquals.kt
import java.util.UUID
var isEqualsFunctionCalled = false
data class KeyObj(val uuid: UUID = UUID.randomUUID()) {
override fun equals(other: Any?): Boolean {
isEqualsFunctionCalled = true
return super.equals(other)