manywaypark's Blog
개발, 검색, 함수

[VS2015] vcvarsall.bat는 어디에?

tips & tricks/Win 2016. 6. 23. 18:13 by manywaypark

Visual Studio 2015에서는 vcvarsall.bat가 기본으로 설치되지 않는 듯.

설치 프로그램 다시 실행하고, C++ Common Tools 항목을 설치해주어야된다.

기본 위치에 깔았다면, vcvarsall.bat 파일의 위치는 아래와 같다.

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat


ref: http://stackoverflow.com/questions/33323172/vcvarsall-bat-needed-for-python-to-compile-missing-from-visual-studio-2015-v-1


happy hackin'

smartmontool

tips & tricks/Linux/Unix 2016. 6. 22. 14:38 by manywaypark

커널 업그레이드 하고 리부팅 했는데 파일시스템 체크하다가 실패함. Orz

(의심 가는 것은 docker 깔아서 이거저거 테스트한 것과 18G 짜리 postgresql dump file을 서버에서 받아와서 노트북에도 밀어넣은 작업. 둘 중에 하나가 좀 문제를 있으켰을 가능성이 농후하다)

두번 정도 리부팅하니 우분투가 올라오긴 올라오는데 좀 찝찝함.

혹시나 하는 마음에 smartmontools 돌려서 H/W failure 인지 검사.

short test는 아무 이상 없구나. 퇴근하면서 extended test 돌려놓고 가야겠다.


https://help.ubuntu.com/community/Smartmontools


happy hackin'

R같은 한 글자로 된 패키지를 찾으려고 port search R 처럼 하면 엄청나게 많은 패키지가 리스팅된다.

아래처럼 하면 정확한 이름으로 찾아준다.

$ port search --exact R

R @3.3.0 (math, science)

    R is GNU S - an interpreted language for statistical computing


ref: http://johnlaudun.org/20140721-install-r-with-macports/


happy hackin'

[byobu] 세션 여러개 만들기

tips & tricks 2016. 5. 31. 14:57 by manywaypark

byobu에서 여러 세션을 사용하고 싶은 경우가 있다.

내 경우에는 tmux backend를 사용하므로 아래처럼 하면 된다.


byobu new -s from-macbook


refs:

http://askubuntu.com/questions/196290/name-a-byobu-session

http://askubuntu.com/questions/94564/how-to-run-multiple-byobu-sessions-at-once


happy hackin'

PostGIS에서 SRID로 5179를 쓰려고 했는데 다음과 같은 에러가 났다.


5179 not found in spatial_ref_sys


아마도 한국에서만 쓰는 것이라 기본으로 포함되지는 않은 듯하다.


아래와 같이 해주면 사용 가능하다.


INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (5179,'EPSG',5179,'GEOGCS ["Korea 2000", DATUM ["Geocentric datum of Korea", SPHEROID ["GRS 1980", 6378137.0, 298.257222101, AUTHORITY ["EPSG","7019"]], TOWGS84 [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY ["EPSG","6737"]], PRIMEM ["Greenwich", 0.0, AUTHORITY ["EPSG","8901"]], UNIT ["degree", 0.017453292519943295], AXIS ["Geodetic longitude", EAST], AXIS ["Geodetic latitude", NORTH], AUTHORITY ["EPSG","4737"]], PROJECTION ["Transverse_Mercator", AUTHORITY ["EPSG","9807"]], PARAMETER ["central_meridian", 127.5], PARAMETER ["latitude_of_origin", 38.0], PARAMETER ["scale_factor", 0.9996], PARAMETER ["false_easting", 1000000.0], PARAMETER ["false_northing", 2000000.0], UNIT ["m", 1.0], AXIS ["Easting", EAST], AXIS ["Northing", NORTH], AUTHORITY ["EPSG","5179"]]','+proj=tmerc +lat_0=38 +lon_0=127.5 +k=0.9996 +x_0=1000000 +y_0=2000000 +ellps=GRS80 +units=m +no_defs ');


refs:

  • https://gist.github.com/hangum/a0af73450c87cb651be7#file-test1-sql
  • https://epsg.io/5179

happy hackin'


글을 다 쓰고 자세히 보니

https://epsg.io/5179 에서 Export로 PostGIS용 insert statement를 제공하네. Orz.



alias가 아닌, 원래(vanilla) 명령어를 실행하게 한다. 

command라는 command도 같은 역할을 함.


refs: 

  • http://serverfault.com/questions/480271/backslash-at-the-beginning-of-a-command
  • http://www.cyberciti.biz/faq/bash-shell-temporarily-disable-an-alias/

happy hackin'


ProGit 전자책을 만들어 보자

tips & tricks 2016. 4. 14. 15:57 by manywaypark

내 경우는 아래 처럼 하면 됐다.

$ git clone https://github.com/progit/progit2-ko.git

$ cd progit2-ko

$ \curl -sSL https://get.rvm.io | bash -s stable --ruby

$ source ~/.rvm/scripts/rvm

$ bundle install

$ asciidoctor-pdf-cjk-kai_gen_gothic-install

$ bundle exec rake book:build


rvm 받을 때 GPG 어쩌구 하면 이렇게 해준다.

$ command curl -sSL https://rvm.io/mpapis.asc | gpg --import -


2018-02-01 추가:


현재 ubuntu 16.04, ruby2.3 환경에서 pdf 생성하려고 하면 아래와 같은 에러가 발생한다.

dhpark@boo:~/hacking/progit2-ko$ bundle exec asciidoctor-pdf -r asciidoctor-pdf-cjk-kai_gen_gothic -a pdf-style=KaiGenGothicKR progit.asc

/var/lib/gems/2.3.0/gems/prawn-templates-0.0.3/lib/prawn/templates.rb:246:in `<top (required)>': can't modify frozen Array (RuntimeError)

        from /var/lib/gems/2.3.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:6:in `require'

        from /var/lib/gems/2.3.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:6:in `<top (required)>'

        from /var/lib/gems/2.3.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf.rb:3:in `require_relative'

        from /var/lib/gems/2.3.0/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf.rb:3:in `<top (required)>'

        from /var/lib/gems/2.3.0/gems/asciidoctor-pdf-1.5.0.alpha.11/bin/asciidoctor-pdf:4:in `require'

        from /var/lib/gems/2.3.0/gems/asciidoctor-pdf-1.5.0.alpha.11/bin/asciidoctor-pdf:4:in `<top (required)>'

        from /usr/local/bin/asciidoctor-pdf:23:in `load'

        from /usr/local/bin/asciidoctor-pdf:23:in `<main>'

dhpark@boo:~/hacking/progit2-ko$ 


참고 링크에서는 prawn 버전을 낮추면(2.2 -> 2.1) 해결된다고 되어있는데, gem repository에 2.1 버전이 없다. Orz.


ref: https://github.com/asciidoctor/asciidoctor-pdf/issues/782

happy hackin'



Ubuntu box를 AP로 써보자

tips & tricks/Linux/Unix 2016. 3. 28. 14:50 by manywaypark

참고 링크 보면 금방 따라할 수 있다.

Network Manager에서는 잘 되는데, 아직 Ubuntu GUI에서는 간편하게 할 수는 없다 (KDE 등에서는 간편하게 설정할 수 있다고 함).

ref: http://ubuntuhandbook.org/index.php/2014/09/3-ways-create-wifi-hotspot-ubuntu/


[Mac] byobu on max osx

tips & tricks/Mac 2016. 3. 21. 21:15 by manywaypark

byobu는 내가 쓰는 macport에서는 package로 제공되지 않는구나. Orz

homebrew에서는 지원되는듯...

여튼 아래에 설치로그를 남긴다. 

$ git checkout https://github.com/dustinkirkland/byobu.git

......

$ cd byobu

$ autoreconf -i

configure.ac:6: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:

configure.ac:6: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation

Makefile.am: error: required file './ChangeLog' not found

autoreconf: /opt/local/bin/automake failed with exit status: 1

$ touch ChangeLog

$ autoreconf -i

......

$ make

......

$ byobu

readlink: illegal option -- f

......

$ sudo port install tmux coreutils

......

$ byobu

--> success!!


ref: http://apple.stackexchange.com/questions/64395/byobu-using-invalid-readlink-f-option-on-os-x-mountain-lion


happy hackin'

ssh-copy-id가 없을 때

tips & tricks 2016. 3. 19. 21:10 by manywaypark

ssh-copy-id가 없을 때 (mac에는 기본으로 깔리지 않는 듯),

(그냥 대상 호스트의 authorized_keys 파일에 pubkey를 추가하기만하면 되는데 이 생각을 왜 못했을까? Orz)

cat ~/.ssh/id_rsa.pub | ssh user@machine "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"


ref: http://www.commandlinefu.com/commands/view/188/copy-your-ssh-public-key-to-a-server-from-a-machine-that-doesnt-have-ssh-copy-id


happy hackin'

1 ··· 4 5 6 7 8 9 10 ··· 31 
분류 전체보기 (306)
잡담 (20)
함수형 언어 (65)
emacs (16)
java (18)
tips & tricks (154)
사랑 (1)
가사 (0)
독서 (4)
mobile (6)
비함수형 언어 (2)

공지사항

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

04-26 20:18