These are interesting materials on Python’s magics.
There is an installation problem on Erlang (R14B04) with Macport. When it tests its checksum, it produces ‘checksum error’ for opt_doc_html_R14B04.tar.gz. I googled on this and found some others reports. Weirdly, the file’s checksum was not updated in the Portfile of the package.
It can be resolved with updating the checksum of the following into the Portfile:
bash-3.2# openssl rmd160 < ./otp_doc_html_R14B04.tar.gz
(stdin)= 0e44a933ae35fe95d1ecd9958c9e86ce398e259f
bash-3.2# openssl sha1 < ./otp_doc_html_R14B04.tar.gz
(stdin)= 86f76adee9bf953e5578d7998fda9e7dfc0d43f5
And, then
$ sudo port install elrang
Plus: When a compilation fails, please add the following snippet into the ‘darwin 11’ section of the Profile.
if {${configure.compiler} == “clang”}
{
configure.compiler llvm-gcc-4.2
}
configure.cflags-delete “-std=c99”
This is my 1 cent tip for speeding up building projects using Ramdisk.
Steps
1. Add more RAM modules to your MacBook (up to 8GB)
2. Make a temporary ramdisk(1GB in size) using the following command:
diskutil erasevolume HFS+ “ramdisk” `hdiutil attach -nomount ram://2097152`
3. Now, the ramdisk is setup in /Volumes/ramdisk. Check it with ‘mount’ command.
/dev/disk1 on /Volumes/ramdisk (hfs, local, nodev, nosuid, noowners, mounted by USER)
4. Change the build path in Xcode: File -> Project Settings. Set ‘/Volumes/ramdisk’.
5. All done.
Benchmark Test: You can compare the speed of both ramdisk and HDD with a write test.
dd if=/dev/zero of=/tmp/xxx bs=8k count=100000 (this took 1.8secs in Macbook 2.26GHz)
dd if=/dev/zero of=/Volumes/ramdisk/xxx bs=8k count=100000 (this took 18secs in Macbook 2.26GHz)
Notice: Unmount the ramdisk.
hdiutil detach /dev/disk1
Learning from Bacteria about Social Networks (Google Tech Talk)
To connect Amazone EC2 instances with SSH, it needs to specify its identity(private key, a keypair from EC2). Explicitly, this can be done with ‘ssh -i keypair_file hostname’. To apply this in the system wide, it needs to expose the identity(key pair) file in a user’s “$HOME/.ssh”. This is very useful for a tool, pssh (parallel ssh), in which it does not support explicit way of specifying the identity file. I use pssh to make changes on multiple EC2 instances with one script from my Macbook.
Recently, I upgraded my Macbook to Lion (GM Seed version). I found the OpenSSH’s identity doesn’t work any more. After some debugging on that, I figured out that it needs to specify the identity file with ‘config’ file. Before that, I just placed a EC2 keypair file in “$HOME/.ssh”.
A ‘config’ file of SSH maps a hostname and its identity file as follows:
$HOME/.ssh/config:
Host host1.amazon.com
IdentityFile ~/.ssh/identityHost host2.amazon.com
IdentityFile ~/.ssh/identityHost 1.2.3.4
IdentityFile ~/.ssh/identity
It needs to add the FQDN and the IP address hostname of a host seperately.
Now, we can see that SSH refers the config file.
debug1: Reading configuration data /Users/ghost/.ssh/config
debug1: Applying options for xxxx.com
debug1: Reading configuration data /etc/ssh_config
debug1: Trying private key: /Users/ghost/.ssh/identity
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
The below pictures were obtained from my recent work. As growing in size, it is becoming an art. This is similar in nature. The beauty of nature comes from its size and its unpredictable outcome.




집에 설치되어 있는 넷기어 유무선 라우터가 최근 iPhone과 iPad의 접속이 매끄럽지 못하고 접속을 튕겨내는 등의 작동이 이상해서 라우터의 로그를 메일로 받아볼 필요가 생겼다. 넷기어 라우터 셋팅에 SMTP서버와 사용자 ID를 설정하면 주기적으로 메일을 받아 볼 수 있는 기능이 있는데 SSL/TLS는 지원하지 않기 때문에 직접 GMail로 메일을 받아 보기 위해서 몇가지 작업이 필요했다. 로컬네트워크에 보안기능이 없는 SMTP서버를 설치하고 다시 GMail로 퍼워드 시키는 방법도 있기는 하지만 가장 간편한 방법으로 stunnel을 택했다. stunnel은 보안기능이 구현되어 있지 않은 네트워크 종단에 암호화 통신을 제공하는 일종의 Proxy다.
[1] 넷기어라우터 —-(plain)—> GMail (SSL/TLS)
[2] 넷기어라우터 —-(plain)—> 로컬메일서버(SMTP)/퍼워드 —-(SSL/TLS)—-> GMail
[3] 넷기어라우터 —-(plain)—> stunnel —-(SSL/TLS)—-> GMail
#1. stunnel.pem 생성
개인키와 자체인증서를 만든다.
openssl genrsa -out ./private.pem
openssl req -new -x509 -key private.pem -out ./cacert.pem -days 1095
private.pem과 cacert.pem의 바디를 stunnel.pem으로 합친다.
#2. stunnel 셋업
중략
cert = /Users/xxxx/stunnel.pem
중략
[smtps]
accept = 25
connect = smtp.gmail.com:465
#3. stunnel 실행
sudo stunnel ./stunnel.conf
