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

Emacs Shell에서 PATH 문제

tips & tricks/Mac 2018. 11. 3. 00:17 by manywaypark

예전에는 이 문제가 안생겼던거같은데, 모하비 업그레이드 후에 생긴것같다.

purcell의 emacs.d를 사용하면 자동으로 exec-path-from-shell을 호출하는 것으로 보이는데 이상하다.


일단 향후 해결을 위해 글을 남김.


TBD


refs: 

https://emacs.stackexchange.com/questions/10722/emacs-and-command-line-path-disagreements-on-osx

https://emacs.stackexchange.com/questions/461/configuration-of-eshell-running-programs-from-directories-in-path-env-variable

http://ergoemacs.org/emacs/emacs_env_var_paths.html

키저장:

ssh-add -K [path/to/private SSH key]


저장된 키 리스트 보기:

ssh-add -l


ref: https://superuser.com/questions/88470/how-to-use-mac-os-x-keychain-with-ssh-keys


happy hackin'

 입력 소스 변경을 하기 위한 맥의 기본설정이 Ctrl + Space로 몇년전에 바뀌었는데, 그때 적용만하고 메모를 남기지 않아 이제사 남김.

Emacs 사용자는 Ctrl + Space의 경우 블럭 선택(mark set/clear)이기 때문에 이 설정을 하지 않을 수가 없다.

http://macnews.tistory.com/3736


happy hackin'

문제:

macport로 python36을 설치하고, 안내에 따라 py36-readline을 설치했는데 아래 처럼 crash가 났다.

$ python

Python 3.6.1 (default, Mar 22 2017, 15:53:21) 

[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

>>> ''.join(sorted('azbasdfasdf'))

Python(4369,0x7fffa0cba3c0) malloc: *** error for object 0x10592a4f0: pointer being freed was not allocated

*** set a breakpoint in malloc_error_break to debug

Abort trap: 6



해결:

$ sudo port uninstall py36-readline

$ sudo port install python36 +readline


python36 package를 설치하고 나면 py36-readline도 꼭 설치하라는 식의 메시지가 나오는데 이거 잘못된 것인 듯


ref: https://trac.macports.org/ticket/53360


happy hackin'

Mac에서 스크린샷 찍기

tips & tricks/Mac 2017. 3. 22. 14:07 by manywaypark

링크에 잘 설명 되어 있다.

요점은 shift + command + (control) + 3 or 4


https://support.apple.com/ko-kr/HT201361

http://www.wikihow.com/Take-a-Screenshot-in-Mac-OS-X


happy hackin'

[macport] port select --set

tips & tricks/Mac 2016. 7. 6. 10:49 by manywaypark

macport를 쓰다보면 같은 package이지만 여러 버전이 있는 경우가 있다.

postgresql의 예를 들자면 아래와같이 하면 9.4버전으로 설정을 맞추어준다.

sudo port select --set postgresql postgresql94

설정을 맞춘다는 것의 의미는 각종 파일 및 링크(eg, /opt/local/bin/pg_config 등)를 업데이트해주는 것을 말한다.


ref: http://stackoverflow.com/questions/7832296/usage-of-postgresql-select-on-macports


happy hackin'


PS. packagename_select 패키지를 설치해야되는 듯. postgresql은 postgresql_select

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'

[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'

환경:

Mac OSX 10.6.8 (server)
Win7 SP1 desktop (client 1)
Win7 SP1 tablet (client 2)


문제:
현재 1.4.5 beta에서는 client 쪽 화면으로 넘어갔을 경우 modifier key들 중의 하나를 누르면 이 이상하게 눌려진 상태가 유지되면서 윈도우 메뉴나 단축키 메뉴가 수행되는 오류가 있다.

해결:
이미 issue tracker에 등록이되어 있고 패치도 나와 있었다.
http://synergy-foss.org/tracker/issues/3058

아래처럼 소스, 패치를 받은 후 적용, 컴파일 하면 된다.

$ svn checkout http://synergy-plus.googlecode.com/svn/branches/ synergy
$ cd synergy
$ wget http://synergy-foss.org/tracker/attachments/download/2953/stickykeys.patch
$ patch -p0 < stickykeys.patch
$ ./hm.sh conf -g1
$ ./hm.sh build
$ cd bin
$ synergys -c /path/to/conf


refs:
 - google keywords: synergy 1.4.5 mac server modifier key problem
 - http://synergy-foss.org/tracker/projects/synergy/wiki/Compiling

related:
 - Windows - 레지스트리에서 키보드 타입 변경 방법
 - shift + space 말고 한글 키 사용하게 소스 수정하는 방법

happy hackin'
Mac OS X용 R 설치 직후에 한글을 표시하려 하면 Quartz 화면에서는 한글이 제대로 표시되지 않고 네모 상자로 표시되는 문제가 있다.
~/.Rprofile 파일(없으면 생성)에 다음 내용을 추가:
setHook(packageEvent("grDevices", "onLoad"), function(...){ if(capabilities("aqua")) grDevices::quartzFonts( sans =grDevices::quartzFont(rep("AppleGothic",4)), serif=grDevices::quartzFont(rep("AppleMyungjp",4))) grDevices::pdf.options(family="Korea1") grDevices::ps.options(family="Korea1") } ) attach(NULL, name = "KoreaEnv") assign("familyset_hook", function() { macfontdevs=c("quartz","quartz_off_screen") devname=strsplit(names(dev.cur()),":")[[1L]][1] if (capabilities("aqua") && devname %in% macfontdevs) par(family="sans") }, pos="KoreaEnv") setHook("plot.new", get("familyset_hook", pos="KoreaEnv")) setHook("persp", get("familyset_hook", pos="KoreaEnv"))
refs:
http://www.mail-archive.com/r-sig-mac@stat.math.ethz.ch/msg04538.html

happy hackin'
1 2 
분류 전체보기 (306)
잡담 (20)
함수형 언어 (65)
emacs (16)
java (18)
tips & tricks (154)
사랑 (1)
가사 (0)
독서 (4)
mobile (6)
비함수형 언어 (2)

공지사항

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

04-20 20:56