티스토리

개발, 검색, 함수
검색하기

블로그 홈

개발, 검색, 함수

manywaypark.tistory.com/m

manywaypark 님의 블로그입니다.

구독자
0
방명록 방문하기
공지 공지 - 일반 공지 모두보기

주요 글 목록

  • Qt에서 emacs key binding 사용하기 Help > About Plugins... 에서 emacs plugin을 활성화 (이후 Qt Creator 재시작 필요함) Tools > Options... 에서 Environment > Keyboard 에서 아래 Emacs.kms 다운로드 후 import! Emacs.kms ref: machinekoder.com/running-qt-creator-in-emacs-mode/ 공감수 0 댓글수 0 2020. 8. 19.
  • Qt Creator 갑자기 코드 자동완성이 되지 않을 때 해결법(Automatic Code Completion Disabled all of sudden) 갑자기 코드 자동완성이 안되는 경우가 발생했는데, 해결법은 아래와 같다. 좀 이상하게도 플러그인을 disable해야한다. Help > About Plugins... 에 들어가서 ClangCodeModel을 시작시 로드하지 않게 uncheck한 다음 Qt Creator를 재시작한다. 현재 환경 참고: Qt Creator 4.11.0 Based on Qt 5.14.0 (MSVC 2017, 32 bit) Built on Dec 10 2019 12:27:13 From revision 017ed74400 ref: https://forum.qt.io/topic/107498/code-completion-is-not-working-in-qtcreator/3 Code completion is not working in .. 공감수 0 댓글수 0 2020. 4. 3.
  • Function has no local return dialyzer(discrepancy analyzer)는 Erlang의 static analyzer(정적분석도구)이다. type safety가 확보되면 아주 많은 오류를 줄일 수 있다. 그런데 이 좋은 도구인 dialyzer를 사용하다보면 언듯 보기에 멀쩡한 부분에서 "function foo/2 has no local return" 이라는 경고를 만나게 된다. 일단 참고 아티클에서 발췌: 'Function Name/Arity has no local return' is the standard Dialyzer warning emitted whenever a function provably doesn't return anything (other than perhaps raising an exception) b.. 공감수 1 댓글수 0 2020. 2. 27.
  • Elixir 소스파일 전반부의 정리 module을 정의할 때 attribute, directive 등의 순서는 아래와 같이 정리하면 좋다. @moduledoc @behaviour use import alias require @module_attribute defstruct @type @callback @macrocallback @optional_callbacks ref: https://github.com/christopheradams/elixir_style_guide#module-attribute-ordering christopheradams/elixir_style_guide A community driven style guide for Elixir. Contribute to christopheradams/elixir_style_guide.. 공감수 0 댓글수 0 2020. 2. 27.
  • USB memory 용량이 제대로 인식되지 않을 때 명령행에서 diskpart를 이용하면 된다. diskpart.exe 실행해서 한번에 해결하기: diskpart.exe DISKPART> list disk ...... DISKPART> select disk [disk-number-here] DISKPART> clean DISKPART> create partition primary DISKPART> list partition ...... DISKPART> select partition 1 DISKPART> active DISKPART> format fs=fat32 quick NOTE: clean 단계 이후에는 그냥 GUI에서 format 해도 될 듯하다. ref: https://miuna3.tistory.com/105 happy hackin' 공감수 0 댓글수 0 2020. 1. 21.
  • “Xcode” could not be installed. Please try again later. 어이없게도 해결법은 os를 업그레이드(to Catalina 10.15.1)하는 것이었다. ref: https://forums.developer.apple.com/thread/125322 Xcode 11.2 not updating. |Apple Developer Forums I have a same problem when updating to xcode 11.2. At first, the message of launchpad's status told me "Downloading x.xx of 4.16 GB". After done downloading, the message showed me "Installing", but after for a while, the download process started.. 공감수 0 댓글수 0 2019. 12. 4.
  • runtime에 logger level 변경하기 eg, Logger.configure(level: :info) ref: https://christopherjmcclellan.wordpress.com/2018/06/02/how-to-change-elixir-log-levels-for-a-running-application/ How to Change Elixir Log Levels for a Running Application Logging is essential to any production system, but it’s also terribly easy to make your logs so noisy they become worthless. That’s why I’m a big fan of carefully specifying the c… chris.. 공감수 0 댓글수 0 2019. 12. 4.
  • docker container의 run command 알아내기 현재 실행중인 docker container를 어떻게 실행했는지 잘 생각이 안나는 경우가 있다 (중요한 container는 run command를 파일로 남겨 놓는 것을 추천한다). runlike라는 utility를 사용하면 되는데.... local에 깔기 귀찮으니깐 docker를 이용해서 이렇게 한다. docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \ assaflavie/runlike YOUR-CONTAINER 예: $ sudo docker run --rm -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike repo ...... docker run --name=repo --hos.. 공감수 0 댓글수 0 2019. 9. 29.
  • vcpkg 사용시 특정 버전의 library 설치하는 방법 vcpkg는 다 좋은데 특정 버전/이전 버전의 라이브러리를 쓰려면 명시적인 명령어가 없어서 좀 번거롭다. 다음의 과정을 거쳐서 특정버전의 라이브러리를 쓸 수 있다. 라이브러리의 특정 버전 commit id(sha)를 알아낸다. ports/ 디렉토리의 파일들을 sha를 사용해서 가져온다(checkout). 라이브러리를 (재)설치한다 현재 설치된 최신의 protobuf(3.9.1)를 3.8.0로 교체하는 예를 들어보겠다. C:\libs\vcpkg>git log ports/protobuf ...... commit 1a63672f8fa796b044c839c777f7113ccea6e635 Author: myd7349 Date: Wed Jun 19 04:34:43 2019 +0800 [protobuf] Update.. 공감수 1 댓글수 0 2019. 9. 8.
  • Qt에서 DLL 생성시 맨뒤의 version number 없애기 윈도우즈에서는 뒤에 버전번호가 붙은 DLL은 좀 귀찮은 면이 많다. 아마도 자동으로 symlink를 생성할 수 없어서 기본으로 버전번호가 붙은 DLL만 생성되는 것으로 보인다. 따라서 그냥 없애는 것이 편하다. 간단하게 아래 두 방법 중 하나를 선택하면 되는데... CONFIG += skip_target_version_ext또는 VERSION = 0.0.1 win32:TARGET_EXT = .dllwin32에서만 버전번호 없는 dll을 하나 더 생성하게 하는 두번째 방법이 좀더 유용한듯하다. (즉, 다시말해 완전히 없애는 첫번째 방법을 취한다면 unix 계열에서 우아하게 버전번호 붙이고 버전 번호 없는 대표명으로 링크 생성하는 것이 동작하지 않는다) refs: https://stackoverflow.co.. 공감수 0 댓글수 0 2019. 8. 5.
  • windows product key 보기 Single board computer나 embedded device에 미리 설치되어 나오는 윈도우즈의 경우 product key를 따로 제공하지 않는 경우가 있다. command line에서 아래처럼 하면 볼 수 있다. wmic path SoftwareLicensingService get OA3xOriginalProductKey ref: https://www.groovypost.com/howto/find-your-windows-10-product-key/ How to Find your Windows 10 Product Key Microsoft has made every effort to make Windows 10 licensing convenient. That said, there are times .. 공감수 0 댓글수 0 2019. 8. 1.
  • Phoenix Channel에서의 데이터 전송(push, broadcast, broadcast_from) 참고 링크에 있는 것을 요약한다. broadcast - channel내의 모든 client들에게 전송broadcast_from - 메시지를 발송한 client를 제외한 channel내의 모든 client들에게 전송push - 메시지를 발송한 client에게만 전송 다르게 생각해보면 broadcast = broadcast_from + push ref: https://www.reddit.com/r/elixir/comments/4t6k6w/phoenix_what_is_the_difference_between_broadcast/ happy hackin' 공감수 0 댓글수 0 2019. 2. 18.
  • eshell buffer 내용 지우기 개발 도중에 eshell buffer에서 server 프로그램 등을 실행하는 경우가 있는데 가끔 며칠 동안 로그가 쌓이면 텍스트 검색 등이 무지하게 느려진다.다음 함수를 *scratch* buffer 등에서 한번 eval(C-x, C-e)해주거나 초기화 과정에서 eval될 수 있도록 설정한 후에 eshell buffer에서 clear를 입력해주면 버퍼가 깨끗이 비워진다.(defun eshell/clear () "Clear the eshell buffer." (let ((inhibit-read-only t)) (erase-buffer) (eshell-send-input)))이걸 왜 여태껏 모르고 살았던 거지? Orz. ref: https://emacs.stackexchange.com/questions/12.. 공감수 0 댓글수 0 2019. 1. 16.
  • Emacs Shell에서 PATH 문제 예전에는 이 문제가 안생겼던거같은데, 모하비 업그레이드 후에 생긴것같다. purcell의 emacs.d를 사용하면 자동으로 exec-path-from-shell을 호출하는 것으로 보이는데 이상하다. 일단 향후 해결을 위해 글을 남김. TBD refs: https://emacs.stackexchange.com/questions/10722/emacs-and-command-line-path-disagreements-on-osxhttps://emacs.stackexchange.com/questions/461/configuration-of-eshell-running-programs-from-directories-in-path-env-variablehttp://ergoemacs.org/emacs/emacs_env_.. 공감수 0 댓글수 0 2018. 11. 3.
  • docker에 redmine 설치하기 기본적으로 container 두 개를 postgresql, redmine으로 실행하면 된다.두 container를 연결하는 것말고는 뭐 특별한 것은 없다.아래 참조 링크에서는 backend DB로 MySQL을 사용하는데 나는 Postgresql을 선호하므로 Postgresql을 썼다. 최초 설정:docker run --name my.postgres -e POSTGRES_PASSWORD=DB_PASSWORD_HERE -d -p 5432:5432 postgresdocker run -d --name my.redmine -p 3000:3000 --link my.postgres:postgres redmine 이제 http://localhost:3000 에 접속하면 redmine을 사용할 수 있다. 최초의 user.. 공감수 0 댓글수 0 2018. 11. 1.
  • [cygwin] command line에서 cygwin package 설치하기 apt-cyg라는 간단한 script를 깔면 된다. 설치:$ wget https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg$ install apt-cyg /bin 사용:$ apt-cyg install emacs refs:https://stackoverflow.com/questions/9260014/how-do-i-install-cygwin-components-from-the-command-linehttps://github.com/transcode-open/apt-cyg happy hackin' 공감수 0 댓글수 0 2018. 10. 31.
  • qmake file 에서의 INSTALLS qmake 파일에서 INSTALLS에 뭔가 추가할 때는 한번에 하나씩해야한다.problem:.lib 파일과 .dll을 각각 /path/to/install의 하위에 설치하려는 (제법 멋진) 의도를 가진 아래 코드는 (n)make install 했을 때 제대로 동작하지 않고 .lib 파일만 설치된다. target_lib.path = /path/to/install/lib target_lib.files = $${DESTDIR}/*.lib target_dll.path = /path/to/install/bin target_dll.files = $${DESTDIR}/*.dll INSTALLS += target_lib target_dll solution:이렇게 두 종류의 파일 타입을 각각 써줘야 제대로 동작한다. ta.. 공감수 0 댓글수 0 2018. 10. 26.
  • 개발용 Windows VM MS에서 개발 환경이 구축된 VM을 배포하는구나.https://developer.microsoft.com/ko-kr/windows/downloads/virtual-machines 여태 나만 모른 건가? happy hackin' 공감수 0 댓글수 0 2018. 10. 21.
  • Qt + MSVC 2017 현재 기준(VS2017)으로 설명한다. 일단 VS를 설치하면 기본적으로는 VC가 안깔린다. 요즘은 다들 C++ 따위 쓰지 않나봐. Orz.VC 설치:Visual Studio Installer에서 Visual Studio Community 2017 > (More 밑의) Modify > Desktop development with C++ 을 선택해서 VC를 설치한다.Qt 설치:Qt 설치 시에 msvc 어쩌구 하는 component들 중에서 2017 관련이 보이면 그걸 설치하고, 없으면 2015 관련을 설치한다 (2015와 2017은 호환된다고 어디서 봤다). 매번 헷갈리네. 이건 내 문제가 아니라 MS 문제일지도... happy hackin' refs: https://forum.qt.io/topic/7896.. 공감수 0 댓글수 0 2018. 10. 16.
  • @impl true 현재 내가 사용하는 elixir version은 1.6.5이다.1.5.0의 changelog에 나오는 내용이므로 1.5.0 이상의 버전에서는 다 적용될 것으로 예상됨. callback의 구현임을 명시적으로 알려줄 때 "@impl true"를 함수의 앞에 써준다. sample: defmodule MyApp do @behaviour Plug @impl true # 이 함수 `init/1`은 문서화에서 제외된다. 암묵적으로 @doc false로 설정된다. def init(_opts) do opts end @impl true @doc """ 여기 내용은 그대로 문서화에 적용됨 see `Plug.call/2` """ def call(conn, _opts) do Plug.Conn.send_resp(conn, 200.. 공감수 0 댓글수 0 2018. 7. 12.
  • Ubuntu에 Nvidia driver 설치하기 Ubuntu에서 Nvidia driver 깔기장치가 인식되어있는지 확인:$ ubuntu-drivers devicesdriver 자동 설치:$ sudo ubuntu-drivers autoinstall 참조 링크에 더 다양한 방법이 있다. ref: https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-ubuntu-18-04-bionic-beaver-linux happy hackin' 공감수 0 댓글수 0 2018. 5. 29.
  • visual studio에서 google test를 쓰는 법 Visual Studio 2017에는 google test가 통합되었구나. 세상이 좋아지고 있다.https://docs.microsoft.com/ko-kr/visualstudio/test/how-to-use-google-test-for-cpp happy hackin' 공감수 0 댓글수 0 2018. 5. 2.
  • ssh reverse tunneling 기본적으로 ssh, autossh 등을 사용하면 됨. systemd 내에서 autossh를 쓸 경우는 좀 tricky한 상황이 생기는 듯 (portforwarding 환경에서는 port forwading에 실패했을 경우 재시작할 때 제대로되지 않는다.autossh는 자동재시작 등의 기능이 있는데 이것은 systemd에서 제공하는(아주 잘 하는) 기능이다. 두개를 섞으면 좀 이상해지는 것으로 보인다.좀 검색을 해보니 ssh + systemd가 제대로 잘 동작하는 것으로 보인다. 좀더 시간을 두고 해결하는 것도 고려해보자. /etc/systemd/system/secure-tunnel@.service 파일: [Unit]Description=Setup a secure tunnel to %IAfter=networ.. 공감수 0 댓글수 0 2018. 3. 12.
  • MSVC warning C4003: not enough actual parameters for macro 'max' problem:Windows, MSVC 환경에서 min이나 max가 포함된 qt 파일(eg, qrandom.h 등)에서 다음과 같은 경고가 나온 후에, 괴상한 에러가 나면서 컴파일에 실패하는 경우가 발생했다.warning C4003: not enough actual parameters for macro 'max' solution:windows.h가 include 되기 전에 다음과 같은 선언을 넣어준다.#ifndef NOMINMAX# define NOMINMAX#endif ref: https://stackoverflow.com/questions/6884093/warning-c4003-not-enough-actual-parameters-for-macro-max-visual-studio-2010 happy h.. 공감수 0 댓글수 0 2018. 1. 31.
  • windows에서 chocolatey를 이용해 32bit 버전의 erlang 설치하기 choco install erlang --forcex86=true이렇게 하면 설치는 제대로 되지만 shim이 잘못된 위치(64bit용 위치 즉, \Program Files\ 아래)를 가리키게 되어있어서 오류가 난다. PS C:\ProgramData\chocolatey> erlCannot find file at 'c:\program files/erl9.0/erts-9.0/bin/erl.exe' (c:\program files\erl9.0\erts-9.0\bin\erl.exe). This usually indicates a missing or moved file. tools/shimgen.exe를 사용해서 다시 생성하면 해결된다. PS C:\ProgramData\chocolatey\bin> ren erl.e.. 공감수 0 댓글수 0 2017. 12. 29.
  • phoenix에서 npm package 사용하기 d3를 예제로 설명한다. 대부분의 npm package는 동일한 방법으로 사용가능하다. npm을 이용해 d3 설치 cd /path/to/my_web_appcd ./assets/npm install --save d3 brunch-config.js 파일에 다음 내용 추가 npm: { ...... globals: { ...... "d3": 'd3' } } 이젠 app.js 파일에 등록됨. 다시 말해 app.js를 include하는 모든 페이지의 javascript에서 d3를 사용할 수 있다. happy hackin' 공감수 0 댓글수 0 2017. 12. 26.
  • build emacs for windows 64 window에서 emacs 직접 build 하는 방법:(chocolatey에 포함된 emacs64 package 만드는 사람이 작성한 것)https://github.com/zklhp/emacs-w64/wiki/Guideline-for-building-Emacs-in-MSYS2-MinGW-w64-system happy hackin' 공감수 0 댓글수 0 2017. 12. 5.
  • byobu에서 color 표시 (실제로는 terminal 변경) byobu 내에서 text-mode(=nox) emacs를 실행하면 기본 테마(특히 색상)가 적용되지 않는 것처럼 보이는데, 사실은 byobu의 기본 terminal 설정이 그냥 날(raw) screen이라서 컬러를 표시하지 못하는 것이다. 내 경우는 기본 login terminal에서 컬러표시가 잘되었으므로 아래와 같이 해서 컬러가 표시되게 했다.$ echo $TERMxterm-256color$ echo 'set -g default-terminal "xterm-256color"' >> ~/.byobu/profile.tmux refs:https://unix.stackexchange.com/questions/240532/getting-256-colors-to-work-with-byobuhttp://osma.. 공감수 0 댓글수 0 2017. 9. 21.
  • named argument 사용 대충 map을 이용하면 되는데... 좀더 깔끔한 방법이 있다.자세한 것은 참조 링크 참조.결론은 아래처럼 NamedArgs를 mix.exs 의존성에 추가하고 필요한 모듈에서 use NamedArgs만 추가하면 끝. def deps do [ {:named_args, "~> 0.1.0"} ] end사용은 이렇게...defmodule Talk do use NamedArgs def introduction(opts \\ [name: "Sarah", birthday: "1985-12-30"]) do IO.puts "Hi my name is #{opts[:name]} and I was born on #{opts[:birthday]}" endend refs:https://blog.praveenperera.com/nam.. 공감수 0 댓글수 0 2017. 9. 11.
  • emacs 창 최대화해서 실행하기(maximize emacs window on startup) emacsemacs -mm emacsclient아래 방법들 중 하나로 한다.emacsclient -c -F "'(fullscreen . fullboth)"emacsclient -c -F "'(fullscreen . maximized)"alias ecx="emacsclient -c -F \"'(fullscreen . maximized)\""emacsclient -c -F "((width . 100) (height . 100) (left . 400))" ref: https://stackoverflow.com/questions/20285965/how-can-i-launch-emacsclient-maximized-from-the-commandline happy hackin' 공감수 0 댓글수 0 2017. 9. 6.
    문의안내
    • 티스토리
    • 로그인
    • 고객센터

    티스토리는 카카오에서 사랑을 담아 만듭니다.

    © Kakao Corp.