Skip to content

Instantly share code, notes, and snippets.

View dance2die's full-sized avatar
🐰
Working

Sung M. Kim dance2die

🐰
Working
View GitHub Profile
Short-circuit? Short-circuits on? Fulfilled on? Rejected on?
Promise.all Yes First rejected promise All promise fulfilled First rejected promise
Promise.allSettled No N/A Always N/A
Promise.race Yes First settled First promise fulfilled First rejected promise
Promise.any Yes First fulfilled First promise fulfilled All rejected promises
@dance2die
dance2die / TamperMonkey - Expand all TeamBlind.com comments.js
Created March 19, 2023 22:09
Expand all TeamBlind.com comemnts on load because nobody got time to click on "more" button
// ==UserScript==
// @name Team Blind - Expand all comments
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Expand all comments on load on TeamBlind.com
// @author You
// @match https://www.teamblind.com/post/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @grant none
// ==/UserScript==
import React from "react";
import Chart from "./Chart";
import "frappe-charts/dist/frappe-charts.min.css";
// https://github.com/tobiaslins/frappe-charts-react-example
const GraphView = ({ data }) => <Chart title="Graph data" data={data} />;
export default GraphView;
@dance2die
dance2die / usersetting.json
Created January 19, 2018 02:23
vs code - associate EJS file with HTML formatter
"files.associations": {
"*.ejs": "html"
},
chrome.tabs.query(
{ active: true, windowId: chrome.windows.WINDOW_ID_CURRENT },
function(tabs) {
const { id: tabId } = tabs[0].url;
let code = `document.querySelector('h1')`;
// http://infoheap.com/chrome-extension-tutorial-access-dom/
chrome.tabs.executeScript(tabId, { code }, function (result) {
// result has the return value from `code`
@dance2die
dance2die / 1. TL;DR.md
Last active June 20, 2022 02:25
A new INK project with "create-ink-app"

Set up an INK project

# Create a folder
mkdir ink3

# Go to the folder
cd ink3

# Create the ink project
@dance2die
dance2die / 01 - autoguluon.md
Last active June 5, 2022 16:29
AWS autoguluon setup troubleshoot

Installation with official doc

https://auto.gluon.ai/stable/index.html#

pip3 install -U pip
pip3 install -U setuptools wheel

# CPU version of pytorch has smaller footprint - see installation instructions in
# pytorch documentation - https://pytorch.org/get-started/locally/
@dance2die
dance2die / tailwind.config.js
Created March 25, 2022 00:26
sung.codes.next
/* eslint-disable @typescript-eslint/no-var-requires */
const { BlockList } = require("net");
const twColors = require("tailwindcss/colors");
const defaultTheme = require("tailwindcss/defaultTheme");
/**
* Material Design breakpoints
* @see https://material.io/design/layout/understanding-layout.html#layout-anatomy
* @see https://tailwindcss.com/docs/breakpoints
*/
@dance2die
dance2die / Conditional.md
Created February 16, 2022 03:36
Clean Coding Practice - Self Note to track my thoughts.
  1. Compare numbers in a sequence. e.g.
# ok
3 > 2 > 1
1 < 2 < 3
# not
1 < 3 > 2
# not