Skip to content

Instantly share code, notes, and snippets.

View ilsubyeega's full-sized avatar
🖕
Busy

ilsubyeega

🖕
Busy
View GitHub Profile
@ilsubyeega
ilsubyeega / new.html
Created June 4, 2022 14:09
Seamless audio web implementation
<body>
<button id="button" onclick="click()">Click</button>
</body>
<script>
fetch("./440Hz.wav")
.then(result => result.arrayBuffer())
.then(result => load(result));
const load = (buffer) => {
@ilsubyeega
ilsubyeega / trash.js
Last active June 15, 2022 15:59
Trash code: Spliiting every n texts from multiline string, but prefers that single sentence should be on single line
const splitEvery = (text, chars) => {
const resArr = [];
let temp = text;
while (temp.length > chars) {
resArr.push(temp.substr(0, chars))
temp = temp.substr(chars)
}
resArr.push(temp)
return resArr;
}
@ilsubyeega
ilsubyeega / build.gradle.kts
Created July 16, 2022 15:20
This task imports the dependencies of this project and creates a property file at build
tasks.create("createProperties") {
dependsOn("processResources")
doLast {
val propertyFile = file("$buildDir/resources/mccore/versions.properties")
propertyFile.parentFile.mkdirs()
propertyFile.printWriter().use {
val property = Properties()
configurations.compileClasspath.get().allDependencies.forEach { dependency ->
property.setProperty("${dependency.group}:${dependency.name}", "${dependency.version}")
package win.roto.skriptmaintenance;
import ch.njol.skript.variables.SerializedVariable;
import ch.njol.skript.variables.Variables;
import ch.njol.skript.variables.VariablesStorage;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
<-- 3자리 .kr 도메인 희망여부 -->
아래 작성된 3자리 영어 문자열은 도메인 이름을 뜻합니다.
예) acu -> acu.kr
아래 작성된 도메인들은 2022-10-17 기준으로 등록되어 있지 않고, 3자리 도메인 도메인 중에서 특별히 유독 쓰기 좋아 보이는 도메인들은 적어두었습니다.
필자는 여기에는 없지만 format을 뜻하는 fmt.kr를 선점하였습니다.
열심히 사용하십쇼~
------------------------------
acu
aeo
aex
Windows Registry Editor Version 5.00
; This file is a registry created for the use of FastForward in the NAVER Whale browser.
; Please check the address below if you want to check the related information.
; 이 파일은 NAVER Whale 브라우저에서 FastForward를 사용하기 위해 만들어진 레지스트리입니다.
; 관련 내용을 확인하시려면 아래 주소를 확인하시기 바랍니다.
; https://github.com/FastForwardTeam/releases#google-chrome-brave
$content = Get-Content .\Desktop\list.txt.txt
$content = $content.Trim()
foreach ($item in $content.Split("`n"))
{
if ($null -eq $item -or $item.Length -eq 0) { return }
$splitted = $item.Split("|")
$rule_name = $splitted[0].Trim()
$rule_location = $splitted[1].Trim()
New-NetFirewallRule -DisplayName $rule_name -Direction Inbound -Program $rule_location -Action Block
New-NetFirewallRule -DisplayName $rule_name -Direction Outbound -Program $rule_location -Action Block
// ==UserScript==
// @name Report to Naver-Dark
// @namespace https://fmt.kr/
// @description Context menu to create issue to naver-dark repo from current page.
// @version 0.1
// @author ilsubyeega
// @include *
// @grant GM_openInTab
// @run-at context-menu
// ==/UserScript==]
<script>
// percent: 0 ~ 1
const calculateDamping = (percent, from, to) => {
const formula = (t) => Math.pow(Math.E, -t) * Math.sin(2 * Math.PI * t)
const realPercent = percent * 4
const calculated = formula(realPercent)
return from * calculated + to * (1 - calculated)
}
window.currentInterval = null;
import os
import csv
import sys
def get_directories(path):
return [d for d in os.listdir(path) if os.path.isdir(os.path.join(path, d))]
def get_files_from_dir(path):