This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>CodeSpitz75-1</title> | |
</head> | |
<body> | |
<section id="data"></section> | |
<script> | |
const Info = class { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var x = 10; | |
var y = 5; | |
x = x + y // x = 15 | |
y = x - y // y = 10 | |
x = x - y // x = 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 터미널에서 해당 위치의 github 페이지 열기 | |
function og() { | |
local repo=$(basename `git rev-parse --show-toplevel`) | |
open "https://github.com/${repo}" | |
} | |
// insert .bashrc or .zshrc | |
// source .bashrc or .zshrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Usage | |
import React from 'react'; | |
import { BrowserRouter as Router } from 'react-router-dom'; | |
import Route from './AuthRoute'; | |
import Login from './Login'; | |
import Private from './Private'; | |
export default () => | |
<Router> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.thumb { | |
display: inline-block; | |
width: 200px; | |
height: 200px; | |
margin: 5px; | |
border: 3px solid #c99; | |
background-position: center center; | |
background-size: cover; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
element 를 중간에 위치시키는 방법은 여러 가지가 있습니다. | |
element 의 너비, 높이가 고정이라면 [이건 방응형을 지원 합니다] | |
top: 50%; left: 50%; margin-top: -1 * height/2; margin-left: -1 * width/2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+function ($) { | |
/** Work Date | |
* - 2017.03.03 | |
* - Jaekwang | |
*/ | |
/** 사용 방법 | |
* [required] | |
* - data-comp="cnt_letters" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
try { | |
var a = new Uint8Array(1); | |
return; //no need | |
} catch(e) { } | |
function subarray(start, end) { | |
return this.slice(start, end); | |
} |
NewerOlder