Skip to content

Instantly share code, notes, and snippets.

View ChangJoo-Park's full-sized avatar
:octocat:
๐ŸŒฑ

ChangJoo Park(๋ฐ•์ฐฝ์ฃผ) ChangJoo-Park

:octocat:
๐ŸŒฑ
View GitHub Profile
@iam-hussain
iam-hussain / default HTTP
Last active March 6, 2025 15:42
Serve nextJS app from a port through NGINX reverse proxy HTTP and HTTPS
# Serve nextJS app from a port through NGINX reverse proxy (HTTP)
# Path: /etc/nginx/sites-available/default
# Default server configuration for HTTP
server {
server_name www.DOMAINNAME.com DOMAINNAME.com;
# Serve any static assets with NGINX
location /_next/static {
alias /home/ubuntu/PROJECT_FOLDER/.next/static;
@rohan20
rohan20 / flutter_button_tap_to_shrink_effect.dart
Last active February 26, 2025 11:19
Flutter button tap to shrink animation effect
// Interactive Demo: https://dartpad.dev/b1a15c09bbb8d18c4caa9e8c41a108c0?null_safety=true
// GIF Demo: See first comment below
import 'package:flutter/material.dart';
void main() {
runApp(DemoApp());
}
class DemoApp extends StatelessWidget {
@andrzejchm
andrzejchm / expandable_page_view.dart
Last active February 8, 2024 10:53
ExpandablePageView is a PageView that will adapt its height to the currently displayed child. with animation!
import 'package:flutter/material.dart';
class ExpandablePageView extends StatefulWidget {
final List<Widget> children;
const ExpandablePageView({
Key key,
@required this.children,
}) : super(key: key);
@hkulekci
hkulekci / size.md
Last active June 23, 2023 11:58
Elasticsearch Nested Array Object Size Aggregation
# images field type is nested
GET products/_search
{
  "track_total_hits": true, 
  "size": 0, 
  "aggs": {
    "counts": {
      "terms": {
 "script": "params['_source']['images'].size()",
@lifeart
lifeart / component.js
Created February 6, 2020 14:42
Ember Cp Validations Octane
import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
import Object from "@ember/object";
import { reads } from "@ember/object/computed";
import { validator, buildValidations } from "ember-cp-validations";
import { getOwner } from "@ember/application";
const Validations = buildValidations({
billing_first_name: {
descriptionKey: "form.fields.billing_first_name",
@philoskim
philoskim / vscode-on-ubuntu.adoc
Last active April 1, 2025 04:26
Ubuntu์—์„œ Visual Studio Code ํ•œ๊ธ€ ์ž…๋ ฅ ์•ˆ๋˜๋Š” ํ˜„์ƒ ํ•ด๊ฒฐ๋ฒ•

Ubuntu์—์„œ Visual Studio Code ํ•œ๊ธ€ ์ž…๋ ฅ ์•ˆ๋˜๋Š” ํ˜„์ƒ ํ•ด๊ฒฐ๋ฒ•

Ubuntu 19.10์—์„œ Visual Studio Code ์‚ฌ์šฉ ์ค‘ ํ•œ์˜ ์ „ํ™˜ํ‚ค๋ฅผ ๋ˆ„๋ฅด๊ณ  ํ•œ๊ธ€์„ ์ž…๋ ฅํ•˜๋ ค ํ–ˆ๋”๋‹ˆ, ํ•œ๊ธ€ ์ž…๋ ฅ์ด ์•ˆ๋˜๊ณ  ์˜์–ด๋งŒ ๊ณ„์† ์ž…๋ ฅ๋˜๋Š” ํ˜„์ƒ์„ ๋ฐœ๊ฒฌํ–ˆ๋‹ค. ๊ทธ๋ž˜์„œ ์ธํ„ฐ๋„ท์„ ๊ฒ€์ƒ‰ํ•ด ๋ดค๋”๋‹ˆ snap ํ˜•์‹์˜ Visual Studio Code๋ฅผ ์„ค์น˜ํ•œ ๊ฒฝ์šฐ์—, Ubuntu์˜ ์ž…๋ ฅ๊ธฐ์ธ IBus์™€ ์ถฉ๋Œํ•ด์„œ ์ผ์–ด๋‚˜๋Š” ํ˜„์ƒ์ด๋ผ๊ณ  ํ•œ๋‹ค. ๊ทธ๋Ÿฐ๋ฐ .deb ํ˜•์‹์˜ Visual Studio Code๋ฅผ ์„ค์น˜ํ•œ ๊ฒฝ์šฐ์—๋Š” ๊ทธ๋Ÿฐ ๋ฌธ์ œ๊ฐ€ ์—†๋‹ค๋Š” ์‚ฌ์‹ค์„ ์•Œ๊ฒŒ ๋˜์–ด, ์„ค์น˜ํ•ด ๋ดค๋”๋‹ˆ ํ•œ๊ธ€ ์ž…๋ ฅ์ด ์ •์ƒ์ ์œผ๋กœ ์ด๋ฃจ์–ด์ง€๋Š” ๊ฒƒ์„ ํ™•์ธํ–ˆ๋‹ค. ๊ทธ๋ž˜์„œ ๊ฐ™์€ ๋ฌธ์ œ๋ฅผ ๊ฒช๋Š” ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•ด ์ด ํ•ด๊ฒฐ๋ฒ•์„ ๊ณต์œ ํ•˜๊ณ ์ž ํ•œ๋‹ค.

  • ๋จผ์ € ์ด๋ฏธ ์„ค์น˜๋˜์–ด ์žˆ๋Š” snap ํ˜•์‹์˜ Visual Studio Code๋ฅผ ์ œ๊ฑฐํ•œ๋‹ค.

@elisar4
elisar4 / main.dart
Last active June 28, 2022 02:25
Flutter iOS Keyboard Animation
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(
primarySwatch: Colors.blue,
@rabelais88
rabelais88 / docker-swarm.md
Created November 10, 2019 05:18
์Šคํƒ€ํŠธ์—…์— traefik + docker-swarm์„ ์ถ”์ฒœํ•˜๋Š” ์ด์œ 

์Šคํƒ€ํŠธ์—…์— traefik + docker-swarm์„ ์ถ”์ฒœํ•˜๋Š” ์ด์œ 

  • Traefik: Reverse-proxy router
  • Docker-swarm: Docker-supported orchestrator

์™œ Docker-Swarm์ธ๊ฐ€?

  • kubernetes(์ดํ•˜ k8) ๋Š” ๋ฌด๊ฒ๊ณ  ๋А๋ฆฌ๋‹ค. docker-swarm(์ดํ•˜ DS) ์€ docker ์ตœ์‹ ๋ฒ„์ „์— ๊ธฐ๋ณธ์œผ๋กœ ํƒ‘์žฌ๋˜์–ด ๋‚˜์˜จ๋‹ค. ๋˜ํ•œ helm์ด๋‚˜ ๋ณ„๋„์˜ ๊ด€๋ฆฌ cli(kubeadm, kubectl)๋ฅผ ์„ค์น˜ํ•  ํ•„์š”๊ฐ€ ์—†๋‹ค.

  • k8 ์€ ์„ธํŒ…๋„ ์–ด๋ ต๋‹ค: ์„ธํŒ…ํ•˜๊ธฐ๊ฐ€ ์›Œ๋‚™ ๊นŒ๋‹ค๋กœ์›Œ ์‹ค์ œ๋กœ ์šด์˜ํ•˜๊ธฐ ์ ์ ˆํ•œ ๊ฒฝ์šฐ๋Š” devops ํŒ€์„ ๊ฐ€์ง„ ์ตœ์†Œ 20๋ช… ์ด์ƒ์˜ ๋Œ€๊ทœ๋ชจ ์‚ฌ์ด์ฆˆ ํŒ€์ด๋‹ค. ํ•œ ๋ช…์ด ์ž‘์—…ํ•˜๋Š” ๊ฒƒ์ด ์•„์ฃผ ๋ถˆ๊ฐ€๋Šฅํ•œ ๊ฒƒ์€ ์•„๋‹ˆ์ง€๋งŒ, ๊ธด๊ธ‰์ˆ˜์ •์‹œ์—๋Š” ๋งŽ์ด ์œ„ํ—˜ํ•ด์งˆ ์ˆ˜ ์žˆ๋‹ค. ์ด์›์ด 10๋ช…์ด ๋˜์ง€ ์•Š๋Š” ์šฐ๋ฆฌํŒ€ ๊ฐ™์€ ๊ฒฝ์šฐ๋Š” ํ•œ ์‚ฌ๋žŒ์ด ๊ธ‰ํ•˜๊ฒŒ ๊ธฐ๋Šฅ์ˆ˜์ •์„ ํ•ด์•ผ๋  ์ผ์ด ๋งŽ๋‹ค.

@naviat
naviat / kubectl-cheatsheet.org
Last active December 8, 2020 21:42
Kubectl cheatsheet list

Kubectl Kubernetes CheatSheet

Common Commands

NameCommand
Run curl test temporarilykubectl run --rm mytest --image=yauritux/busybox-curl -it
import React, {Component} from 'react'
import { Container, Header, HeaderContent, Grid, GridColumn } from 'semantic-ui-react'
class Main extends Component {
constructor (props) {
super(props)
this.state = {
hello: 'heeeeeeello',
browser: {height: window.innerHeight, width: window.innerWidth},
headerHeight: 50
}