# images field type is nested
GET products/_search
{
"track_total_hits": true,
"size": 0,
"aggs": {
"counts": {
"terms": {
"script": "params['_source']['images'].size()",
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class ExpandablePageView extends StatefulWidget { | |
final List<Widget> children; | |
const ExpandablePageView({ | |
Key key, | |
@required this.children, | |
}) : super(key: key); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", |
Ubuntu 19.10에서 Visual Studio Code 사용 중 한영 전환키를 누르고 한글을 입력하려 했더니,
한글 입력이 안되고 영어만 계속 입력되는 현상을 발견했다. 그래서 인터넷을 검색해 봤더니
snap 형식의 Visual Studio Code를 설치한 경우에, Ubuntu의 입력기인 IBus와 충돌해서 일어나는
현상이라고 한다. 그런데 .deb
형식의 Visual Studio Code를 설치한 경우에는 그런 문제가
없다는 사실을 알게 되어, 설치해 봤더니 한글 입력이 정상적으로 이루어지는 것을
확인했다. 그래서 같은 문제를 겪는 사람들을 위해 이 해결법을 공유하고자 한다.
-
먼저 이미 설치되어 있는 snap 형식의 Visual Studio Code를 제거한다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
- Traefik: Reverse-proxy router
- Docker-swarm: Docker-supported orchestrator
-
kubernetes(이하 k8) 는 무겁고 느리다. docker-swarm(이하 DS) 은 docker 최신버전에 기본으로 탑재되어 나온다. 또한
helm
이나 별도의 관리cli(kubeadm, kubectl)
를 설치할 필요가 없다. -
k8 은 세팅도 어렵다: 세팅하기가 워낙 까다로워 실제로 운영하기 적절한 경우는 devops 팀을 가진 최소 20명 이상의 대규모 사이즈 팀이다. 한 명이 작업하는 것이 아주 불가능한 것은 아니지만, 긴급수정시에는 많이 위험해질 수 있다. 총원이 10명이 되지 않는 우리팀 같은 경우는 한 사람이 급하게 기능수정을 해야될 일이 많다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
NewerOlder