Skip to content

Instantly share code, notes, and snippets.

View devheedoo's full-sized avatar
☺️
React + TypeScript

heedo devheedoo

☺️
React + TypeScript
  • SalesMap
  • Seoul, South Korea
View GitHub Profile
@devheedoo
devheedoo / vscodeSettingsChoco.json
Last active December 14, 2021 19:54
Personal VSCode settings
{
"terminal.external.osxExec": "iTerm.app",
"terminal.integrated.fontFamily": "Hack",
"terminal.integrated.defaultProfile.osx": "zsh",
"editor.minimap.enabled": false,
"editor.tabSize": 2,
"editor.insertSpaces": true,
"typescript.preferences.quoteStyle": "single",
"javascript.preferences.quoteStyle": "single",
"editor.defaultFormatter": "esbenp.prettier-vscode",
git branch | tr -s '\n' ' ' | tr -s '*' ' ' | xargs git branch -D
const likedVideoElements = document.querySelectorAll('ytd-playlist-video-renderer.ytd-playlist-video-list-renderer yt-icon.ytd-menu-renderer');
for (let i=0; i<likedVideoElements.length; i++) {
setTimeout(() => {
likedVideoElements[i].click();
setTimeout(() => { document.querySelectorAll('yt-formatted-string.ytd-menu-service-item-renderer')[3].click(); }, 200);
}, i * 500);
}
@devheedoo
devheedoo / asyncSum.js
Created August 17, 2020 23:41
sequential async sum with reduce
const numbers = [2, 5, 1, 3, 4];
function asyncNumber (n) {
return new Promise((resolve, reject) => { resolve(n) });
}
async function asyncSum (numbers) {
return numbers.reduce(async (prevSum, n) => {
const sum = await prevSum;
return asyncNumber(sum + n);
@devheedoo
devheedoo / gists.md
Created July 3, 2020 02:23
Gists while working

Gists

Temp

  • connect to media_dev: $ ssh -i ~/Downloads/blend_keypair.pem ubuntu@15.164.44.190
  • clean yarn cache: $ yarn cache clean
  • check connected android device: $ adb devices
  • build & run RN android on release version: $ react-native run-android --variant=release

Git

Install

Cocoapods

Uninstall

> sudo gem uninstall cocoapods
@devheedoo
devheedoo / exceptAge.js
Last active February 17, 2020 09:36
Get object except some properties
const obj = {
a: {id: 'aa', name: 'aaa', age: 1},
b: {id: 'bb', name: 'bbb', age: 2},
c: {id: 'cc', name: 'ccc', age: 3},
}
// get object except 'age' property
const exceptAge = ({ age, ...rest }) => rest;
R.map(exceptAge, obj);
@devheedoo
devheedoo / semantic-commit-messages.md
Created February 17, 2020 02:01 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@devheedoo
devheedoo / React Native Easings
Created November 28, 2019 13:21 — forked from dabit3/React Native Easings
React Native Easing animations
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
Text,
View,
Easing,
Animated,
@devheedoo
devheedoo / goToMostPointedAnswerInGithubIssue.js
Created November 7, 2019 08:48
Go to the most pointed answer in GitHub Issue
function goToMostPointedAnswerInGithubIssue() {
const pointsWithIndex = [];
const gEmojis = document.querySelectorAll('g-emoji');
gEmojis.forEach((gEmoji, index) => {
// find +1 point emoji elements
if (gEmoji.getAttribute('alias') === '+1') {
const splitedHtml = gEmoji.parentElement.innerHTML.split('</g-emoji>');
const point = Number(splitedHtml[splitedHtml.length - 1].trim());
if (point > 0) {
pointsWithIndex.push({ point, index });