Source of .xcs files: [https://github.com/mayjabber/solarized/commit/2a2604b40f0ea58a61371be5950dc2fd6f9fbe36]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
google-authenticator와 관련된 노트 | |
https://code.google.com/p/google-authenticator/ | |
google-authenticator는 RFC 6238의 TOTP와 RFC 4226의 HOTP를 지원한다. | |
HMAC-SHA-1 알고리즘을 사용하는 것 같고, 30초에 한 번씩 바꾸고, 결과는 6자리 숫자로 나온다. | |
그리고 base32로 인코딩된 키를 직접 입력하는 기능이 있다. | |
구글 2단계 인증 (https://accounts.google.com/b/0/SmsAuthSettings) 설정 시 | |
바코드를 스캔하는 대신 키를 직접 입력하는 옵션이 있는데 base32로 인코딩된 32자리 문자열이 제공된다. | |
RFC 문서에서 OTP 알고리즘의 reference implementation을 찾을 수 있다. |
작은 팁 모음
- gist 설명 부분에 내용을 적어야 빠른 검색이 된다.
krdc 4.11 + freerdp-1.1.0_beta1_p20130710 조합에서 krdc를 사용할 수 없었다. 접속을 시도했을 때 파란 화면만 나오고 아무런 반응이 없었다.
원인을 알아보니 암호를 묻는 prompt가 gui에 나타나지 않고 command line에 나타나는 것이 문제였다. 그리고 freerdp의 경우 -u 옵션으로 사용자를 지정해주어야 한다. 이 옵션이 없을 경우 username으로 무엇을 사용하는지 잘 모르겠다. 리눅스 사용자 이름을 쓰는 것은 아닌 것 같은데, 이렇게 생각하는 이유는 리눅스 사용자 이름과 접속하려는 서버의 사용자 이름이 동일한데도 이 옵션 없이 암호만 입력하면 로그인이 되지 않았기 때문이다.
참고: KDE Bug 322361
문제: gcc-4.6.4를 쓰면 llvm을 emerge할 수 없다.
gcc-4.6.4.ebuild를 살펴보면 gcc-4.6.3.ebuild와 많이 다르다. 특히 "STDCXX_INCDIR" 등의 항목이 있는데, 확실한 것은 아니지만 이것 때문에 header file이 이상한 곳에 설치되는 것 같다. 로그를 보면 algorithm을 찾을 수 없다고 나오는데 다음과 같이 include path를 두 개 추가해서 컴파일하면 컴파일이 된다.
/var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src-amd64/Release/bin/clang -fno-exceptions -fPIC -funwind-tables -I/var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src/projects/compiler-rt/lib -I/var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src/projects/compiler-rt/include -Wall -Werror -O3 -fomit-frame-pointer -m64 -fPIE -fno-builtin -fno-rtti -c -o /var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src-amd64/tools/clang/runtime/compiler-rt/clang_linux/msan-x86_64/x86_64/SubDir.lib__msan/msan_linux.o /var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src/projects/compiler-rt/lib/msan/msan_linux.cc -I/usr/lib64/gcc/x86_64-pc-linux-gnu/4.6.4/include/g++-v4.6 -I/usr/lib64/gcc/x86_64-pc-linux-gnu/4.6.4/include/g++-v4.6/x86_64-pc-linux-gnu
해
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mutt & Maildir Mini-HOWTO | |
# http://www.elho.net/mutt/maildir/ | |
set mbox_type=Maildir | |
set folder="~/Maildir/" | |
set mask="!^\\.[^.]" | |
set record=".Sent" | |
set postponed=".Drafts" | |
set spoolfile="~/Maildir/" | |
mailboxes `echo -n "+ "; find ~/Maildir -maxdepth 1 -type d -name ".*" -printf "+'%f' "` | |
macro index c "<change-folder>?<toggle-mailboxes>" "open a different folder" |
Terminal 설정을 바꾼 후 vim에서 solarized 쓰는 방법. 참고
- 이 방법을 쓰려면 terminal 색상을 반드시 적절히 바꾸어야 한다. 바꾸는 방법은 terminal 마다 다른데, 보통 검색해보면 방법이 있다. 참고로 강조 문자에는 강조 색을 사용하도록 설정해야 한다.
- 아마도 .vimrc에 "let g:solarized_termtrans=1"가 필요할 것이다.
- .bashrc 등은 수정할 필요가 없다.
- 이 방법은 terminal의 16색을 완전히 다른 색에 mapping하는 방법이다. 그렇기 때문에 이 방법을 쓰면 dir의 색상 등이 제대로 보이지 않을 수도 있다.
Terminal 설정을 최대한 바꾸지 않고 vim에서 solarized 쓰는 방법. 참고
- .vimrc에 "let g:solarized_termcolors=256"를 추가해야 한다.
- .bashrc, .tmux.conf 등을 수정하여 xterm-256color, screen-256color 등을 사용하게 만들어야 하며, 이렇게 하지 않고 solarized를 사용하면 흑백(gray 없이 black/white)으로 나온다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
print('Hello, World!') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
volatile int tmp; | |
static const int N = 123456789; | |
/* Linux method #0: use gettimeofday() (obsolete?) | |
*/ | |
#include <sys/time.h> | |
// timeradd, timersub, etc. macros are _BSD_SOURCE. | |
// Those will be defined only if the symbol __USE_BSD is defined. |