경제이야기2015. 3. 15. 16:26

한국의 좋은 요인이라면 기름한방울 안나는 곳에서 국제유가가 몇개월간 급락한 것, 강한 달라로 환율방어에 돈쓸필요없다는 것. 이것 말고는 별다른 좋은 소식은 없는것 같은데..

게다가 안좋은 소식은 이 두가지도 대기업 위주의 수출업체들에게 별다른 advantage를 못줄것 같다는 겁니다. 경쟁자들도 다 받고 있는 혜택이니까요. 결국 환율이 수출기업을 울리고 웃길텐데, 달라대비보다 일본화 대비 원화 상승율이 1년동안 13.3%나 됩니다. 아베노믹스가 실패로 끝나지 않는한 계속 이런 기류는 유지되겠지요. 한은에서 이번에 예고없이 금리를 내려 1.75%로 만든것은 달러화 대비 원화의 가치에 만족못해서가 아니라 엔저를 그냥 두고볼수 없었을것 같네요. 많은 수출기업들이 일본업체와 경쟁하고 있으니까요. 결국 수출기업 살리기 위해 무리수를 둔것같은데, 미국의 금리인상이 언제될지 촉각을 세워 지켜봐야할듯.


중국 위완화는 원화대비 1년간 거의 변동이 없었네요.







Posted by 쁘레드
경제이야기/Stock2015. 3. 15. 15:28

좋은 주제의 글인듯.

Illumina, IRobot, NXP Semiconductors, Palo Alto Networks는 관심종목으로 track해봐야 할듯.

ATHN,CGNX,FEYE,ILMN,IRBT,LOCK,MBLY,NVDA,NXPI,PANW,SLAB,SWKS,SPLK



Posted by 쁘레드
추천영화드라마2015. 3. 15. 13:53

자식 키우면서 왕따만큼 무서운 이야기가 있을까. 이런 초강도 공포영화를 아름답고 덜 자극적으로 그려낸 천재감독 이한. 출연한 걸죽한 배우들을 보면서 배우들도 돈별려고 출연한 영화가 아니라 감독에 대한 존경심이 있었다고 생각됐다.


샌디에고에 오셨었고 감독과의 대화도 했었는데 내가 알았다면 이한감독과 저녁자리라도 껴달라고 했었을 텐데. 한국으로 돌아가시고 몇달이나 후에 보고 알게 됐음.



---------------------------

http://movie.naver.com/movie/bi/mi/media.nhn?code=106522

우아한 거짓말

'추천영화드라마' 카테고리의 다른 글

건축학개론 - 수지짱  (0) 2015.03.23
바람의 검심 영화 실사판 강추  (0) 2015.03.16
한공주  (0) 2015.03.14
2015년 3월에 본 구가의서  (0) 2015.03.11
명량을 보고  (0) 2014.08.19
Posted by 쁘레드
사진(기) 이야기2015. 3. 15. 13:43

사진을 취미로 하기로 한것은...

인생에서 가장 잘한 일이었나보다.
요즘 바빠서 생각할 시간이 없었는데, 새벽에 일찍일어나 안개속에서 때를 기다리며 생각할수 있는 좋은 기회도 주고.
바쁜것을 내려놓고 저 뱃사공처럼 살아도 좋겠다고 생각도 해보고..
무거운 카메라와 삼각대를 들고 호수를 한바퀴 돌았더니 그 동안 잠자고 있던 몸도 깨어난다.



Posted by 쁘레드
추천영화드라마2015. 3. 14. 17:45
이런 우울한 사회를 그남아 아름답게 그려준 감독에게 감사를. 영화를 보면 충격과 우을한 느낌이 팍 들지만 그래도 강추.
지 자식들만 걱정말고 자기도 피해자가 될수 있다는 생각을 해보면 좋을텐데. 자기 아파트값만 생각하면 범죄자가 대통령이 되도 상관없다는 그런 류의 사고인거라 생각됨.

------------------------
어제 새벽에 일어나 한공주를 봤습니다. 뭔 영환지 앞에만 보고 다시 자야지 하다가 끝나고 생각까지 좀 하느라 아침까지 잠을 잘 못이뤘네요. (휴일이니까~ ^^)

살기 좋은 세상을 꿈꾸는 것은 우리의 특권이자 권리이고 의무인데, 이제는 그런 세상조차 꿈꾸는것조차 바보같은 세상이 되어가고 있는것일까요.

한공주 아빠처럼, 미치지 않고 살수 없는 사회일까요. 최소한 술 엄청 권하는 사회입니다.

P.S 천우희란 여배우는 profile 사진과 다르게 떡대가 떡 벌어졌더란. 수영좀 한듯.
정인선이란 여배우는, 얼굴이 낯이 익은데 참 예쁘더란. (결론은 산으로) ^^
-----------------------

http://movie.naver.com/movie/bi/mi/basic.nhn?code=99724

한공주

'추천영화드라마' 카테고리의 다른 글

바람의 검심 영화 실사판 강추  (0) 2015.03.16
우아한 거짓말  (0) 2015.03.15
2015년 3월에 본 구가의서  (0) 2015.03.11
명량을 보고  (0) 2014.08.19
Love Affair 1994  (0) 2009.09.17
Posted by 쁘레드
경제이야기2015. 3. 14. 17:43
  • 중국 스모그등 환경오혐으로 부자들이 떠나고 있음. 100만달러 이상의 부자들중 15% 이상이 이민을 고려중이고 2014년 기준으로 호주이민자의 90 % 미국 이민자의 80% 가 중국인임.
  • 우리가 근처에서 보는 중국인들이 다 부자인 이유도 이렇게 설명되나? 부자들이 많이 나왔으니까?
  • 이미 계산의 밝은 중국인은 자기 5년전에 전재산을 달러화로 바꿔놓으면 저절로 오를것이라는 것을 잘 알고 있었던것 같음. 10년 살고 다시 중국으로 돌아가도 오히려 중국 위환화 대비 저절로 더 늘어있을 것 같음. 

    Source : http://media.daum.net/foreign/newsview?newsid=20150314113703944
-----------------------------------------

[앵커]

중국의 부자들이 잇달아 해외 이민을 떠나고 있습니다.

더 나은 자연 환경과 교육 여건, 투자 목적 등 이유도 다양합니다.

베이징 서봉국 특파원이 보도합니다.
...
실제 최근 10년 간 100만 달러 이상을 보유한 중국 부유층의 15%인 76,000명이 이미 이민을 떠났거나 해외 국적을 취득했다는 통계도 나왔습니다.
...
"돈이 있거나 기술이 있거나, 어쨌든 능력이 있는 중국 사람들 상당수가 이민을 고려하고 있습니다."

자연과 교육 여건, 부동산 투자 기회가 좋다고 알려진 호주의 경우 최근 2년간 투자 비자를 받아 입국한 외국인 가운데 90%가 중국인입니다.

미국도 2013년 이민자 80%가 중국인일 만큼, 이민 선호 지역으로 꼽혔습니다.
...

Posted by 쁘레드
Programming2015. 3. 14. 13:12
  1. 현재날짜/시간 format대로 출력
  2. 현재 dir가 그 dir가 맞는지
  3. file/folder 있는지 확인후 만들기, 없으면 에러나 만들기
  4. if else 
  5. for loop, while
  6. 외부 프로그램 실행하기
  7. Input parameter받아 command에 넣기
  8. parameter validate하기
  9. website에서 label읽어오기
  10. sleep, timeout = sleep
  11. 외부파일을 읽어서 parameter 순차적으로 읽기



http://en.wikibooks.org/wiki/Bash_Shell_Scripting

http://wiki.bash-hackers.org/syntax/pattern

http://linuxcommand.org/wss0130.php

http://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash


Bash header, 날짜구하기, 시간

#!/bin/bash
#-------------------------------
# Fred Oh (email) 
# 2015/01/01 starting new life
#-------------------------------
ulimit
today=`date +%m%d`
source ~/.bashrc

today=`date +%m%d_%H%M%S`

$ NOW=$(date +"%m-%d-%Y")

Pattern Matching

#!/bin/bash
#-------------------------------
# Fred Oh (email) 
# 2015/01/01 starting new life
#-------------------------------

au_archive_dir="....../LA.BF64.1.2.1"
branch_name='LA.BF64.1.2.1'
au_prefix='AU_LINUX_ANDROID'

cd $au_archive_dir

post_fix_temp=`ls -t 05.01.00.0[0-9][0-9].[0-9][0-9][0-9] | head -1`
echo $post_fix_temp
#Removing last :, first of all why it ends with :
post_fix="${post_fix_temp//:}"
echo POST_FIX is $post_fix

#Extract only last 3 digit number
#au_number="${post_fix:-3:3}"  doesn't work T.T
au_number="${post_fix:13:3}"
echo TODAY_AU ${today}_au${su_number}


/^([[:Digit:]]{2}\.){3}([[:Digit:]]{3}\.){2}.*$/{
    printf("matches\n");
}

IF/Loop

#!/bin/bash
#-------------------------------
# Fred Oh (email) 
# 2015/01/01 starting new life
#-------------------------------

if [ -d "$buildpath" ]; then
    buildpath="${buildpath}_1"
    echo new $buildpath
fi

count=1
while [[ -d $buildpath ]]; do
    if [ $count == 1 ]; then
        buildpath=${buildpath}_$count
    fi
    buildpath=${buildpath:0:-2}_$count
    let count=count+1
    echo New $buildpath
done
echo Final $buildpath

mkdir $buildpath
cd    $buildpath

echo PWD is $PWD
if ! [ $buildpath == $PWD ]; then
    echo CD failed
    exit 1
else
    echo same directory
fi


taking input parameter

#!/bin/bash
#-------------------------------
# Fred Oh (email) 
# 2015/01/01 starting new life
#-------------------------------
today=`date +%m%d`
source ~/.bashrc

#check input is NULL
if [ -z $1 ]; then
        echo "give me AU label"
        exit 1
fi
echo "AU Lable = $1"

#or check input is NULL or not
if [ "$1" != "" ]; then
    echo "Positional parameter 1 contains something"
else
    echo "Positional parameter 1 is empty"
fi

Sync to latest label and Build

#!/bin/bash
#-------------------------------
# Fred Oh (email) 
# 2015/01/01 starting new life
#-------------------------------

today=`date +%m%d`
source ~/.bashrc

au_archive_dir="...../LA.BF64.1.2.1"
branch_name='LA.BF64.1.2.1'
au_prefix='AU_LINUX_ANDROID'

cd $au_archive_dir
#must be 16 character like 05.01.00.066.083
#Fred don't know why post_fix_temp ends up with ':', need to remove ':'
post_fix_temp=`ls -t 05.01.00.0[0-9][0-9].[0-9][0-9][0-9] | head -1`
echo $post_fix_temp
post_fix="${post_fix_temp//:}"
echo $post_fix

#au_number="${post_fix:-3:3}"  doesn't work T.T
au_number="${post_fix:13:3}"
echo TODAY_AU ${today}_au${su_number}

buildpath="/local/mnt/workspace/hyosubo/8992_au${au_number}"
count=1
while [[ -d $buildpath ]]; do
    if [ $count == 1 ]; then
        buildpath=${buildpath}_$count
    fi
    buildpath=${buildpath:0:-2}_$count
    let count=count+1
    echo new $buildpath
done

mkdir $buildpath
cd    $buildpath

echo PWD is $PWD
if ! [ $buildpath == $PWD ]; then
    echo CD failed $buildpath $PWD
    exit 1
fi


au_name=$au_prefix'_'$branch_name'.'$post_fix
echo $au_name
#/usr/local/bin/repo init -u git://git.quicinc.com/platform/manifest.git -b LA.BF64.1.2.1
/usr/local/bin/repo init -u git://git.quicinc.com/platform/manifest.git -b refs/tags/$au_name -m  versioned.xml
touch README2.txt
/usr/local/bin/repo sync -j8 -q
#/usr/local/bin/repo sync -j8 > reposync_$today.txt
#/usr/local/bin/repo forall -c 'git checkout -b au33 AU_LINUX_ANDROID_KK.04.04.04.010.033'
#/usr/local/bin/repo start tip$today --all
source build/envsetup.sh
lunch msm8992-userdebug
/usr/bin/make -j12 > Buildlog_$today.txt

'Programming' 카테고리의 다른 글

Web Sequence diagram blog에 넣기  (0) 2015.04.16
Popcorn Time clone해서 build하기  (0) 2015.04.14
BAT/CMD windows script to EXE executable converter  (0) 2015.03.17
windows batch file tips  (0) 2015.03.14
syntax highlight test  (0) 2015.03.03
Posted by 쁘레드
Programming2015. 3. 14. 10:49
아래 몇가지만 알아서 윈도에서 자주쓰는 batch file을 만들자
  1. Input 받아 command에 넣기
  2. input validate하기
  3. file/folder 있는지 확인후 만들기, 없으면 에러나 만들기
  4. if else 
  5. for loop
  6. 외부 프로그램 실행 = start
  7. input받아 실행하기
  8. 현재날짜 format대로 출력
  9. 현재 dir 얻기, 이전 cur path로 돌아가기
  10. sleep, timeout
  11. 외부파일에서 parameter 순차적으로 읽기
  12. 환경variable에서 읽기, PATH나 user variable like msm
  13. 오늘날짜 구하기


http://en.wikibooks.org/wiki/Windows_Batch_Scripting

http://stackoverflow.com/search?q=windows+batch


1. Input이 없을때 나가기, 처음 3개 character비교하기

@echo off
rem -------------------------------
rem Fred Oh (email) 
rem 2015 01 01 starting new life
rem -------------------------------

rem argument check, no arument exit
if -%1-==-- echo Argument one not provided & exit /b

rem user input, %1, %2 and so on

set a=%1
rem set a=abcd
echo %a:~0,3%
if %a:~0,3%==COM echo same

if exist file.txt (
	echo The file exists.
) else (
	echo The file does not exist.
)

rem directory check
if exist temp (
	echo The temp exists.
) else (
	echo The temp does not exist.
)

rem if directory is not available, create it
if not exist temp mkdir temp

goto :mylabel
echo Hello 1
REM Hello 1 never gets printed.
 
:mylabel
echo Hello 2
goto :eof

rem robocopy, xcopy, copy
sleep 5
rem timeout
timeout /t 5

#user input
set /P user_input=Enter an integer:


2. 간단한 Monkey 예제

@echo off
rem -------------------------------
rem Fred Oh (email) 
rem 2015 01 01 starting new life
rem -------------------------------


set arg1=%1
set iteration=1
set num=1

rem note: it end with \, %mypath:~0,-1% will remove \
set mypath=%~dp0
set log_path=%mypath%Logs

if exist log_path(
	echo Logs folder exists already.
) else (
	mkdir log_path    
	echo Logs Folder created!
)

:loop
adb root
adb wait-for-device
adb remount
sleep 5
start adb_logs.bat %iteration% %log_path%
start Kernel_logs.bat %iteration% %log_path%
rem adb shell monkey -p com.android.music -p com.android.soundrecorder -s 100 --throttle 500 1000000000
adb shell monkey -p com.android.music -p com.android.soundrecorder -p com.android.voicedialer -s 100 --throttle 500 1000000000
set /a iteration= %iteration% + %num%
echo %iteration%
sleep 600
mv C:\ProgramData\Qualcomm\QPST\Sahara\Port_%arg1% C:\ProgramData\Qualcomm\QPST\Sahara\Port_%arg1%_%iteration%
goto loop


3. input path 받아 fastboot flash 하기

@echo off
rem -------------------------------
rem Fred Oh (email) 
rem 2015 01 01 starting new life
rem -------------------------------
setlocal enabledelayedexpansion
for %%i in (1) do (
  set /p c=enter a build location? 
  echo waiting for device
  echo Flashing boot image  
  fastboot.exe flash boot !c!\boot.img
  echo Flashing userdata image
  fastboot.exe flash userdata !c!\userdata.img
  echo Flashing system image
  fastboot.exe flash system !c!\system.img
  echo Flashing recovery image
  fastboot.exe flash recovery !c!\recovery.img
  echo Flash completed, rebooting device
  fastboot.exe continue
  sleep 3
)



4. function 예제

@echo off
rem -------------------------------
rem Fred Oh (email) 
rem 2015 01 01 starting new life
rem -------------------------------
@echo off
call :power %1 %2
echo %result%
rem Prints 16, determined as 2 * 2 * 2 * 2
goto :eof

rem __Function power______________________
rem Arguments: %1 and %2
:power
setlocal
set counter=%2
set interim_product=%1
:power_loop
if %counter% gtr 1 (
  set /A interim_product = %interim_product% * %1
  set /A counter = %counter% - 1
  goto :power_loop
)
endlocal & set result=%interim_product%
goto :eof


5. 간단한 fastboot flash 처리예제, environment variable 읽어서 처리하기. msm is Env variable

@echo off
rem -------------------------------
rem Fred Oh (email) 
rem 2015 01 01 starting new life
rem -------------------------------

if -%msm%- == -- (
	echo no msm defined, set msm8992
	set msm=msm8992
)
set out=out\target\product\%msm%

rem if no parameter
rem 		check current directory then $OUT directory
if -%1-==-- ( 
echo Argument one not provided, Assume current directory
call :function_fastboot
echo IMG flashed done
goto :eof
) 

rem if parameter(PATH) are given
rem 		check network path or local path
set in_path=%1
echo %in_path:~0,2%
if %in_path:~0,2%==\\ (
	echo Network path, pushd %in_path% and will do popd later
	pushd %in_path%
	call :function_fastboot
	popd
) else (
	echo LOCAL path found CD %in_path%
	cd %in_path%
	call :function_fastboot
)
goto :eof

rem ________________________
rem FUNCTION flash FASTBOOT
rem --------------------------------------------

:function_fastboot
setlocal
if exist system.img (
	echo current directory has IMG files
	fastboot flash aboot 		emmc_appsboot.mbn
	fastboot flash boot 		boot.img
	fastboot flash cache 		cache.img
	fastboot flash persist 		persist.img
	fastboot flash recovery 	recovery.img
	fastboot flash userdata 	userdata.img
	fastboot flash system 	system.img
) else (
	if exist %out%\system.img (
		echo IMG found in %out%
		fastboot flash aboot 		%out%\emmc_appsboot.mbn
		fastboot flash boot 		%out%\boot.img
		fastboot flash cache 		%out%\cache.img
		fastboot flash persist	 	%out%\persist.img
		fastboot flash recovery 	%out%\recovery.img
		fastboot flash userdata 	%out%\userdata.img
		fastboot flash system 	%out%\system.img
	) else (
		echo no IMG file found!!!! EXIT.
		exit /b
	)
)
endlocal
goto :eof


오늘 날짜구하기 예제

@echo off
rem -------------------------------
rem Fred Oh (email) 
rem 2015 01 01 starting new life
rem -------------------------------

For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c%%a%%b)
rem For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a%%b)
For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set mytime=%%a%%b)
echo %mydate%_%mytime%

For /f "usebackq tokens=1,2 delims==" %%i in (`wmic os get LocalDateTime /VALUE 2^>NUL`) do if '.%%i.'=='.LocalDateTime.' set ldt=%%j
set ldt=%ldt:~0,4%%ldt:~4,2%%ldt:~6,2%_%ldt:~8,2%%ldt:~10,2%%ldt:~12,2%
echo %ldt%

rem %date% = Mon 10/12/2015 
set year=%date:~-4%
rem echo year=%year%
set month=%date:~4,2%
rem echo month=%month%
set day=%date:~7,2%
rem echo day=%day%

set today=%month%%day%
echo today is %today%


'Programming' 카테고리의 다른 글

Web Sequence diagram blog에 넣기  (0) 2015.04.16
Popcorn Time clone해서 build하기  (0) 2015.04.14
BAT/CMD windows script to EXE executable converter  (0) 2015.03.17
Bash shell script  (0) 2015.03.14
syntax highlight test  (0) 2015.03.03
Posted by 쁘레드
IT이야기2015. 3. 14. 10:05

요즘 웹 기술은 너무 많이 변해서 HTML 에다가 PHP + MySQL + Apache 만으로 모든것을 하던 10년전과 너무 바뀐것 같다. 이젠 내가 읽어도 뭔말인지 모를 내용이 너무 많다. 머리가 안돌아가는지 세상이 너무 빠른건지...


스포카 서버의 구조

http://spoqa.github.io/2011/12/24/about-spoqa-server-stack.html


빠른 프로토타이핑을 위한 도구 소개

http://spoqa.github.io/2012/01/30/rapid-prototyping.html


eventlet을 활용한 비동기 I/O 프로그래밍

http://spoqa.github.io/2012/02/13/concurrency-and-eventlet.html


파이썬 코딩 컨벤션

http://spoqa.github.io/2012/08/03/about-python-coding-convention.html


Python 기반의 웹서비스 개발 환경 구축 방법

http://spoqa.github.io/2013/02/20/python-development-environment.html






Posted by 쁘레드
IT이야기2015. 3. 14. 05:57

저도 Drupal을 많이 이용하긴 했는데, Raspberry Pi를 cluster로 묵어 가방속에 들어가는 data center를 만든 사람이 있네요.

http://www.midwesternmac.com/blogs/jeff-geerling/introducing-dramble-raspberry

https://github.com/geerlingguy/raspberry-pi-dramble

Raspberry Pi Dramble

A cluster (Bramble) of Raspberry Pis on which Drupal will be deployed using Ansible.

Raspberry Pi Dramble - Hero Image

Read the rest of this README and the official Dramble Wiki for more information about the Dramble.

Why

I'm doing presentations on Ansible, and how easy it makes infrastructure configuration, even for high-performance/high-availability Drupal sites. WiFi/Internet access is spotty at most conferences, so deploying to AWS, DigitalOcean, or other live public cloud instances that require a stable Internet connection is a Bad Idea™.

Deploying to VMs on my own presentation laptop is an option (and I've done this in the past), but it's not quite as impactful as deploying to real, live, 'in-the-flesh' servers. Especially if you can say you're carrying around a datacenter in your bag!

A cluster of servers, in my hand, at the presentation. With blinking LEDs!

Specs

  • 24 ARMv7 CPU Cores
  • 5.4 GHz combined compute power
  • 6 GB RAM
  • 96 GB microSD flash-based storage
  • 1 Gbps private network

Getting the Pis (and other accessories)

Many people have asked for a basic list of components used in constructing the Dramble, or where I found particular parts. In the Wiki, I've added pages listing the following:

---------------------------------

삼성 전무출신의 김규호씨도 Iphone과 Raspberry Pi로 엄청난 물건을 만드셨네요. 진정한 난방열사이신듯.

http://www.slideshare.net/KyuhoKim/

kkh_2_800

김규호 씨가 아파트 난방 밸브에 설치한 ‘라즈베리파이’ 보드와 온도 센서, 무선인터넷 장비.

kkh_1_800

집 안 난방용 온수의 온도를 웹브라우저에서 실시간으로 볼 수 있도록 했다.


----------------------------------

퀄컴도 값비싼 dragon를 계속 공급하고 있습니다.

http://www.pcworld.com/article/2896332/qualcomms-raspberry-pilike-computer-has-wireless-capabilities.html


'IT이야기' 카테고리의 다른 글

역시 스마트 시계는 Pebble Time  (0) 2015.03.15
Spoqa 테크 블로그  (0) 2015.03.14
Goodyear(GT) working on an energy-harvesting tire  (0) 2015.03.14
삼성 SW 개발자 시험  (0) 2015.03.14
Apple use intel LTE modem  (0) 2015.03.13
Posted by 쁘레드