Skip to content

Instantly share code, notes, and snippets.

View maczniak's full-sized avatar

Jeon Jeongho maczniak

View GitHub Profile

처음에 A Tour of Go를 본 이후 Language Specification을 읽으며 중요하다고 생각하는 내용을 요약한다.

소스코드는 UTF-8로 인코딩한다.

주석은 C++과 동일하다. (즉, ///* ... */)

대부분의 줄 마지막에 세미콜론이 자동으로 추가된다. 아래 셋은 같다. 이렇게 importconsttype 은 여러 항목을 괄호로 묶어서 같이 적을 수 있다.

How to Write Go CodeEffective Go를 읽고 내용을 요약한다. Effective Go는 Language Specification, A Tour of Go, How to Write Go Code 문서를 이미 읽었다고 가정한다.

How to Write Go Code

Go 명령어는 작업공간을 나타내는 GOPATH 환경변수를 기준으로 파일을 찾는다. 직접 디렉토리 안에서 Go 명령어를 실행한다면 경로가 필요없다. 작업공간 안에는 bin/, pkg/운영체제_아키텍처/패키지/, src/패키지/ 디렉토리가 있다.

@maczniak
maczniak / gist:8726707
Created January 31, 2014 04:41
어떤 서비스 모니터링 도구를 선택할까?
  • 시스템 모니터링 도구하면 떠오르는 Ganglia와 Nagios는 디자인이 오래된 느낌이다. 이런 종류로 Munin과 Cacti가 있으며 디자인은 Munin이 더 좋아보인다.
  • 저수준 Graphite와 기업용 JBoss RHQ도 고려대상이다.
  • 현재는 Riemann이 좋아보인다. 서비스 소프트웨어를 직접 구현한다면 Hystrix Dashboard도 고려대상이다.
  • 로그 수집과 조회는 Logstash + Kibana를 생각하며 Etsy의 Kale 같이 비슷한 패턴을 검색하는 기능도 기대된다.

permission for user password change

{
  "Effect": "Allow",
  "Action": ["iam:ChangePassword"],
  "Resource": ["__User_ARN_here__"]
},
{
  "Effect": "Allow",

"Action": ["iam:GetAccountPasswordPolicy"],

@maczniak
maczniak / gist:f1e36861c69b0654903a
Last active April 2, 2016 04:22
Markdown Syntax

used in Gist, comments, issues, pull requests and .md and .markdown extension files.

standard Markdown (SM)

  • paragraphs are separated by one or more blank lines
  • heading from # to ######
  • blockquote >
  • bold <strong> ** or __
  • italic <em> * or _
  • unordered list * or -
@maczniak
maczniak / gist:98a7e56bca0427b38089
Last active July 3, 2018 02:20
Personal Project Ideas
  • open world game (like GTA, Open Government and Open Data, LARP like Mind's Eye Theatre, Perplex City, Infinite Challenge, CSI episode, location-based AR, mobile, user participation, WeareData, Watch Dogs, The Division, Localscope app, agent-based behavior, microeconomic simulation)
  • subway project (+Digital Shadow)
  • semantic web editor in browser (Atom)
  • Korea history-themed strategy game
  • board/card game maker (with machine learning)
  • usenet-based bulletin board with many kinds of client interfaces
  • open source Splunk (data analytics & visualization, see Zeppelin)
  • Java profiler
  • HWP file format parser (as Tika filter)
  • Internet portal movie rating analysis
@maczniak
maczniak / etcd-package-diagram.html
Created March 18, 2015 14:00
try) etcd package diagram
<!doctype html>
<html>
<head>
<!--
https://github.com/kisielk/godepgraph
https://github.com/paetzke/go-dep-graph
https://github.com/hirokidaichi/goviz
-->
<title>etcd package diagram</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/vis/3.11.0/vis.min.js"></script>
@maczniak
maczniak / bash_only_list_sample.sh
Last active January 20, 2023 00:36
fork-join model in shell script
#!/bin/bash
# source: https://www.youtube.com/watch?v=ivdyLaH3PhY
PIDS=()
for i in `seq 1 10`; do
DISPLAY=:1 xterm &
PIDS+=($!)
sleep 0.2
done

restrictions

  • maximum concurrent TCP connections per VM (or role instance) - 500k source
  • TCP idle timeout - 4-30 minutes, unit minute, default 4 minutes source
@maczniak
maczniak / follow_diff.sh
Created July 13, 2016 09:57
script collection
# from
while true; do sleep 1; date; netstat -an | grep 5280; done
# to
while true; do sleep 1; date; netstat -an | grep 5280 > /tmp/$$.new; diff /tmp/$$.old /tmp/$$.new; mv /tmp/$$.new /tmp/$$.old; done