Skip to content

Instantly share code, notes, and snippets.

Avatar
⚙️
Creating Value

Unna Kim UHKim

⚙️
Creating Value
View GitHub Profile
@UHKim
UHKim / example.ios.yml
Last active Jul 17, 2021
GitHub Action iOS build workflow example
View example.ios.yml
name: Example iOS Build
on:
push:
branches:
- development
jobs:
build-ios:
runs-on: macos-latest
@UHKim
UHKim / exampleDist.sh
Last active Jan 27, 2020
exampleDist.sh
View exampleDist.sh
#!bin/bash
# .env의 위치
export ENV_FILE=ENVIRONMENT_FILE_HERE
# build가 끝난 폴더의 위치 (ex. ./dist)
export BUILD_FOLDER=BUILD_FOLDER_HERE
# s3 bucket 및 폴더의 위치
export S3_BUCKET_DESTINATION=s3://bucket_name/destination
# Invalidate 할 폴더의 위치
export CDN_DISTRIBUTION_ID=CLOUDFRONT_DIST_HERE
@UHKim
UHKim / callbackToPromise.js
Last active Jan 16, 2020
Callback to Promise
View callbackToPromise.js
import {someApi} from "someApi"
const somePromiseFct = (params) => {
return new Promise((resolve, reject) => {
//... ex. callbackFct는 callback으로 data를 준다고 합니다
someApi.callbackFct(params, (data, error) => {
//... data를 처리
if (error) return reject(error);
resolve(data);
})
@UHKim
UHKim / hls_s3_archive.py
Last active Jan 15, 2020
Functions for ffmpeg bundling
View hls_s3_archive.py
import sys
import subprocess
import os
import video_cmds
task_id = sys.argv[1]
src_s3_path = sys.argv[2]
dst_s3_path = sys.argv[3]
file_max_length = 300
@UHKim
UHKim / router.ts
Last active Sep 8, 2019
Serverless + sls-http + koa example
View router.ts
// written typescript
import { APIGatewayEvent, Context, Handler } from "aws-lambda";
import Koa from "Koa";
import Router from "koa-router";
import serverlessHttp from "serverless-http";
// for serverless offline
export interface SlsExtendableOfflineEvent extends APIGatewayEvent {
@UHKim
UHKim / nginx-rtmp.conf
Created Oct 12, 2018
nginx-rtmp config example
View nginx-rtmp.conf
rtmp {
server{
listen 1935;
chunk_size 256;
buflen 100ms;
application live {
live on;
# dash on;
@UHKim
UHKim / P5DynamicLoader.js
Created Oct 2, 2018
Connecting p5js and React js
View P5DynamicLoader.js
// Uses dynamic component loading feature of nextjs
import dynamic from 'next/dynamic';
import sketch from './BGSketch'; // Sketch to load dynamically
import css from '../styles.less'
const P5DynamicLoader = dynamic(import('./P5Wrapper'), {
ssr: false,
loading: () => <div className={css.backgroundCanvas}>Loading Background...</div>,
});