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 globalMachine = Machine( | |
{ | |
predictableActionArguments: true, | |
initial: 'idle', | |
context: { | |
user: null, | |
}, | |
states: { |
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 TAG = 'GlobalMachine'; | |
const AsyncStorage = localStorage; | |
Machine( | |
{ | |
id: TAG, | |
initial: 'idle', | |
context: { | |
user: null, | |
}, |
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
# If you come from bash you might have to change your $PATH. | |
export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH=$HOME/.oh-my-zsh | |
export TERM=xterm-256color | |
unsetopt nomatch | |
# Set name of the theme to load --- if set to "random", it will |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.0</real> |
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
<Profiler id="MyComponent" onRender={console.profile}> | |
<Component /> | |
</Profiler> |
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
let init = false; | |
const doSomething = () => { | |
if (!init && (init = true)) { | |
console.log('Only once'); | |
return; | |
} | |
console.log('Do something'); | |
} | |
doSomething(); // Only once |
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
/** | |
* 특정 날짜 기준으로 당월 N주차 구하기 | |
* @author [email protected] | |
*/ | |
/** | |
* 지정된 날짜가 몇 주차인지 계산하여 반환합니다 | |
* @param {Date} dateFrom 주차 계산을 위한 기준 날짜 | |
*/ |
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 PICK = 5; // 추첨 인원 | |
const picked = {}; // 중복 추첨 방지 확인용 객체 | |
const commentCount = $0.childElementCount // 전체 댓글 수 | |
const users = Array.from($0.children).map((comment) => comment.querySelector('[aria-label="Comment"]')); | |
for (let i = 0; i < PICK; i++) { | |
let idx = Math.floor(Math.random() * commentCount); | |
while (picked[idx]) { | |
idx = Math.floor(Math.random() * commentCount); | |
} |
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
:root { | |
color-scheme: light dark; | |
} | |
body { | |
width: 100px; | |
padding: 10px; | |
font-family: system-ui; | |
text-align: center; | |
} |
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> | |
<head> | |
<meta charset="UTF-8"> | |
<link rel="stylesheet" href="popup.css"> | |
<script type="module" src="popup.js"></script> | |
</head> | |
<body> | |
<strong>Apple Symbol</strong> | |
<span></span> |
NewerOlder