Skip to content

Instantly share code, notes, and snippets.

View Jae-kwang's full-sized avatar
🥤

Jaekwang jung Jae-kwang

🥤
  • Line+ Corp
  • Republic of Korea
View GitHub Profile
@Jae-kwang
Jae-kwang / Github.js
Created March 21, 2018 11:31
CodeSpitz75-2
const Github = class {
constructor(id, repo) {
this._base = `http://api.github.com/repos/${id}/${repo}/contents/`;
}
load(path) {
const id = 'callback' + Github._id++;
const f = Github[id] = ({data:{content}}) => {
delete Github[id];
document.head.removeChild(s);
this._parser.loaded(content);
@Jae-kwang
Jae-kwang / index.html
Last active June 3, 2022 08:56 — forked from lyudmil-mitev/index.html
CSS Transform Scale element to fit its parent
<html>
<head>
<title>CSS Transform Scale element to fit its parent</title>
<script src="scale2fit.js"></script>
<link rel="stylesheet" href="style.css" />
<script>
(function (window) {
function main() {
const margin = 10;
requestAnimationFrame(function fitToParentOnResize() {