Skip to content

Instantly share code, notes, and snippets.

View kdy1's full-sized avatar
💭
Working on swc/next.js/stc

Donny/강동윤 kdy1

💭
Working on swc/next.js/stc
View GitHub Profile
@kdy1
kdy1 / orig.js.map
Created June 14, 2024 14:13
Sourcemap. `orig.adjust_mappings(&map);`
This file has been truncated, but you can view the full file.
{"version":3,"sources":["../dist/webpack:/webpack/bootstrap","../dist/webpack:/src/api/index.ts","../dist/webpack:/src/api/mockData.ts","../dist/webpack:/src/components/BaseModal/index.module.scss","../dist/webpack:/src/components/BaseModal/index.tsx","../dist/webpack:/src/components/BaseOperateFooter/index.module.scss","../dist/webpack:/src/components/BaseOperateFooter/index.tsx","../dist/webpack:/src/components/BasePage/index.module.scss","../dist/webpack:/src/components/BasePage/index.tsx","../dist/webpack:/src/components/container/index.module.scss","../dist/webpack:/src/components/container/index.tsx","../dist/webpack:/src/config/globalData/index.ts","../dist/webpack:/src/locales/de/index.ts","../dist/webpack:/src/locales/en/index.ts","../dist/webpack:/src/locales/es/index.ts","../dist/webpack:/src/locales/fr/index.ts","../dist/webpack:/src/locales/ja/index.ts","../dist/webpack:/src/locales/zh/index.ts","../dist/webpack:/src/utils/getLanguage.ts","../dist/webpack:/src/utils/getSystemInfoSync.ts","../dist
@kdy1
kdy1 / test capture
Created March 20, 2024 05:05
Test output
running 54 tests
Input: /Users/kdy1/projects/np-turbo/turbo/crates/turbopack-tests/tests/snapshot/basic/async_chunk
Input: /Users/kdy1/projects/np-turbo/turbo/crates/turbopack-tests/tests/snapshot/basic/async_chunk_build
Input: /Users/kdy1/projects/np-turbo/turbo/crates/turbopack-tests/tests/snapshot/basic/chunked
Input: /Users/kdy1/projects/np-turbo/turbo/crates/turbopack-tests/tests/snapshot/basic/ecmascript_minify
Input: /Users/kdy1/projects/np-turbo/turbo/crates/turbopack-tests/tests/snapshot/basic/shebang
Input: /Users/kdy1/projects/np-turbo/turbo/crates/turbopack-tests/tests/snapshot/comptime/define
Input: /Users/kdy1/projects/np-turbo/turbo/crates/turbopack-tests/tests/snapshot/css/absolute-uri-import
Input: /Users/kdy1/projects/np-turbo/turbo/crates/turbopack-tests/tests/snapshot/css/chained-attributes
Input: /Users/kdy1/projects/np-turbo/turbo/crates/turbopack-tests/tests/snapshot/basic/top-level-await
@kdy1
kdy1 / beutified.js
Created October 5, 2022 09:47
terser, angular
/**
* @license AngularJS v1.2.5
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
(function (window, document, undefined) {
"use strict";
function minErr(module) {
return function () {
@kdy1
kdy1 / compare.rs
Created September 5, 2022 02:15
Rust hash comparison
use ahash::RandomState;
use criterion::*;
use farmhash::FarmHasher;
use fnv::FnvBuildHasher;
use fxhash::FxBuildHasher;
use std::hash::{BuildHasher, BuildHasherDefault, Hash, Hasher};
fn generic_hash<K: Hash, B: BuildHasher>(key: &K, builder: &B) -> u64 {
let mut hasher = builder.build_hasher();
key.hash(&mut hasher);
@kdy1
kdy1 / blockstmt.s
Created May 5, 2021 09:52
swc babelify assembly
swc_babel_compat::stmt::<impl swc_babel_compat::Babelify for swc_ecma_ast::stmt::BlockStmt>::babelify:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 216
mov r15, rdx
mov rbx, rsi
mov r14, rdi
### Dudy Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by @kdy1. This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to @kdy1 in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact kdy1@dudy.kr .
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.
**Copyright License.** You hereby grant, and agree to grant, to @kdy1 a non-exclusive, perpetual, irrevocable, worldwide, fully-paid, royalty-fre
const encoder = new TextEncoder();
function encode(input) {
return encoder.encode(input);
}
const decoder = new TextDecoder();
function decode(input) {
return decoder.decode(input);
}
const DEFAULT_BUF_SIZE = 4096;
const MIN_BUF_SIZE = 16;
declare type PrimitiveName = 'string' | 'number' | 'boolean';
declare const string: "string";
declare const number: "number";
declare const boolean: "boolean";
declare const stringOrBoolean: "string" | "boolean";
declare const stringOrBooleanOrNumber: "string" | "number" | "boolean";
@kdy1
kdy1 / test.js
Created May 1, 2019 10:25
swc source map
function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError('Cannot call a class as a function');
}
@kdy1
kdy1 / $perf.html
Created August 2, 2018 12:28
Obfuscated package names (by hand)
<html>
<head>
<script src="https://www.gstatic.com/charts/loader.js"></script>
<script>
google.charts.load('current', { 'packages': ['timeline'] });
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var container = document.getElementById('timeline');
var chart = new google.visualization.Timeline(container);