Skip to content

Instantly share code, notes, and snippets.

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

SeulGi Choi(Chase) cs09g

🏠
Working from home
View GitHub Profile
@cs09g
cs09g / privacy-policy.md
Last active November 22, 2023 02:25 — forked from arjunsk/privacy-policy.md
Android App Privacy Policy

Privacy Policy

Introduction

Thank you for using my software! This document is the main privacy policy for 주차요금계산기 Android applications. I respects your privacy rights and care about protecting your information collected by my apps.

What information are eventually collected

  • No information is collected in the server. This is a fully offline app, with no ad's.
@cs09g
cs09g / homebrew-permissions-issue.md
Created October 12, 2020 04:13 — forked from irazasyed/homebrew-permissions-issue.md
Homebrew: Permissions Denied Issue Fix (OS X / macOS)

Homebrew Permissions Denied Issues Solution

sudo chown -R $(whoami) $(brew --prefix)/*

@cs09g
cs09g / worker.js
Created August 12, 2020 23:53
Web Worker without creating new .js file
const workerScript = `
// your script here
`;
const blob = new Blob([
workerScript,
], {
type: "text/javascipt"
});
const worker = new Worker(window.URL.createObjectURL(blob));
@cs09g
cs09g / parseCSV.js
Last active June 16, 2020 13:36
[nodejs] parsing remote csv (feat. csv-parser)
const http = require("http");
const csv = require("csv-parser");
const csvPath = "http://remoteurl/some.csv";
const results = [];
http.get(csvPath,
(response) => {
response
.pipe(csv())
@cs09g
cs09g / antpath.js
Last active January 3, 2023 20:38
ant path with Mapbox-gl-js https://jsfiddle.net/cs09g/vtmLd6g9/
let dash = [3, 3]; // your input; dash you want to animate
let speed = 0.5; // your input; speed rate
let dashArraySeq = createDashArraySeq(dash, speed); // `dashArraySeq` contains dash arrays you can use
function createDashArraySeq(dash, speed = 1) {
let dashArraySeq = [dash];
for (let i = speed, len = dash[0] + dash[1]; i < len; i += speed) {
const arr = [];
if (i <= len - dash[0]) {
arr.push(0, i, dash[0], dash[1] - i);
@cs09g
cs09g / camel2kebab.js
Created February 18, 2020 07:39
Convert Camel case to Kebab case
/*
* convert camel case string to kebab case string
* e.g. camelCaseString => camel-case-string
*
* note:
* It doesn't support for weird camel case such as "HTMLElement"
* The first letter of camel case string should be with lower case.
*/
function convertStringCamelToKebab(camel) {
return camel.split("").reduce((acc, char) => [...acc, char < "a" ? `-${char.toLowerCase()}` : char], []).join("");
@cs09g
cs09g / simulate.js
Created December 9, 2019 07:05
Mouse/Touch Event Simulation
/**
* @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 July 23, 2019 08:01 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

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 February 19, 2019 04:10 — forked from roachhd/README.md
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

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 September 13, 2018 01:27
vanilla script next from jquery next
/*
* 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++) {