2012년 3월 20일 화요일

Rooting Nexus One 2.3.6 on Mac OS X

1. Install Android SDK
2a. Make sure that adb is on your PATH
2b. Enable "USB Debugging" Menu/Settings/Applications/Development
2c. Enable "Unknown Sources" Menu/Settings/Applications
3. Download zergRush
4. Unzip zergRush (It will be unzipped automatically on Mac to ~/Downloads/DooMLoRD_v4_ROOT-zergRush-busybox-su or something like that)
5. Download runme.sh
6. Copy runme.sh into the directory (Refer to Step 4)
7. Go into the directory and ./runme.sh

2012년 3월 16일 금요일

for i in array?

javascript에서,

var a=['a', 'b', 'c'];
for (i in a) {
  console.log(i);
}

이런 경우,

a
b
c

가 아니라,

0
1
2

가 출력된다. 원하는 것을 출력하려면,


var a=['a', 'b', 'c'];
for (i in a) {
  console.log(a[i]);
}

뭔가 좀..



node-apn으로 Push Message 보내기

우선 npm 설치하고, npm으로 node-apn 설치.
$ curl http://npmjs.org/install.sh | sh
$ npm install apn
node-apn의 설명에 따라 cert.pem과 key.pem을 만들고, 메시지 송신 시험. 성공.

2012년 3월 15일 목요일

node.js 컴파일

컴파일에 7분 45초 걸림. iMac에서 한번 해봐야겠다.

node.js 설치하기

node.js 0.6.12 다운로드. 압축 풀고,

./configure

에러.

g++이 없단다.

apt-get install g++

다시 ./configure했으나 이번에는 openssl이 없단다.

apt-get install openssl

다시 ./configure했으나 이번에도 openssl을 못찾는단다. Openssl development package가 필요한거군.

apt-get install libssl-devel

다시 ./configure. 여전히 openssl not found.

Checking for program g++ or c++          : /usr/bin/g++
Checking for program cpp                 : /usr/bin/cpp
Checking for program ar                  : /usr/bin/ar
Checking for program ranlib              : /usr/bin/ranlib
Checking for g++                         : ok
Checking for program gcc or cc           : /usr/bin/gcc
Checking for gcc                         : ok
Checking for library dl                  : yes
Checking for openssl                     : not found
Checking for function SSL_library_init   : yes
Checking for header openssl/crypto.h     : yes
Checking for library util                : yes
Checking for library rt                  : yes
Checking for fdatasync(2) with c++       : yes
'configure' finished successfully (1.390s)
root@kt02:~/download/node-v0.6.12#

잠시 구글링. pkg-config 이슈로군.

apt-get install pkg-config
./configure

이번에는 모두 ok.