Skip to content

Instantly share code, notes, and snippets.

View Hwan-seok's full-sized avatar
👿

Hwanseok Kang (Barth) Hwan-seok

👿
  • S
  • Saarbrücken, Germany
  • 04:22 (UTC +02:00)
View GitHub Profile
@Hwan-seok
Hwan-seok / I'm an early 🐤
Last active October 29, 2020 00:26
I'm an early 🐤
🌞 Morning 88 commits ████▋░░░░░░░░░░░░░░░░ 22.5%
🌆 Daytime 154 commits ████████▎░░░░░░░░░░░░ 39.4%
🌃 Evening 93 commits ████▉░░░░░░░░░░░░░░░░ 23.8%
🌙 Night 56 commits ███░░░░░░░░░░░░░░░░░░ 14.3%
@Hwan-seok
Hwan-seok / dockerfile
Last active December 5, 2020 17:35
Nodejs dockerfile best practice when using build(typescript/webpack)
# Author. Hwanseok Kang, tttkhs96@gmail.com
FROM node:14.15.1-alpine3.12 AS build
RUN apk update && apk add curl bash
RUN curl -sfL https://gobinaries.com/tj/node-prune | bash -s -- -b /usr/local/bin
COPY package*.json /build/
WORKDIR /build
export const debouncer = (
func: (...args: unknown[]) => unknown,
params: { [key: string]: unknown },
debounceMilliseconds: number,
debounceId: string,
): unknown => {
const lastExecuteTimeFromString: string = window.localStorage.getItem(debounceId)
const lastExecuteTime = _.parseInt(lastExecuteTimeFromString)
const currentTime = new Date().getTime()
@Hwan-seok
Hwan-seok / main.dart
Last active March 2, 2022 08:03
StateBroadcaster
import 'dart:async';
void main() {
final broadcaster = StateBroadcaster();
}
class StateBroadcaster {
final _sinkMap = <Type, StreamController<dynamic>>{};
void notify<T>(T value) {
@Hwan-seok
Hwan-seok / main.dart
Last active April 24, 2023 06:22
Prints all formatted dateFormats
import 'package:intl/date_symbol_data_local.dart';
import 'package:intl/intl.dart';
test('formats', () async {
final time = DateTime(2022, 1, 1, 13, 12);
for (final locale in DateFormat.allLocalesWithSymbols()) {
final format = DateFormat.jm(locale);
final formattedTime = format.format(time);
print('$locale: $formattedTime');
brew install gnupg
curl -sSL https://get.rvm.io | bash
rvm list known
rvm install ruby-3.3.0 --with-openssl-dir=$(brew --prefix openssl)
rvm alias create default 3.3.0
## gem install cocoapods