Skip to content

Instantly share code, notes, and snippets.

View 1ambda's full-sized avatar
🦁
in the jungle

Kun 1ambda

🦁
in the jungle
View GitHub Profile
@dlxotn216
dlxotn216 / Auditing.md
Last active April 26, 2024 07:48
Spring data jpa의 Audit 기능과 Spring data envers

Application을 구현하면서 대부분 요구사항에 명시되는 기능이 변경사항 추적이다. 이때 변경 사항을 추적하기 위해 필요한 데이터는 누가 언제 생성하였으며, 누가 언제 변경하였는지 그리고 해당 데이터의 시점에 따른 변경 이력이다.

전통적인 Mybatis를 이용하는 Spring MVC와 같은 프레임워크에선 AOP를 이용한다던지 또는 Mapper에서 Insert, Update, Delete 쿼리를 실행할 때마다 History table에 Insert하는 쿼리를 같이 실행 하도록 처리하는 등의 방법이 있다. 이러한 방법을 사용할 때 생각보다 개발 일정을 지연시키는 요소가 많다.

예를들어 History 테이블의 PK를 잘못 지정하여 발생하는 예외나 DBMS마다 상이한 다량의 쿼리문 실행 문법 등이다. 전자는 개발 단계보다 UAT 기간 등에서 발견하기 쉬울 뿐더러 모든 대상 테이블을 돌면서 Schema를 변경해야 하는 번거로움이 있다.

Feature Store

Uber Michelangelo

https://eng.uber.com/michelangelo/

Finding good features is often the hardest part of machine learning and we have found that building and managing data pipelines is typically one of the most costly pieces of a complete machine learning solution.

A platform should provide standard tools for building data pipelines to generate feature and label data sets for training (and re-training) and feature-only data sets for predicting. These tools should have deep integration with the company’s data lake or warehouses and with the company’s online data serving systems. The pipelines need to be scalable and performant, incorporate integrated monitoring for data flow and data quality, and support both online and offline training and predicting. Ideally, they should also generate the features in a way that is shareable across teams to reduce duplicate work and increase data quality. They should also provide strong guard rails and controls to encourage and empower users to adop

@dohoons
dohoons / base.css
Last active June 23, 2020 01:19
Basic Style
/* Basic Style START (dohoons, 200803, 200908, 201011, 201106, 201305, 201607, 201802, 201908, 202006) */
html, body { height:100%; -webkit-text-size-adjust:none; font-family:dotum,"돋움",Arial,Sans-serif; font-size:12px; }
body, input, select, button, textarea, h1, h2, h3, h4, h5, h6, table { line-height:1.5; font:inherit; color:inherit; }
html, body, div, form, input, select, button, textarea, legend, fieldset, figure, h1, h2, h3, h4, h5, h6, ul, ol, dl, li, dt, dd, blockquote, address, p, th, td, caption { margin:0; padding:0; }
ol, ul, li { list-style:none; }
img, fieldset { vertical-align:middle; border:0 none; }
input, select, textarea { vertical-align:middle; resize:none; }
input[type=text], input[type=password], input[type=submit], input[type=tel], input[type=number], input[type=email], input[type=url], input[type=search], textarea { -webkit-appearance:none; border-radius:0; }
button { border:0 none; background:transparent; cursor:pointer; }
button::-moz-focus-inner { border: 0; }
@valdemon
valdemon / config.yml
Last active May 9, 2019 13:11
Enable ECR (AWS) registries for Spinnaker with Kubernetes provider
# A part of the Halyard config file declaring the ECR registries.
# There can be multiple registries, each in different AWS account.
# In this example there are 3 "stages" accounts - dev, stage & live.
# NOTE: The declared password files must exist and provide valid base64 encoded values,
# otherwise Halayrd will endup with an exception during deployment.
# The values can be fake, they will be updated later by the Kubernetes Job (see 2-nd attached file).
# NOTE: replace ${YOUR_DEV_AWS_ACCOUNT_ID} ${YOUR_DEV_AWS_REGION}
# with appropriate values (same for STAGE & LIVE).
dockerRegistry:
@miticojo
miticojo / k8s-centralized-logging.yaml
Last active October 21, 2019 09:43
K8S - Centralized logging with ELK and Fluentd (kubernetes >= 1.6)
apiVersion: v1
kind: ServiceAccount
metadata:
name: elasticsearch-logging
namespace: kube-system
labels:
k8s-app: elasticsearch-logging
version: v1
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
@brianredbeard
brianredbeard / get_token.md
Last active October 3, 2022 02:18
aws, sts, and bash

About

AWS provides a mechanism for temporarily assuming another role within their API system. While it is not a technically hard process it can be convoluted and hard to understand. This document aims to both make it easier to follow along with as well as give an in depth explanation of some of the underpinnings of the Bourne Again Shell (aka BASH) which can make this easier to utilize on a day to day basis.

Explanation

Below is an overexplained version of the following process:

  1. Using credentials stored in ~/.aws/credentials as a "profile" which are then understood by the AWS command line tools
  2. Using those AWS credentials, temporarily assume a role using the AWS Security Token Service (STS) to get temporary
version: '2'
services:
etcd1:
image: quay.io/coreos/etcd:v3.1.7
restart: always
ports:
- 23791:2379
- 23801:2380
environment:
@dfdgsdfg
dfdgsdfg / Logger.js
Last active April 21, 2017 06:23
Simple logger for browser side
/* eslint-disable no-console, consistent-return */
const logger = (function Logger() {
const prefix = "[MYAPP]";
const logLevelPreset = [
'SILENT',
'ERROR',
'WARN',
'INFO',
'DEBUG',
@mgoodness
mgoodness / helm-rbac.md
Last active October 30, 2021 17:04
Helm RBAC setup for K8s v1.6+ (tested on minikube)
kubectl -n kube-system create sa tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller
@tomodian
tomodian / firehose-to-athena.js
Created February 28, 2017 15:22
Firehose to Athena
'use strict';
const aws = require('aws-sdk');
const s3 = new aws.S3({ apiVersion: '2006-03-01' });
exports.handler = (event, context, callback) => {
const key = decodeURIComponent(event.Records[0].s3.object.key);
const meta = key.split('/');