2014년 5월 20일 화요일

REMOTE HOST IDENTIFICATION HAS CHANGED

ssh-keygen -R 100.100.100.100

2014년 5월 13일 화요일

multi open for eclipse on the mac

/Users/pointermans/Documents/Work/adt-bundle-mac-x86_64-20140321/eclipse/Eclipse.app/Contents/MacOS/eclipse &

2014년 4월 30일 수요일

get all keys and values of SharedPreferences

            SharedPreferences prefb = getSharedPreferences(getResources().getString(R.string.app_name), Context.MODE_PRIVATE);
            Map<String,?> keys = prefb.getAll();

            for (Map.Entry<String,?> entry : keys.entrySet()){
                Log.d(TAG, "SharedPreferences::" + entry.getKey() + "::" + entry.getValue().toString());
            }

2014년 4월 24일 목요일

how to service registering the service for runnable jar file on centos

vi /etc/init.d/astmiddleware

#! /bin/sh
### BEGIN INIT INFO
# Provides:          musesoft
# Required-Start:    $local_fs
# Required-Stop:     $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# X-Interactive:     false
# Short-Description: service init script
# Description:       Start/stop an service script
### END INIT INFO

DESC="astmiddleware"
NAME=astmiddleware
#DAEMON=

do_start()
{
   echo "starting!";
}

do_stop()
{
   echo "stopping!"
}

case "$1" in
      start)
            cd /usr/local/src/astmiddleware
            /usr/bin/java -jar astmiddleware.jar &
            ;;
      stop)
            killall -v java
            ;;
esac
exit 0

chmod a+rx /etc/init.d/astmiddleware
chkconfig --add /usr/local/src/astmiddleware

chkconfig --list

chkconfig --del astmiddleware

2014년 4월 21일 월요일

kill process by the command

ps -aux | grep astm*

9181 ?        Sl     4:05 java -jar astmiddleware.jar
19225 pts/1    Tl     0:04 java -jar astmiddleware.jar
19670 pts/1    S+     0:00 grep astmiddleware.jar

kill -9 9181
kill -9 19225

2014년 4월 17일 목요일

android release packaging by the console

./gradlew clean assembleRelease

/Users/pointermans/Documents/Work/adt-bundle-mac-x86_64-20140321/sdk/platform-tools/adb uninstall com.iteras.iGen

/Users/pointermans/Documents/Work/adt-bundle-mac-x86_64-20140321/sdk/platform-tools/adb install -r  app/build/outputs/apk/app-release.apk

2014년 3월 27일 목요일

asterisk codecs.conf for use speex codec

os : centos 6.5
asterisk : 11.6.1
requirements : speex-1.2rc1 installed & asterisk remake

*Table 4:* Quality versus bit-rate
Mode Bit-rate (bps) mflops Quality/description
0 250 N/A No transmission (DTX)
1 2,150 6 Vocoder (mostly for comfort noise)
2 5,950 9 Very noticeable artifacts/noise, good intelligibility
3 8,000 10 Artifacts/noise sometimes noticeable
4 11,000 14 Artifacts usually noticeable only with headphones
5 15,000 11 Need good headphones to tell the difference
6 18,200 17.5 Hard to tell the difference even with good headphones
7 24,600 14.5 Completely transparent for voice, good quality music
8 3,950 10.5 Very noticeable artifacts/noise, good intelligibility

vi /etc/asterisk/codecs.conf

[speex]
;0-10
quality => 4
;0-10
complexity => 4
; true / false
enhancement => true
; true / false
vad => false
; true / false
vbr => false
; 0 = off, otherwise, target bitrate in bps
abr => 8000
;0-10
vbr_quality => 5
; true / false
dtx => false

CLI>reload

origin : http://lists.digium.com/pipermail/asterisk-users/2005-January/073992.html