Skip to content

Instantly share code, notes, and snippets.

View flowkater's full-sized avatar
🏠
Working from home

flowkater flowkater

🏠
Working from home
View GitHub Profile
@flowkater
flowkater / TCA_README_KR.md
Created November 22, 2022 08:18 — forked from pilgwon/TCA_README_KR.md
TCA README in Korean

The Composable Architecture

The Composable Architecture(TCA)는 일관되고 이해할 수 있는 방식으로 어플리케이션을 만들기 위해 탄생한 라이브러리입니다. 합성(Composition), 테스팅(Testing) 그리고 인체 공학(Ergonomics)을 염두에 둔 TCA는 SwiftUI, UIKit을 지원하며 모든 애플 플랫폼(iOS, macOS, tvOS, watchOS)에서 사용 가능합니다.

@flowkater
flowkater / 0-kafka-on-k8s.md
Created April 7, 2021 07:56 — forked from dongjinleekr/0-kafka-on-k8s.md
Kafka on Kubernetes, minimal configuration

This gist describes how to create a Kafka cluster on Kubernetes with minimal effort.

Dislike to incubator/kafka helm chart, this approach uses wurstmeister/kafka Docker image or its GraalVM equivalent, dongjinleekr/kafka.

Note: This configuration is intended for dev or testing purpose; it may be used in production environment, but I can't give any guarantees in that respect.

Prerequisites

Install Zookeeper with the following helm command:

@flowkater
flowkater / main.workflow
Created February 14, 2021 15:18 — forked from pahud/main.workflow
Github Actions with Amazon EKS CI/CD
workflow "Demo workflow" {
on = "push"
resolves = ["SNS Notification"]
}
action "Build Image" {
uses = "actions/docker/cli@c08a5fc9e0286844156fefff2c141072048141f6"
runs = ["/bin/sh", "-c", "docker build -t $IMAGE_URI ."]
env = {
IMAGE_URI = "xxxxxxxx.dkr.ecr.ap-northeast-1.amazonaws.com/github-action-demo:latest"
@flowkater
flowkater / CategorySagas.js
Created April 21, 2017 12:56 — forked from jgautheron/CategorySagas.js
Redux-Saga for next.js
import {call, put, take, fork} from 'redux-saga/effects'
import {END} from 'redux-saga'
import CategoryActions, {CategoryTypes} from '../Redux/CategoryRedux'
// attempts to fetch category
export function* fetchCategoryServer (api) {
let action = yield take(CategoryTypes.CATEGORY_SERVER)
// check when it stopped
while (action !== END) {
yield fork(fetchCategoryAPI, api)
# Bulk API design
#
# resources :posts
class PostsController < ActiveController::Base
# GET /posts/1,4,50,90
# post_url([ @post, @post ])
def show_many
@posts = Post.find(params[:ids])
end

Massive file upload using JQueryUpload + Nginx + Rails + Sidekiq

The goal: Upload several files (virtually big files) to a Rails application without compromising the user experience.

Architecture

jQuery File Upload + Nginx + Rails (Carrierwave) + Sidekiq

  1. jQuery File Upload (http://blueimp.github.io/jQuery-File-Upload/)
# download and make Redis
$ wget http://redis.googlecode.com/files/redis-2.6.7.tar.gz
$ sudo tar xzf redis-2.6.7.tar.gz -C /usr/lib/
$ cd /usr/lib/redis-2.6.7
$ sudo make
# create symlinks to the /usr/local/bin
$ sudo ln -s /usr/lib/redis-2.6.7/src/redis-server /usr/local/bin/redis-server
$ sudo ln -s /usr/lib/redis-2.6.7/src/redis-cli /usr/local/bin/redis-cli