Skip to content

Instantly share code, notes, and snippets.

⚡️
Pro-Prototyper, Fast-Follower

SeulGi Choi(Chase) cs09g

⚡️
Pro-Prototyper, Fast-Follower
Block or report user

Report or block cs09g

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cs09g
cs09g / simulate.js
Created Dec 9, 2019
Mouse/Touch Event Simulation
View simulate.js
/**
* @desc It triggers mouse event.
* @param {HTMLElement} element target DOM element
* @param {string} type type of event
* @param {number} x clientX of event
* @param {number} y clientY of event
*/
export function simulateEvent(element, type, x, y) {
const mouseEvent = new MouseEvent(type, {
screenX: 0,
@cs09g
cs09g / what-forces-layout.md
Created Jul 23, 2019 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.
View what-forces-layout.md

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
@cs09g
cs09g / README.md
Created Feb 19, 2019 — forked from roachhd/README.md
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻
View README.md

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄

@cs09g
cs09g / next.js
Last active Sep 13, 2018
vanilla script next from jquery next
View next.js
/*
* It returns next element sibling
* works like jquery's `next` but combined selector is not supported
*
*/
var next = function(target, selector) {
var siblings = target.parentNode.children;
var nextElementSibling;
for (var i = Array.prototype.indexOf.call(siblings, target) + 1; i < siblings.length; i++) {
@cs09g
cs09g / prev.js
Last active Sep 13, 2018
vanilla script prev from jquery prev
View prev.js
/*
* It returns previous element sibling
* works like jquery's `prev` but combined selector is not supported
*
*/
var prev = function(target, selector) {
var siblings = target.parentNode.children;
var previousElementSibling;
for (var i = Array.prototype.indexOf.call(siblings, target) - 1; i >= 0; i--) {
@cs09g
cs09g / pinterest_grid.js
Last active Oct 2, 2016
Pinterest style grid
View pinterest_grid.js
/*
Pinterest Grid Plugin
Copyright 2014 Mediademons
@author smm 16/04/2014
@modifier cs09g 02/10/2016
@comment:
In the original source, the class of grid element was updated all the time when the page is resized or not.
I added one condition to check the page is resized.
Referenced from: http://www.jqueryscript.net/layout/Simple-jQuery-Plugin-To-Create-Pinterest-Style-Grid-Layout-Pinterest-Grid.html
@cs09g
cs09g / gist:c5c265cfa14309901ce448d8a320a40a
Created May 2, 2016
일반 폼을 JSON 을 위한 형태로 변형하기
View gist:c5c265cfa14309901ce448d8a320a40a
{
a0: {b0: c0},
a1: b1,
a2: {b2: {c1: d0, c2: d1}}
}
이런 형태의 JSON 을 보내야 하고, 입력 form을 다음과 같이 설정하였을 때 사용하기 위한 코드이다.
<input id="a0.b0">
<input id="a1">
<input id="a2.b2.c1">
<input id="a2.b2.c2">
You can’t perform that action at this time.