Skip to content

Instantly share code, notes, and snippets.

View No-Eul's full-sized avatar
🥝
Hehe :3

NoEul No-Eul

🥝
Hehe :3
View GitHub Profile
// This code is made for Rhino JavaScript engine with Java runtime
const FileInputStream = java.io.FileInputStream,
FileOutputStream = java.io.FileOutputStream,
Byte = java.lang.Byte,
JavaArray = java.lang.reflect.Array;
function copyFile(src, dest) {
let inputStream, outputStream;
try {
const Jsoup = org.jsoup.Jsoup,
FileOutputStream = java.io.FileOutputStream,
Byte = java.lang.Byte,
JavaArray = java.lang.reflect.Array;
// ...
function downloadFile(url, file) {
let inputStream, outputStream;
try {
var bpm = 165, duration = 273, sampleRate = 44100, sampleOffset = 35600, labelOffset = -2 * 2;
var mod = (a, b) => a - b * Math.floor(a / b);
var result = [...Array(Math.ceil(bpm * duration * 2 / 60))]
.map(($, i) => sampleOffset + Math.round(44100 * 60 * i / bpm / 2))
.map(($, i) => `<point frame="${$}" label="${Math.floor((i + labelOffset) / 8) + 1}.${mod(Math.floor((i + labelOffset) / 2), 4) + 1}${mod(i + labelOffset, 2) + 1}" />`)
.join("\n");
copy(result)
<div style="display: inline-flex; background-color: #FABE00; border-radius: 100rem; height: 5rem; position: relative; top: 2rem;">
<div style="display: inline-block; color: white; margin: auto 3rem; width: 6rem;"><strong>K244<br><span style="font-size: 1.25rem;">매교</span></strong><br><span style="font-size: 0.75rem;">Maegyo 梅 橋</span></div>
<div style="background-color: white; color: black; border: 1rem solid #FABE00; border-radius: 100rem; display: inline-flex; padding: 1rem; box-shadow: white 0 0 0 .5rem; position: relative; top: -1.5rem; height: fit-content;">
<div style="background-color: #FABE00; color: white; border-radius: 100rem; width: 4rem; height: 4rem; font-size: 1.5rem; display: inherit; word-break: keep-all; text-align: center;">
<div style="margin: auto;">K245</div>
</div>
<div style="margin: auto; margin-left: 2rem; font-size: 3rem; font-weight: bold; letter-spacing: 1em;">수원</div>
<div style="margin: auto; font-size: 1.25rem;">Suwon<br><div style="letter-spacing: 1em
function find(object, predicate, excludes, thresholdDepth) {
let result = new Map;
function find0(path, object, result, depth) {
if (depth >= thresholdDepth) return;
for (let key of Object.getOwnPropertyNames(object)) {
let value, childPath = [...path, key];
try {
value = object[key];
} catch (key) {
return;
"return"
(!![]+[])[+!![]]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[!![]+!![]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]
// using function - normal
"fill"
(![]+[])[+[]]+([][[]]+[])[!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]
"constructor"
([][(![]+[])[+[]]+([][[]]+[])[!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]]+[])[!![]+!![]+!![]]+([][(![]+[])[+[]]+([][[]]+[])[!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]]+[])[!![]+!![]+!![]+!![]+!![]+!![]]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+(!![]+[])[!![]+!![]]+([][(![]+[])[+[]]+([][[]]+[])[!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([][[]]+[])[!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]]+[])[!![]+!![]+!![]+!![]+!![]+!![]]+(!![]+[])[+!![]]
function setPreciseTimeout(callback, delay = 0) {
let url = URL.createObjectURL(new Blob([`
let start = Date.now();
while (true) {
if (Date.now() - start > ${delay}) {
postMessage(undefined);
break;
}
}
`], {type: "text/javascript"}));
@No-Eul
No-Eul / GrantAllAchievements.js
Last active May 18, 2022 14:14
Userscript and Local Storage Data Value to Grant All Achievements of Power Mode (Party Mode) in Discord
// The userscript file to grant all archievements w/o uncomfortable work
// This will be kept forever, once applied.
// After application, you will need to reload Discord.
($ => {
$.contentWindow.localStorage.PoggermodeAchievementStore = JSON.stringify({
_state: {
unlockedAchievements: [...Array(20)].map((_, i) => ({ achievementId: i, dateUnlocked: 0 }))
// You can set value of 'dateUnlocked' to current time with the code 'Date.now()' instead of '0'.
},
@No-Eul
No-Eul / DiscordUserscriptReadme.md
Last active January 12, 2023 19:58
The Read-me File to Notify for My Discord Userscripts

Copy the userscript, and paste into the console of your browser or Discord client!

📌 Before Opening DevTools

Discord ᅟhas updated to prevent users from easily opening the console in their client. For the reason, you have to do first before you open the console:

  • Open the file in the following path:
    • Windows: %APPDATA%\Discord\settings.json
    • macOS: (In macOS' case, the first or second may not exist but that's fine. If it exist, proceed with this work for only the file in one path.)
      • ~/Library/Application Support/Discord/settings.json or
      • /Library/Application Support/Discord/settings.json
    • Linux: (Also in Linux's case, proceed that like macOS.)
@No-Eul
No-Eul / ShortestDiscordExperiments.js
Last active June 16, 2024 15:19
Enable Discord experiment options with the shortest code.
// Notice: This code is no longer working and deprecated
((
$,
f = n => Object.values($._dispatcher._actionHandlers._dependencyGraph.nodes)
.find($ => $.name == n)
.actionHandler.CONNECTION_OPEN
) => {
try {
f`ExperimentStore`({ user: { flags: ++$.getCurrentUser().flags }, type: "CONNECTION_OPEN" });