Skip to content

Instantly share code, notes, and snippets.

View project42da's full-sized avatar
🏠
Working from home

Tart Chun project42da

🏠
Working from home
  • Seoul, South Korea
View GitHub Profile
@project42da
project42da / p5_mondriaan.js
Last active March 25, 2017 08:19
p5_mondriaan
function setup() {
createCanvas(windowWidth, windowHeight);
noStroke();
}
function draw() {
var width = windowWidth * 0.476,
height = windowWidth * 0.564,
strokeSize = width * 0.02;
function Node(element){
this.element = element;
this.next = null;
}
function LList(arr){
this.arr = arr;
this.head = new Node("head");
}
@project42da
project42da / thumbnail.html
Last active July 24, 2017 13:21
youtube thumbnail mage mouseover
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>data-mouseover-src</title>
</head>
<body>
<img id="mouseoverTarget" height="138" alt="쿸방이미지" data-mouseover-src="https://i.ytimg.com/an_webp/GBlzJlWvvBw/mqdefault_6s.webp?du=3000&amp;sqp=CJS018sF&amp;rs=AOn4CLDKP9NnrbUehvcTZegjNkTKFY7L3g"
width="246" src="https://i.ytimg.com/vi/GBlzJlWvvBw/hqdefault.jpg?sqp=-oaymwEXCPYBEIoBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLBevCPOKEr-twk4Bwqxb2tBIB0LLQ">
</body>
@project42da
project42da / _nav.html.erb
Created August 25, 2017 05:16
event delegate
<!-- Button trigger modal -->
<button id="searchBtn" type="button" class="btn" data-toggle="modal" data-target="#searchModal" style="background-color: #fff; color: #000; margin: 15px; border: 0; font-size: 20px; border-radius: 0;
position: sticky;
z-index: 990;
top: 0px;
box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1);
">
<i class="fa fa-search" aria-hidden="true"></i>
</button>
<svg xmlns="http://www.w3.org/2000/svg" id="레이어_1" data-name="레이어 1" viewBox="0 0 360.18 97.41"><defs><style>.cls-1{fill:#777677;}</style></defs><title>무제-2</title><path class="cls-1" d="M572.28,377H542a1.42,1.42,0,0,0-1.41,1.42v14.8a1.42,1.42,0,0,0,1.41,1.42h11.81V413s-2.65.9-10,.9c-8.65,0-20.73-3.16-20.73-29.72s12.58-30.06,24.39-30.06c10.22,0,14.63,1.8,17.43,2.67a1.42,1.42,0,0,0,1.69-1.39L570,341.1a1.32,1.32,0,0,0-.54-1.1c-1.14-.81-8.08-4.7-25.62-4.7-20.21,0-40.93,8.6-40.93,49.92s23.73,47.48,43.73,47.48c16.56,0,26.6-7.08,26.6-7.08a1.22,1.22,0,0,0,.46-1.07V378.4A1.41,1.41,0,0,0,572.28,377Z" transform="translate(-502.91 -335.3)"/><path class="cls-1" d="M728.26,340.25a1.41,1.41,0,0,0-1.4-1.42h-17a1.42,1.42,0,0,0-1.41,1.42v32.93H681.85V340.25a1.41,1.41,0,0,0-1.41-1.42h-17a1.42,1.42,0,0,0-1.41,1.42v89.18a1.42,1.42,0,0,0,1.41,1.43h17a1.42,1.42,0,0,0,1.41-1.43V391.28h26.56l0,38.14a1.42,1.42,0,0,0,1.41,1.43h17.08a1.42,1.42,0,0,0,1.41-1.43Z" transform="translate(-502.91 -335.3)"/><ellipse class="cls-1" cx="90.54"
@project42da
project42da / NavButton.tsx
Last active March 26, 2020 06:22
react-router NavButton
import React, { MouseEvent } from "react";
import { useRouteMatch, useHistory } from "react-router-dom";
import classnames from 'classnames';
type Props = {
to: string,
replace?: boolean,
exact: boolean,
className: string,
activeClassName: string,