Skip to content

Instantly share code, notes, and snippets.

View mooyoul's full-sized avatar
👨‍💻
working from somewhere

MooYeol Prescott Lee mooyoul

👨‍💻
working from somewhere
View GitHub Profile
@mooyoul
mooyoul / server.js
Created June 15, 2021 12:28
Static file service w/ Signed URL & Ranged Requests
'use strict';
const crypto = require('crypto');
const express = require('express');
const http = require('http');
const morgan = require('morgan');
const path = require('path');
const { URL } = require('url');
const app = express();
@mooyoul
mooyoul / results.md
Last active January 24, 2021 21:40
Ubiquiti UDM DPI Test
DPI Enabled? Video # Device Connectivity OS Test Method Results
Yes 1 Apple Macbook Pro 16" 2019 Late Wi-Fi macOS Big Sur 11.1 Chrome Chrome hangs over 1 minutes, reports "ERR_TIMED_OUT" or "ERR_CONNECTION_RESET"
Yes 1 Apple Macbook Pro 16" 2019 Late Wi-Fi macOS Big Sur 11.1 curl curl hangs over 1 minutes, reports error
Yes 1 Apple Macbook Pro 16" 2019 Late Wi-Fi macOS Big Sur 11.1 OpenSSL OpenSSL client hangs over 1 minutes, reports error
No 1 Apple Macbook Pro 16" 2019 Late Wi-Fi macOS Big Sur 11.1 Chrome Receive response immediately
No 1 Apple Macb
@mooyoul
mooyoul / media_extractor.ts
Created January 12, 2021 07:30
media_extractor.ts
import { makeTokenizer as makeHTTPTokenizer } from "@tokenizer/http";
import { imageSize } from "image-size";
export class MediaExtractor {
public async peek(url: string) {
const CHUNK_SIZE = 1024 * 64; // 64KByte
try {
const tokenizer = await makeHTTPTokenizer(url, {
initialChunkSize: CHUNK_SIZE * 2, // 128 KByte
@mooyoul
mooyoul / s3.ts
Created July 8, 2019 07:22
S3 Helper
import { S3 } from "aws-sdk";
import * as BbPromise from "bluebird";
import * as _ from "lodash";
export async function listAllObjects(s3: S3, bucket: string, prefix: string) {
const keys: string[] = [];
let nextContinuationToken: any;
do {
@mooyoul
mooyoul / index.js
Created May 20, 2019 09:04
Fingerprint2 with Puppeteer
'use strict';
const debug = require('debug');
const puppeteer = require('puppeteer');
const log = debug('script');
log.enabled = true;
const ALLOWED_COMPONENT_KEYS = ['canvas', 'webgl', 'audio'].reduce((hash, v) => {
hash[v] = true;
@mooyoul
mooyoul / keybase.md
Created December 13, 2018 14:43
Keybase Proof Claim

Keybase proof

I hereby claim:

  • I am mooyoul on github.
  • I am mooyoul (https://keybase.io/mooyoul) on keybase.
  • I have a public key whose fingerprint is 01D5 6573 1BC8 53CE F377 5809 6484 30A9 9AE1 8FAE

To claim this, I am signing this object:

@mooyoul
mooyoul / index.js
Created November 26, 2018 14:57
kakao
const axios = require('axios');
const { send, sendError } = require('micro');
const { URL, URLSearchParams } = require('url');
const KAKAO_APP_KEY = 'YOUR_KAKAO_APP_KEY';
const KAKAO_REDIRECT_URL = 'http://www.lvh.me:3000/authorize/callback';
const KAKAO_AUTHORIZE_ENDPOINT = (() => {
const url = new URL('https://kauth.kakao.com/oauth/authorize');
@mooyoul
mooyoul / Dockerfile
Created November 20, 2018 09:21
mecab-ko-lambda
FROM amazonlinux:2017.03.1.20170812
MAINTAINER MooYeol Lee "mooyoul.lee@vingle.net"
# Pin Openssl Version for Lambda runtime comaptiblity
RUN yum localinstall -y http://packages.us-east-1.amazonaws.com/2016.09/updates/15aa5a441a1b/x86_64/Packages/openssl-devel-1.0.1k-15.99.amzn1.x86_64.rpm && \
yum localinstall -y http://packages.us-east-1.amazonaws.com/2016.09/updates/15aa5a441a1b/x86_64/Packages/openssh-6.6.1p1-33.66.amzn1.x86_64.rpm && \
yum localinstall -y http://packages.us-east-1.amazonaws.com/2016.09/updates/15aa5a441a1b/x86_64/Packages/openssh-clients-6.6.1p1-33.66.amzn1.x86_64.rpm && \
yum install -y yum-plugin-versionlock && \
yum versionlock openssl* openssh* python* && \
@mooyoul
mooyoul / index.html
Created September 17, 2018 13:06
Youtube Upload example w/express
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Login</title>
</head>
<body>
<a href="/auth">Click here to sign in</a>
</body>
</html>
@mooyoul
mooyoul / example.html
Last active May 8, 2021 22:46
GIF to Video Migration Example
<!-- OLD GIF Markup -->
<img src="https://cdn.my-awesome-website.com/images/awesome-animation.gif" alt="My awesome animated image">
<!-- NEW Video Markup -->
<video autoplay loop muted playsinline>
<!-- Specify video sources -->
<source src="https://cdn.my-awesome-website.com/images/awesome-and-efficient-animation.mp4" type="video/mp4">
<source src="https://cdn.my-awesome-website.com/images/awesome-and-efficient-animation.webm" type="video/webm">