Computer/linux
-
Error read: Connection reset by peer when sshfs is using.Computer/linux 2010. 12. 21. 00:16
sshfs -o nonempty user@aaa: /home/user/links/ check the following line (or similar) exists in /etc/ssh/sshd_config of aaa Subsystem sftp /usr/libexec/openssh/sftp-server sometime, change the path of sftp-server or install some..., and restart sshd server.
-
FAT32 format in LinuxComputer/linux 2010. 10. 31. 12:54
Before the format, using fdisk must do create new partitions for ext4 and fat32 mkfs.vfat -n ks.vfat -F 32 /dev/sdh2 mkfs.vfat 3.0.1 (23 Nov 2008) mkfs.ext4dev -L ks.ext4 -m 0 /dev/sdh1 mke2fs 1.41.3 (12-Oct-2008) Filesystem label=ks.ext4 OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 424320 inodes, 1694849 blocks 0 blocks (0.00%) reserved for the super user First data block=0..
-
strtok을 사용하지 말자.Computer/linux 2010. 8. 24. 14:05
취미 생활로 혼자 만들고 있는 조그마한 성경 구절 찾아서 캔버스에 비출수 있는 프로그램 코딩중. 이상한 버그를 발견했는데... 1:5 절을 입력하면, 1) prototype query에선 1:5절이 출력되는데 2) 바로 연이어 new query를 실행하면 15 가 출력이 되었다. 재미있는 현상이라 무시할 수 가 없어서 라인 별로 따라가 보니.. strtok를 사용한 함수 이후에 delimiters 로 정의내린 것을 제외한 나머지가 원본의 문서를 바꾸는 것을 발견했다. 뭐 그래서 1) 구글링 with strtok modify original string https://www.securecoding.cert.org/confluence/display/cplusplus/STR06-CPP.+Do+not+assum..
-
awk with a running average and sample deviationComputer/linux 2010. 8. 18. 01:02
# License : http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en # Author: Jeong Han Lee # email : jeonghan 'dot' lee 'at' gmail 'dot' com # Date: Thursday, August 19 10:39:49 EDT 2010 # Version: 0.0.1 # # This script can calculate a running mean, a sample deviation # , and a standard deviation from xterm output. # # History: # 0.0.1 Thursday, August 19 10:41:44 EDT 2010 # # # How to use......
-
emacs 한글 폰트 및 한글 입력Computer/linux 2010. 7. 22. 02:58
Put Droid Sans Mono TTF font and other TTF fonts into /usr/share/fonts/ directory. See 2007/08/08 - [computer/linux] - How to use MS windows fonts and ttf in the Ubuntu Linux Add the following lines into ~/.emacs file (global-set-key [?\S- ] 'toggle-input-method) (global-set-key [f5] 'insert-date) ;; not necessary for 23-2 emacs ;;(global-set-key (kbd "C-x ") 'previous-buffer) ;;(global-set-key ..
-
automake & autoconfComputer/linux 2010. 6. 26. 16:40
src/main.cc src/main.cc src/sdecoder.h src/sdecoder.cc $ emacs main.cc& #include int main(int argc, char *argv[]) { Gtk::Main kit(argc, argv); Gtk::Window window; Gtk::Main::run(window); return 0; } $ emacs Makefile.am & AUTOMAKE_OPTIONS = subdir-objects ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} AM_CPPFLAGS = $(DEPS_CFLAGS) bin_PROGRAMS = sDecoder sDecoder_SOURCES = src/main.cc src/sdecoder.h src/sdeco..
-
Unix Time (Epoch)Computer/linux 2010. 4. 27. 23:42
C code (copied from wiki modified in order to convert a known unix epoch time #include #include int main(void) { time_t now; time_t old; struct tm *ts; struct tm *ots; char buf[80]; char buf2[80]; /* Get the current time */ now = time(NULL); ts = localtime(&now); strftime(buf, sizeof(buf), "%a %Y-%m-%d %H:%M:%S %Z", ts); printf("%s\n", buf); old = 1257169741; ots = localtime(&old); strftime(buf2..