How to install Golang on centos

Go 2018. 4. 12. 11:36

$>wget https://dl.google.com/go/go1.10.1.linux-amd64.tar.gz

$>sudo tar -C /usr/local -xzf go1.10.1.linux-amd64.tar.gz

$>export PATH=$PATH:/usr/local/go/bin

$>go env
...

GOPATH="/home/centos/go"

...

$>mkdir /home/centos/go

$>cd /home/centos/go

$>mkdir src pkg bin

If you want,
you can add "export PATH=$PATH:/usr/local/go/bin" on ~/.bash_profile





'Go' 카테고리의 다른 글

How to run go app in heroku by your own project (with github)  (0) 2017.02.24
LITE IDE setup  (0) 2015.01.28
cannot download, $GOPATH not set  (0) 2015.01.28
블로그 이미지

시간을 거스르는자

ytkang86@gmail.com

,

pytz localize vs normalize

python 2018. 2. 26. 19:02

If you only want to convert to specific timezone, use localize. and forget normalize.

just use

tz2 = timezone("Asia/Seoul")
dt = datetime.datetime(year=2017, month=4, day=29, hour=8, minute=35, second=10)
dt2 = tz2.localize(dt)

utc_timestamp = dt2.timestamp()

this will calculate including DST time

but If you are going to do arithmetic operation(- or +) to your datetime object and It crosses DST start or end time,

you should use normalize(dt) to fix the utc offset.


refer to

https://github.com/newvem/pytz/blob/master/pytz/tzinfo.py

def normalize():

 '''Correct the timezone information on the given datetime

If date arithmetic crosses DST boundaries, the tzinfo

is not magically adjusted. This method normalizes the

tzinfo to the correct one.

To test, first we need to do some setup

>>> from pytz import timezone

>>> utc = timezone('UTC')

>>> eastern = timezone('US/Eastern')

>>> fmt = '%Y-%m-%d %H:%M:%S %Z (%z)'

We next create a datetime right on an end-of-DST transition point,

the instant when the wallclocks are wound back one hour.

>>> utc_dt = datetime(2002, 10, 27, 6, 0, 0, tzinfo=utc)

>>> loc_dt = utc_dt.astimezone(eastern)

>>> loc_dt.strftime(fmt)

'2002-10-27 01:00:00 EST (-0500)'

Now, if we subtract a few minutes from it, note that the timezone

information has not changed.

>>> before = loc_dt - timedelta(minutes=10)

>>> before.strftime(fmt)

'2002-10-27 00:50:00 EST (-0500)'

But we can fix that by calling the normalize method

>>> before = eastern.normalize(before)

>>> before.strftime(fmt)

'2002-10-27 01:50:00 EDT (-0400)'

'''



블로그 이미지

시간을 거스르는자

ytkang86@gmail.com

,

출처: http://clien-achive.blogspot.kr/2017/01/uplus-tvg-iptv-omvs.html

uplus tvg iptv에서 omvs 주소 추출시 체크포인트 몇가지

 

제가 약 일주일에 걸쳐서 삽질을 하면서 쉽게 놓칠수 있는 포인트 몇가지를 알리고자 합니다

정말 이것때문에 시간이 오래 걸렸네요

 

일단 제 최종 구성 환경은

 

벽단자 == iptime n8004r (최신펌웨어) == igmp스위칭허브 == iptv, igmp스위칭허브 == nas, igmp스위칭허브 == PC

 

지금은 PC에서 omvs 아주 잘 작동합니다

지금부터 포인트를 하나씩 짚어보겠습니다

 

타사 인터넷회선 등 여러가지 변수가 있을수 있으므로 아래 포인트가 절대적인 것은 아닙니다만

일단 아래 사항부터 챙겨보시라는 의미에서 써보겠습니다

 

omvs의 기본적인 사용법은 알고 오셨다는 가정하에서...

 

1. omvs는 반드시 관리자 권한의 cmd하에서 실행한다

 - 기본중의 기본

 

2. 네트워크 어댑터가 여러개 일때는 반드시 물리적 어댑터를 빼놓고 전부 '사용 안함'으로 변경한다

 - 분명 omvs -i 옵션으로 잘 지정했는데도 안되서 보니 논리 어댑터(루프백이나 기타 가상화 어댑터)가 간섭을 일으켜서 오작동

 - 전부 끄고 omvs -i 0 으로 편안하게 진행하시면 됩니다

 

3. 윈도우 기본 방화벽 및 백신 방화벽은 반드시 끈다

 - 방화벽 켜놓으면 trying to save rdp://.... 만 나오면서 저장은 안됨

 

딱 요 세가지만 지켜주심 되지 싶습니다

다른건 다 자주 언급되는 내용이고 2번은 생각도 못하고 있었는데 이게 제일 큰 복병이었습니다

 

아래 내용도 종종 언급되는데 저한테는 적용 안된 내용들입니다.

 

1. iptime은 omvs가 잘 안된다 : X

 - 처음에 주소가 전혀 안 따지니 공유기탓을 하면서 asus 모델로 변경했으나 동일증상 발생

 

2. 공유기 맥 주소를 uplus에서 제공한 공유기 맥으로 교체해야 한다 : X

 - 역시 변경하나 안하나 동일

 

3. 중간에 스위칭 허브를 쓴다면 igmp지원 모델로 교체해야 한다 : O

 - 이거 지원 안하면 네트워크 마비되고 난리나죠

 

4. pc를 공유기에 직접 꽂아야 한다 : X

 - 보시다시피 주렁주렁 문어발 구성에서도 잘 작동합니다



'분류없음' 카테고리의 다른 글

How to send TRON in tronbox console with solidity  (0) 2019.02.14
[cpp] std::move는 단지 캐스팅일 뿐이라고?  (0) 2017.02.08
Same string but different length  (0) 2016.10.28
JIT vs Interpreter  (0) 2016.10.25
git pushed merge cancel  (0) 2015.04.13
블로그 이미지

시간을 거스르는자

ytkang86@gmail.com

,