Shammer's Philosophy

My private adversaria

2016-01-01から1ヶ月間の記事一覧

Change character encoding to UTF-8

This is an second version of 文字コードをまとめて変換するスクリプト - Shammerism. The before article handles multiple files at one time, but this version handles only 1 file. #!/bin/bash NKF_CHECK=`which nkf | wc | awk '{print $1}'`; if [ …

Install Clozure CL 1.11 to Debian wheezy running as Xen VM

I tried to install Clozure CL 1.11 into my Debian wheezy running as Xen VM. At first, I tried the way as well as Install Clozure CL 1.10 to Debian wheezy - Shammerism, but it finished with Error. root@tora2017:/usr/local/src/ccl/lisp-kerne…

文字列を16進数の配列に変換する

Socket 通信をバイトでやりとりするときに、文字列をそのまま16進数の文字列に変換したいことがあるのでそれを書いてみた。想定では、0から9、aからfのいずれかの1文字、2文字で一つの16進数を表現すること、先頭から読み込むと先頭が1バイトの時に正確な値…

How to send long http header requests with curl?

This is a memo for me. $ HEADER="X-Header: X" $ for i in `seq 1 65535`;do HEADER="${HEADER}X";done $ curl -v -H "${HEADER}" http://www.test.local/The parameter should be enclosed with double quote. Without enclosing double quote, curl can …

Socket server sample with string-output-stream returns response from text files

string-output-streamをサーバーで使ってみる - Shammerismを改良し、応答をファイルから読み出したデータで返すことにする。あらかじめ、x.txtという名前のファイルを用意しておく。 $ echo 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxy…