Skip to content

Instantly share code, notes, and snippets.

View lqez's full-sized avatar
:octocat:
Doing something on net

Hyunwoo Park lqez

:octocat:
Doing something on net
View GitHub Profile
@lqez
lqez / vimrc2022.md
Created July 25, 2022 06:49
VIMRC 2022 발표 자료 모음
@lqez
lqez / machine.js
Created August 16, 2021 15:02
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@lqez
lqez / getProperColor.js
Last active September 11, 2019 07:56
get proper text color for given background color (even with true-background color for transparency background)
export function properTextColor(backColor, trueBackColor) {
function getRGBAfromHEX(color) {
color = color.slice(1).replace(color.length < 5 && /./g, '$&$&');
color = parseInt(color.length > 6 ? color : color + 'FF', 16);
return {
r: color >>> 24,
g: color >>> 16 & 255,
b: color >>> 8 & 255,
a: color & 255
@lqez
lqez / check_whiteimages.go
Last active June 10, 2019 06:55
Find almost 'white' images in the working directory
package main
import (
"os"
"fmt"
"image"
"log"
"path/filepath"
"sync"
<div class="Select-menu-outer">
<div class="Select-menu" id="react-select-5--list" role="listbox" tabindex="-1">
<div class="Select-option is-focused" role="option" aria-label="Large Datasets Data Mining" id="react-select-5--option-0">Large Datasets Data Mining</div>
<div class="Select-option" role="option" aria-label="(Early Stage) Customer Development" id="react-select-5--option-1">(Early Stage) Customer Development</div>
<div class="Select-option" role="option" aria-label="*Nix" id="react-select-5--option-2">*Nix</div>
<div class="Select-option" role="option" aria-label=".NET" id="react-select-5--option-3">.NET</div>
<div class="Select-option" role="option" aria-label="2D Art" id="react-select-5--option-4">2D Art</div>
<div class="Select-option" role="option" aria-label="2d Animation" id="react-select-5--option-5">2d Animation</div>
<div class="Select-option" role="option" aria-label="3D" id="react-select-5--option-6">3D</div>
<div class="Select-option" role="option" aria-label="3D Animation" id="react-sel
@lqez
lqez / a_to_z.py
Last active March 10, 2019 14:04
From a to z
import getch
import time
print("Type from a to z.")
print("Timer will begin after typing the first letter 'a'.")
print("Quit: Ctrl + C")
while True:
c = ord('a')
@lqez
lqez / dropbox.gs
Last active May 12, 2021 06:38
An example of using Dropbox API in Google Script
var token = '<PUT_YOUR_TOKEN_HERE>';
function dropboxAPI(path, data) {
var response = UrlFetchApp.fetch('https://api.dropboxapi.com/2/' + path, {
'method': 'POST',
'payload': JSON.stringify(data),
'headers': {
'Authorization': 'Bearer ' + token,
'Content-Type': 'application/json'
},
@lqez
lqez / summernote-lite.css
Created November 30, 2018 03:41
Beautified summernote-lite.css
@font-face{font-family:"summernote";font-style:normal;font-weight:normal;src:url("./font/summernote.eot?4c7e83314b68cfa6a0d18a8b4690044b");src:url("./font/summernote.eot?4c7e83314b68cfa6a0d18a8b4690044b#iefix") format("embedded-opentype"),
url("./font/summernote.woff?4c7e83314b68cfa6a0d18a8b4690044b") format("woff"),
url("./font/summernote.ttf?4c7e83314b68cfa6a0d18a8b4690044b") format("truetype")
}
[class^="note-icon-"]:before,
[class*=" note-icon-"]:before {
display: inline-block;
font: normal normal normal 14px summernote;
font-size: inherit;
-webkit-font-smoothing: antialiased;
@lqez
lqez / margin.html
Created October 23, 2018 13:58
Why we need margin-left for center-aligned text
<html>
<head>
<style>
body {
margin: 0;
}
h1 {
letter-spacing: 1em;
margin: 0;
@lqez
lqez / verify_elb_https.py
Created May 8, 2015 02:17
Verify ELB's https connection
import boto.route53
import boto.ec2.elb
import requests
region = 'ap-northeast-1'
# Get all records from Route53
r53_conn = boto.route53.connect_to_region(region)
zones = r53_conn.get_zones()