Install the latest git version on Ubuntu

Original Url

 

Steps

  • Install required packages on Ubuntu 14.04
sudo apt-get install software-properties-common
  • Run this command
sudo apt-add-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git
Advertisements

Expose Github account’s email address as public when using OAuth 2 authentication

What to do

When  a application uses Github OAuth 2 authentication, some of accounts may lost its email address in a application. The reason is that Github account keep it’s email address as ‘Private‘.

In order to use Github account’s email address on Gerrit, a user have to make it as Public

  1. Go to ‘http://github.com/ > Setting > Emails’
    • Link: https://github.com/settings/emails/
  2. Uncheck ‘Keep my email address private’

Reference

 

 

San Francisco Tour Guide

Dolores Park/Tartine Bakery
– 여긴 낮에 가서 공원에서 잠시 쉬고 빵집가서 빵 흡입..
주차가 좀 힘듬..😑

Baker Beach
– 날씨 좋은 날 여기에 자리잡고 맥주 한잔/커피 한잔 하기 괜찮아요. 다만 바람은 언제나 좀 쎈 편.
관광객들이 Golden Gate Bridge 많이 보러 가는 포인트가 아니라, 색다른 포인트를 즐기실 수 있음

Battery Spencer
– Golden Gate Bridge 풍경사진 많이 찍는 포인트 중 하나에요. 언제가도 괜찮지만,
저녁에 가서 보시면 야경이 죽임. (커플들이 많이 옴..)

Hawk Hill
– Batter Spencer 에서 더 위로 올라가서, Golden Gate Bridge 와 SF 를 한눈에 볼 수 있는 위치에요.
여긴 밤에 혼자가긴 좀 위험할 수도 있는 곳이라. 낮에 가시는거 추천.

The Buena Vista, Hyde Street, San Francisco
– Irish Coffee 로 유명한 곳. 대한항공 CF도 여기서 찍었어요.

Cliff House
– SF 서쪽 끝/Golden Gate Park 끝 에 위치한 Restaurant 이에요. 태평양 한눈에 들어오는 경치라,
특히 날씨가 맑고 달뜬 밤에 그 앞 바다 야경이..죽입니다..ㅠ.ㅠ

San Francisco Public Library; Potrero Branch
– 여기 도서관도 좋긴 한데요, 여길 보시라는 건 아닙다. 여기에서 Connecticut St으로 좌회전 하면 내리막 경사길인데,
여기에서 보는 SF 야경도 죽임.

Farley’s Coffee House
– 소소한 인테리어의 coffee shop. SFPL Potrero Branch 근처에요.

Twin Peaks
– 여기도 야경 포인트…한국 사람들 많이 와요 :slightly_smiling_face:

Mission Public, 14th Street
– 배고프면 밥도 먹어줘야…샌드위치랑 커피 맛있어요. 주인도 친절하심.

899 Avenue of the Palms, San Francisco
– Treasure Island 에 있는 길인데요, 보트를 타고 나가지 않고도 SF 야경을 바다에서 볼 수 있는 위치에요.
반대편 Pier 1 쪽으로 가시면 Bay Bridge 반쪽의 야경도 볼 수 있음

de Young Art Museum
– 전시물 보시는거 보다는, 전망대에서 SF시내 빙 둘러보시는거 추천.

 

South Korea Tour Guide

# Museum
1. National Museum of Korea
http://www.museum.go.kr/site/main/home
2. National Hangeul Museum
http://www.hangeul.go.kr/main.do
– This museum is located at same place with ‘National Museum of Korea’

3. Gyeongbokgung Palace Office & National Fork Museum of Korea
– National Fork Museum of Korea : http://www.nfm.go.kr/language/english/main.jsp
– Gyeongbokgung Palace Office : http://www.royalpalace.go.kr/html/eng/main/main.jsp
: You can enter this palace for free if you wear Han-Bok(Korean Traditional Costume)
There are stores near Gyeongbokgung Palace that you can rent Han-Bok

4. Jongmyo Shrine
– Web site
: http://www.cha.go.kr/cop/bbs/selectBoardArticle.do?ctgryLrcls=CTGRY209&nttId=57993&bbsId=BBSMSTR_1205&mn=EN_03_01

4. Changdeokgung Palace and its Secret Gargen
– Main site
: https://eng.cdg.go.kr/main/main.htm
– Secret Gargen Information page
: https://eng.cdg.go.kr/guide/guide_course_02.htm
– Reservation Url
: https://eng.cdg.go.kr/reservation/reserv_01.htm

# National Park
1. Sorak National Park
– Web Site
: http://english.visitkorea.or.kr/enu/ATR/SI_EN_3_1_1_1.jsp?cid=264211
– Recommended hotel
: Seorak Kensington Stars Hotel – https://www.booking.com/hotel/kr/seorak-kensington-stars.html
: Hanhwa Resort Seorak Sorano – https://www.booking.com/hotel/kr/hanwha-resort-seorak-sorano.ko.html
– Access to hotel
: Route – https://goo.gl/maps/LGYS2XbYgAp
: Where you take a bus – Seoul Express Bus terminal / Interval – 30 minutes
– Comments
: It’s better that you will visit Sorak National Park in weekdays.
: This national park is popular place to see Korea’s Maple View.

# Places
1. N Seoul Tower
– Web site
: http://www.nseoultower.co.kr/eng/index.asp
– Getting here
: http://www.nseoultower.co.kr/eng/visit/traffic.asp
– You can
2. 북악팔각정
: https://goo.gl/maps/kvwKDtzy9y82
: Nice place to see Seoul Night View

# Theme Park
1. Korean Folk Village
– Web site
: http://www.koreanfolk.co.kr/multi/english/
– Getting Here
: You can get here by Bus 5001-1. This bus stops at a point near Gangnam Artnoueveau City.
: I recommend that you visit here on Saturday or Sunday because you can see some characters

2. Everland
– Web site
: http://www.everland.com/web/multi/english/everland/main.html
– Getting Here
: You can get here by Bus 5002. This bus stops at a point near Gangnam Artnoueveau City.

# Others
1. DMZ Tour Program by Korail
– 1 Day Program
http://www.letskorail.com/ebizprd/EbizPrdTicketHtm14121_i1.do?txtVrGdNo=F20170817002
– This page is written in Korean. You can call +82-1544-7755

 

Jenkins: Make an agent connection to EC2 instance.

Conditions

  • EC2 instance has no Elastic IP.
  • When an agent has been in idle status for some times, that instance has to be stopped.

Script

#!/bin/bash
set -x
export PATH=/vol/users/gatekeeper.tvsw/.local/bin:$PATH
ID=${1}
echo "INFO: Jenkins Url = ${JENKINS_URL}" >&2
echo "INFO: Start EC2 instance - ${ID}" >&2
aws ec2 start-instances --instance-ids ${ID} >&2

echo "INFO: Wait until EC2 ${ID} will be 'Running'" >&2
aws ec2 wait instance-running --instance-ids ${ID} >&2

echo "INFO: Wait for 10 seconds" >&2
sleep 10
echo "INFO: Get ${ID}s PublicIpAddress" >&2
IP=`aws ec2 describe-instances --instance-ids ${ID}|grep PublicIpAddress |sed 's/\ //g'|sed 's/\"//g'|sed 's/\,//g'|awk -F: '{print $2}'`
NETWORKIFID=`aws ec2 describe-instances --instance-ids ${ID}|grep NetworkInterfaceId|sed 's/\ //g'|sed 's/\"//g'|sed 's/\,//g'|awk -F: '{print $2}'`
echo "INFO: ${ID}s PublicIpAddress = ${IP}" >&2
echo "INFO: ${ID}s NetworkInterfaceId= ${NETWORKIFID}" >&2

trap term_action SIGTERM
function term_action() {
echo "INFO: Stop an instance: ${ID}" >&2
aws ec2 stop-instances --instance-ids ${ID} 2>/dev/null
>&2 echo "INFO: Stopped:${ID}"
}

date >&2
rm -rf slave.jar
wget --auth-no-challenge --no-check-certificate ${JENKINS_URL}/jnlpJars/slave.jar
scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null slave.jar ubuntu@${IP}:~/slave.jar >&2
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -n ubuntu@${IP} 'ls -al ~/slave.jar' >&2
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -n ubuntu@${IP} mk_disk_i3 >&2
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -n ubuntu@${IP} mkdir -p ${WORKSPACE} >&2
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -n ubuntu@${IP} 'echo Postech2001! | sudo -b openconnect --juniper svlvpn.lge.com -u allessunjoo.park --passwd-on-stdin >> ~/.openconnect_watchdog.log 2>&1 &'
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@${IP} 'java -jar ~/slave.jar'
term_action
set +x

Configuration on Jenkins

Make IAM user to only start and stop a designated EC2 instance

Prerequisites

Steps

  1. Go to ‘IAM’ and click ‘Policies’ on the left menu. Click ‘Create policy’ button to make a custom policy
    policy-menu
  2. Select one of policy tools. I will select ‘Create “Your Own Policy’ for a example.
    create-policy

      • Required Actions
        • ec2:StartInstances
          • Target Resource: EC2 instance’s arn name
        • ec2:StopInstances
          • Target Resource: EC2 instance’s arn name
        • ec2:Describe*
          • Target Resource: All EC2 instances = “*”
      • Example for a policy document
        {
            "Version": "2012-10-17",
                "Statement": [
                {
                "Sid": "Stmt1501742713000",
                "Effect": "Allow",
                "Action": [
                   "ec2:StartInstances",
                   "ec2:StopInstances"
                ],
                "Resource": [
                   "arn:aws:ec2:ap-northeast-2:652050604906:instance/i-034dd11af16acf000"
                ]
                },
                {
                "Effect": "Allow",
                "Action": "ec2:Describe*",
                "Resource": [
                   "*"
                ]
                }
             ]
         }
  3. Go to https://console.aws.amazon.com/iam/home#/users and select a user
    select-iam-user
  4. Select ‘Permissions’ tab and click ‘Add Permissions’
    add-permission
  5. Click ‘Attach existing policies directly’ and select a policy that you created. Click ‘Next: Review’ and ‘Add permissions’ if nothing is problem.
    ad-permissions-select-policy.png