2015年4月20日 星期一

Markdown


http://markdown.tw/

https://www.openfoundry.org/tw/resourcecatalog/Program-Development/Markup-Languages/markdown
技術寫作產能工具 | iThome
http://www.ithome.com.tw/voice/95002

ReText - Linux 支援 Markdown 的編輯器 - Tsung's Blog
http://blog.longwin.com.tw/2014/02/retext-linux-support-markdown-editor-2014/

Pandoc - 維基百科,自由的百科全書
http://zh.wikipedia.org/zh-tw/Pandoc

apt-get install retext pandoc
pandoc -o x.html README -f markdown


2015年4月13日 星期一

The Internals of "Hello World" Program

http://www.slideshare.net/jserv/helloworld-internals

2015年4月1日 星期三

Docker on Ubuntu 14.04 LTS


https://docs.docker.com/installation/
https://docs.docker.com/installation/ubuntulinux/
https://docs.docker.com/installation/ubuntulinux/#installing-docker-on-ubuntu

wget -qO- https://get.docker.com/ | sh

If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:

sudo usermod -aG docker test

(Reboot required)

sudo docker run hello-world


ERROR: when running "sudo docker run hello-world"
FATA[0000] Post http:///var/run/docker.sock/v1.17/containers/create: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?
FIX: Reboot

https://docs.docker.com/userguide/
https://github.com/veggiemonk/awesome-docker
https://github.com/wsargent/docker-cheat-sheet

2015年3月10日 星期二

EJBCA with openSSL CMP


https://download.primekey.se/public/ejbcav6ce-vm.zip
EJBCA CE v6.2.0
v4.3.24 r98716 can import the ovf.


ERROR: Can only connect to localhost by: https://ejbca:8443/ejbca. Connect from other host result in ssl_error_bad_cert_alert.
FIX:
According to /home/ejbca/ejbca_ce_6_2_0/conf/web.properties.sample
The private port JBoss will listen on 8443 to https on, client cert required
https://ejbca:8443/ejbca/
https://ejbca:8443/ejbca/adminweb/

The public port JBoss will listen to http on 8080 (no SSL, no client cert)
http://ejbca:8080/ejbca/
http://ejbca:8080/ejbca/adminweb/ (Authorization faild, require client certificate)

The public port JBoss will listen to https on 8442, no client cert required
https://ejbca:8442/ejbca/
https://ejbca:8442/ejbca/adminweb/ (Authorization faild, require client certificate)

Admin Web always require  client cert.
Public Web can be connected at http(8080) or https(8442).



CMP - Admin Guide
http://ejbca.org/docs/adminguide.html#CMP


Build cmpclient as decribed here:
http://mkl-note.blogspot.tw/2015/03/cmpforopenssl.html

In ./cmpforopenssl-code/src/openssl/app
  1. Get CA cert (ManagementCA.pem)
    [EJBCA public Web] -> [Fetch CA certificates] -> [CA certificate: Download as PEM]
    cp ~/Downloads/ManagementCA.pem  .
    Or, (not sure if this link works for all)
    wget -O ManagementCA.pem "http://ejbca:8080/ejbca/publicweb/webdist/certdist?cmd=cacert&issuer=CN%3dManagementCA%2cO%3dEJBCA+Sample%2cC%3dSE&level=0"
  2. Prepare environment for openssl
    mkdir -p ../../../ssl; ln -s ../src/openssl/apps/openssl.cnf ssl

CMP for OpenSSL - Admin Guide
http://ejbca.org/docs/adminguide.html#CMP%20for%20OpenSSL

RA mode

  1. Generate private key
    openssl genrsa  -out key1.pem 2048
  2. Passed
    $ ./openssl cmp -cmd ir -server localhost:8080 -path ejbca/publicweb/cmp/opensslra -srvcert ManagementCA.pem -user NewUser -pass password -certout clcert1.pem -newkey key1.pem -keyfmt PEM -certfmt PEM -subject "/CN=NewUser/O=My Organization/C=SE"
    Using configuration from /home/ejbca/prj/cmpforopenssl-code/src/../ssl/openssl.cnf
    INFO: Sending Initialization Request
    SUCCESS: validating protection of incoming message
    INFO: Sending Certificate Confirm
    SUCCESS: validating protection of incoming message
    saving certificate to 'clcert1.pem'...


Client mode, HMAC password authentication

  1. Generate private key
    openssl genrsa  -out key2.pem 2048
  2.  Passed
    $ ./openssl cmp -cmd ir -server localhost:8080 -path ejbca/publicweb/cmp/opensslclient -srvcert ManagementCA.pem -user user1 -pass password -certout clcert2.pem -newkey key2.pem -keyfmt PEM -certfmt PEM -subject "/CN=user1/O=My Organization/C=SE"
    Using configuration from /home/ejbca/prj/cmpforopenssl-code/src/../ssl/openssl.cnf
    INFO: Sending Initialization Request
    SUCCESS: validating protection of incoming message
    INFO: Sending Certificate Confirm
    SUCCESS: validating protection of incoming message
    saving certificate to 'clcert2.pem'...
Client mode, client certificate authentication

  1. Generate private key
    openssl genrsa  -out key3.pem 2048
  2.  Failed
    $ ./openssl cmp -cmd ir -server localhost:8080 -path ejbca/publicweb/cmp/openssleec -srvcert ManagementCA.pem -cert clcert2.pem -key key2.pem -certout clcert3.pem -newkey key3.pem -keyfmt PEM -certfmt PEM -subject "/CN=user1/O=My Organization/C=SE"
    Using configuration from /home/ejbca/prj/cmpforopenssl-code/src/../ssl/openssl.cnf
    INFO: Sending Initialization Request
    140361658017440:error:3209608B:CMP routines:CMP_doInitialRequestSeq:pkibody error:cmp_ses.c:381:bodytype=23, error="PKIStatus: rejection, PKIFailureInfo: badRequest: Got request with status GENERATED (40), NEW, FAILED or INPROCESS required: user1."

  3. $ bin/ejbca.sh ra setclearpwd user1 password
    SETTING: --username as user1
    SETTING: --password as password
    Setting clear text password for user user1
    $ bin/ejbca.sh ra setendentitystatus user1 10
    SETTING: --username as user1
    SETTING: -S as 10
    New status for end entity user1 is 10
  4. Passed
    $ ./openssl cmp -cmd ir -server localhost:8080 -path ejbca/publicweb/cmp/openssleec -srvcert ManagementCA.pem -cert clcert2.pem -key key2.pem -certout clcert3.pem -newkey key3.pem -keyfmt PEM -certfmt PEM -subject "/CN=user1/O=My Organization/C=SE"
    Using configuration from /home/ejbca/prj/cmpforopenssl-code/src/../ssl/openssl.cnf
    INFO: Sending Initialization Request
    SUCCESS: validating protection of incoming message
    INFO: Sending Certificate Confirm
    SUCCESS: validating protection of incoming message
    saving certificate to 'clcert3.pem'...

Client mode, Vendor certificate authentication
Not tested, for it's EJBCA Enterprise only


Using Key Update Request instead of Initial Request
RA-Failed

openssl cmp -cmd kur -server $SERVER:8080 -path ejbca/publicweb/cmp/opensslra -srvcert $CACERT -user NewUser -pass password -cert $MYCERT -key $MYKEY -certout ${MYCERT}1 -newkey $MYKEY -keyfmt PEM -certfmt PEM -subject "/CN=NewUser/O=My Organization/C=SE"
WARNING: can't open config file: /home/prj/cmpforopenssl-code/src/../ssl/openssl.cnf
Using configuration from /home/prj/cmpforopenssl-code/src/../ssl/openssl.cnf
error loading the config file '/home/prj/cmpforopenssl-code/src/../ssl/openssl.cnf'
INFO: Sending Key Update Request
3075856008:error:3209708B:CMP routines:CMP_doKeyUpdateRequestSeq:pkibody error:cmp_ses.c:724:bodytype=23, error="PKIStatus: rejection, PKIFailureInfo: badRequest: EndEnityCertificate authentication module is not configured. For a KeyUpdate request to be authentication in RA mode, EndEntityCertificate authentication module has to be set and config
[CMP Configuration] -> [Edit CMP Alias: opensslra]
CMP Response Protection: pbe -> signature
CMP Authentication Module: enable EndEntityCertificate
Automatic Key Update: Allow

openssl cmp -cmd kur -server 192.168.110.120:8080 -srvcert /etc/ipsec.d/cacerts/cacert.pem -cert /etc/ipsec.d/certs/mycert.pem.old -key /etc/ipsec.d/private/mykey.pem -certout /etc/ipsec.d/certs/mycert.pem -newkey /etc/ipsec.d/private/mykey.pem -keyfmt PEM -certfmt PEM -subject "/CN=NewUser/O=My Organization/C=SE" -user NewUser -pass password -path ejbca/publicweb/cmp/opensslra                   
Using configuration from /usr/openssl.cnf                                      
INFO: Sending Key Update Request                                               
1099268871952:error:3209708B:CMP routines:CMP_doKeyUpdateRequestSeq:pkibody error:cmp_ses.c:714:bodytype=23, error="PKIStatus: rejection, PKIFailureInfo: badRequest: 'CN=NewUser,O=My Organization,C=SE' is not an authorized administrator."

Verifications in EndEntityCertificate Authentication Module: Omit

openssl cmp -cmd kur -server 192.168.110.120:8080 -srvcert /etc/ipsec.d/cacerts/cacert.pem -cert /etc/ipsec.d/certs/mycert.pem.old -key /etc/ipsec.d/private/mykey.pem -certout /etc/ipsec.d/certs/mycert.pem -newkey /etc/ipsec.d/private/mykey.pem -keyfmt PEM -certfmt PEM -subject "/CN=NewUser/O=My Organization/C=SE" -user NewUser -pass password -path ejbca/publicweb/cmp/opensslra                   
Using configuration from /usr/openssl.cnf                                      
INFO: Sending Key Update Request                                               
1099117520656:error:3209708B:CMP routines:CMP_doKeyUpdateRequestSeq:pkibody error:cmp_ses.c:714:bodytype=23, error="PKIStatus: rejection, PKIFailureInfo: badRequest: Omitting some verifications can only be accepted in RA mode and when the CMP request has already been authenticated, for example, through the use of NestedMessageContent"






2015年3月2日 星期一

Optical fiber



Optical fiber connector - Wikipedia, the free encyclopedia
http://en.wikipedia.org/wiki/Optical_fiber_connector

HP X120 1G SFP RJ45 T Transceiver - Transceivers - HP: JD089B
http://h30094.www3.hp.com/product.aspx?sku=10256625&pagemode=ca

10 Gigabit Ethernet - Wikipedia, the free encyclopedia
http://en.wikipedia.org/wiki/10_Gigabit_Ethernet#Physical_layer_modules

2015年3月1日 星期日

cmpforopenssl

http://sourceforge.net/projects/cmpforopenssl/
 
Forked at https://github.com/mkl0301/cmpforopenssl/

sudo apt-get install libidn11-dev
make cmpclient

sudo apt-get install libpcre3-dev libsqlite3-dev libcurl4-openssl-dev unixODBC-dev
make



Running Server
sudo apt-get install unixodbc unixodbc-bin libmyodbc mysql-server

MySQL 新增使用者與權限設定 (筆記)
http://blog.toright.com/posts/1214/mysql-%E6%96%B0%E5%A2%9E%E4%BD%BF%E7%94%A8%E8%80%85%E8%88%87%E6%AC%8A%E9%99%90%E8%A8%AD%E5%AE%9A-%E7%AD%86%E8%A8%98.html
mysql的重要語法
http://mail.hmes.kh.edu.tw/~jona/redhat/mysqlphp/mysqlsyntax.htm

mysql -uroot -p
use mysql;
INSERT INTO user(host,user,password) VALUES('%','odbc',password('odbcpwd'));
GRANT ALL ON *.* TO 'odbc'@localhost IDENTIFIED BY 'odbcpwd' WITH GRANT OPTION;
FLUSH PRIVILEGES;

CREATE DATABASE odbc;
Check the path of the libmyodbc.so:
# dpkg-query -L libmyodbc
(..................)
/usr/lib/i386-linux-gnu/odbc/libmyodbc.so

Edit /etc/odbc.ini, add the following with the driver path from previous step:
[myodbc]
Driver       = /usr/lib/i386-linux-gnu/odbc/libmyodbc.so
Description  = MySQL ODBC 2.50 Driver DSN
SERVER       = localhost
PORT         = 3306
USER         = odbc
Password     = odbcpwd
Database     = odbc
OPTION       = 3
SOCKET       =
# ./srv_create_ca_cert.sh
./../bin/cmpserver-cl --createcert --cacert ./../certs/ca_cert.der --key ./../certs/ca_key.p15 --country DE --organization NSN --unit PG RDE 3 --commonname Martin's CA
SUCCESS init
SUCCESS add random
SUCCESS open keyset
SUCCESS creating Context
SUCCESS setting Attribute CRYPT_CTXINFO_LABEL
SUCCESS generating Key
SUCCESS creating the certificate
SUCCESS setting the CRYPT_CERTINFO_SUBJECTPUBLICKEYINFO attribute
SUCCESS setting the CRYPT_CERTINFO_COUNTRYNAME attribute
SUCCESS setting the CRYPT_CERTINFO_ORGANIZATIONNAME attribute
SUCCESS setting the CRYPT_CERTINFO_ORGANIZATIONALUNITNAME attribute
SUCCESS setting the CRYPT_CERTINFO_COMMONNAME attribute
SUCCESS setting the validity
SUCCESS setting the CRYPT_CERTINFO_SELFSIGNED attribute
SUCCESS setting the CRYPT_CERTINFO_CA attribute
SUCCESS signing the certificate
SUCCESS storing the private key
SUCCESS setting Certificat to be trusted
SUCCESS storing the public key
SUCCESS export Certificate - checking certMaxLength
SUCCESS export Certificate
SUCCESS Destroying the certificate
SUCCESS destroying context
SUCCESS close keyset
SUCCESS shutting down cryptlib
HINT:
  Don't forget to copy "./../certs/ca_cert.der" to the certs-directory
  of the client if it is different from this installation!

# ./srv_add_pki_usr.sh
./../bin/cmpserver-cl --createuser --country DE --organization NSN --unit PG RDE 312280 --commonname Martin Peylo
SUCCESS init
SUCCESS add random
SUCCESS open certstore
INFO: Creating PKI User COUNTRY:"DE" ORG:"NSN" UNIT:"PG RDE 319273" CN:"Martin Peylo"
SUCCESS creating certificate
SUCCESS storing the PKI User
User= CUF8T-BY2NY-WDB34
Password= VSZQH-3JZ8S-8FYJD-95V5H
RevPW= 7PCRB-2USY6-CFXGZ-NVGCX
DECODED, HEX: User= 8BE886D865A830E740
Password= 2EE3E517F43C5B207FDCF670
RevPW= 44F0E250B7045A9AEC998550
SUCCESS destroying certificate
SUCCESS close certstore
SUCCESS shutting down cryptlib

# ./srv_run_daemon.sh
./../bin/cmpserver-cl --daemon --server 192.168.1.107 --port 4711 --cacert ./../certs/ca_cert.der --key ./../certs/ca_key.p15
SUCCESS init
SUCCESS add random
SUCCESS open certstore
SUCCESS open keyset
INFO: Starting CMP Server, serverName=192.168.1.107, serverPort=4711
SUCCESS get the private Key
SUCCESS create CMP Server
SUCCESS set attribute for certStore
SUCCESS set attribute for private Key
SUCCESS set attribute for server Address
SUCCESS set attribute for server Port


Error: Segmentation fault while running srv_add_pki_usr.sh
64-bit Ubuntu 14.04.2,
$ ./srv_add_pki_usr.sh
./../bin/cmpserver-cl --createuser --country DE --organization NSN --unit PG RDE 327804 --commonname Martin Peylo
SUCCESS init
SUCCESS add random
SUCCESS open certstore
INFO: Creating PKI User COUNTRY:"DE" ORG:"NSN" UNIT:"PG RDE 39791" CN:"Martin Peylo"
SUCCESS creating certificate
./srv_add_pki_usr.sh: line 13: 24173 Segmentation fault      (core dumped) ${CMPSERVER} --createuser --country "${COUNTRY}" --organization "${ORG}" --unit "${UNIT}$RANDOM" --commonname "${CN}"
FIX: this issue didn't happen on 32-bit Ubuntu 12.04.3. It's likely that the root cause is 64-bit.

ERROR: User ID provided by client isn't a cryptlib user ID

# ./do_ossl_ir.sh CUF8T-BY2NY-WDB34 VSZQH-3JZ8S-8FYJD-95V5H
+ ./../bin/cmpclient --ir --server 192.168.1.107 --port 4711 --srvcert ./../certs/ca_cert.der --newkey ./../certs/cl_key.pem --newkeypass password --newclcert ./../certs/cl_cert.der --user CUF8T-BY2NY-WDB34 --password VSZQH-3JZ8S-8FYJD-95V5H
INFO: Reading DER Certificate from File ./../certs/ca_cert.der
SUCCESS: BIO_new
INFO: Using existing key file "./../certs/cl_key.pem"
INFO: Reading Public Key from File ./../certs/cl_key.pem
INFO: the passphrase is "password"...
SUCCESS: Reading PKEY
INFO: Sending Initialization Request
ERROR: received no initial Client Certificate. FILE cmpclient.c, LINE 394
3075692168:error:33080064:CRMF routines:CRMF_CERTREQMSG_set1_subject:crmferror:crmf_lib.c:509:
3075692168:error:3209608B:CMP routines:CMP_doInitialRequestSeq:pkibody error:cmp_ses.c:381:bodytype=23, error="PKIStatus: rejection, PKIFailureInfo: signerNotTrusted"
+ set +x
And server shows:
ERROR set attribute CMP session active  - in FILE: cmpserver-cl.c, LINE 365, status=-22
trying to get the Errorstring:
get errorStringLength:
The ErrorStringLength:51
get errorString:
The ErrorString: User ID provided by client isn't a cryptlib user ID
SUCCESS destroy private Key
SUCCESS destroy session
INFO: Starting CMP Server, serverName=192.168.1.107, serverPort=4711
SUCCESS get the private Key
SUCCESS create CMP Server
SUCCESS set attribute for certStore
SUCCESS set attribute for private Key
SUCCESS set attribute for server Address
SUCCESS set attribute for server Port
Neither does "/do_ossl_ir.sh CUF8T-BY2NY-WDB34 VSZQH-3JZ8S-8FYJD-95V5H" work.
FIX:

cryptlib-340/session/cmp_rd.c, updateUserID(), protocolInfo->userIDsize should be 9.

Use the "DECODED" hex string and encode the hex string to binary string, for example:
./do_ossl_ir.sh $(echo -en '\xD5\x79\xE9\x07\x16\xAD\x06\x42\x60') $(echo -en '\x57\x06\x2E\x02\xEA\x2A\x4E\x85\xFA\xEE\x52\xE0')
https://github.com/mkl0301/cmpforopenssl/commit/b7c446f264b402074aa9c6af8c7d8842be3ff24c


Error: Server core dump again...

# ./do_ossl_ir.sh 8BE886D865A830E740 2EE3E517F43C5B207FDCF670
+ ./../bin/cmpclient --ir --server 192.168.1.107 --port 4711 --srvcert ./../certs/ca_cert.der --newkey ./../certs/cl_key.pem --newkeypass password --newclcert ./../certs/cl_cert.der --user $'\213\350\206\330e\2500\347@' --password '.�� �<[ ��p'
INFO: Reading DER Certificate from File ./../certs/ca_cert.der
SUCCESS: BIO_new
INFO: Using existing key file "./../certs/cl_key.pem"
INFO: Reading Public Key from File ./../certs/cl_key.pem
INFO: the passphrase is "password"...
SUCCESS: Reading PKEY
INFO: Sending Initialization Request
ERROR: received no initial Client Certificate. FILE cmpclient.c, LINE 394
3075499656:error:33080064:CRMF routines:CRMF_CERTREQMSG_set1_subject:crmferror:crmf_lib.c:509:
3075499656:error:3209608B:CMP routines:CMP_doInitialRequestSeq:pkibody error:cmp_ses.c:381:bodytype=23, error="PKIStatus: rejection, PKIFailureInfo: duplicateCertReq"
+ set +x
And server core dumped(cryptlib debug enabled):
SVR: Reading message type 26.
SVR: Read new userID.
SVR: Read initial transID.
SVR: Read initial MAC params with salt, 500 iterations.
SVR: Writing message body type 1.
SVR: Writing MAC params with salt, 500 iterations.
SVR: Writing MAC params with salt, 500 iterations.
SVR: Writing userID.
SVR: Writing message body type 5.
SVR: Writing userID.
keyset/odbc.c:getErrorInfo:397: Couldn't read error information from database backend.
cmpserver-cl: keyset/odbc.c:398: getErrorInfo: Assertion `0' failed.
./srv_run_daemon.sh: line 12: 13306 Aborted                 (core dumped) ${CMPSERVER} --daemon --server ${SERVER} --port ${PORT} --cacert ${CACERT} --key ${CAKEY}
FIX:
I just think of that the libmyodbc installed by Ubuntu 12.04 is of version 5.1.10-1. And the README uses libmyodbc3.so. So I decided to rebuild libmyodbc3.

sudo apt-get install libmysqlclient-dev
(for libmyodbc3 require mysql_config)

http://cdn.mysql.com/Downloads/Connector-ODBC/3.51/mysql-connector-odbc-3.51.30-src.tar.gz
./configure --enable-test=no
make

Change the /etc/odbc.ini:
Driver       = /path/to/mysql-connector-odbc-3.51.30-src/driver/.libs/libmyodbc3.so
Purge the database and run again, than this issue is gone!! (but another issue await...)

ERROR:
# ./do_ossl_ir.sh 250660288E8F818C80 DD1574745262358B34341A70
+ ./../bin/cmpclient --ir --server 192.168.1.107 --port 4711 --srvcert ./../certs/ca_cert.der --newkey ./../certs/cl_key.pem --newkeypass password --newclcert ./../certs/cl_cert.der --user '% `(���' --password $'\335\025ttRb5\21344\032p'
INFO: Reading DER Certificate from File ./../certs/ca_cert.der
SUCCESS: BIO_new
INFO: Using existing key file "./../certs/cl_key.pem"
INFO: Reading Public Key from File ./../certs/cl_key.pem
INFO: the passphrase is "password"...
SUCCESS: Reading PKEY
INFO: Sending Initialization Request
SUCCESS: validating protection of incoming message
INFO: Sending Certificate Confirm

ERROR: received no initial Client Certificate. FILE cmpclient.c, LINE 394
3075491464:error:33080064:CRMF routines:CRMF_CERTREQMSG_set1_subject:crmferror:crmf_lib.c:509:
3075491464:error:3209D090:CMP routines:CMP_PKIMESSAGE_http_perform:server not reachable:cmp_http.c:893:56:Failure when receiving data from the peer:unable to send certConf
+ set +x
And server reported(cryptlib debug enabled):
SVR: Reading message type 26.
SVR: Read new userID.
SVR: Read initial transID.
SVR: Read initial MAC params with salt, 500 iterations.
SVR: Writing message body type 1.
SVR: Writing MAC params with salt, 500 iterations.
SVR: Writing MAC params with salt, 500 iterations.
SVR: Writing userID.
SVR: Writing message body type 5.
SVR: Writing userID.
ERROR set attribute CMP session active  - in FILE: cmpserver-cl.c, LINE 365, status=-41
trying to get the Errorstring:
get errorStringLength:
The ErrorStringLength:78
get errorString:
The ErrorString: No data was read because the remote system closed the connection (recv() == 0)
Facts:
  1. The first IR (type0/26 stands for any) and IP(type1) is sent and received successfully.
  2. client has sent the certConf
  3. ??server CANNOT receive anything??
  4. ??From server side message, server sent another type 5(CMPBODY_ERROR), but nothing reached wire??
  5. ??server actively close the socket (FIN is sent by server)?? 

Server side failed at cryptlib-340/session/cmp_svr.c: serverTransact() while reading data of CTAG_PB_CERTCONF, but nothing is received. I tried to use a while loop but nothing can be received. From packet captured, server had received the certConf, and ACKed, and even FINed. But nothing received in software.

 (Stuck)




ftp://ftp.franken.de/pub/crypt/cryptlib/manual.pdf
cryptlib uses a standard format for the user ID and password that follows the style used for software registration codes and serial numbers. The user ID is in the form XXXXX-XXXXX-XXXXX and the password is in the form XXXXX-XXXXX-XXXXX-XXXXX. Characters that might cause confusion (for example O and 0 or 1 and l) aren’t present, and the data contains a checksum which is used to catch typing errors when the user enters the information.

Error in running openssl cmp client
http://ejbca-develop.narkive.com/GiMkYheS/error-in-running-openssl-cmp-client
/root/sriram/cmpforopenssl-code/src/openssl-1.0.1e-cmp/apps/openssl cmp -cmd ir -server 10.206.1.3:8080 -path ejbca/publicweb/cmp -srvcert certs/ManagementCA.pem -user cmptest -pass CMP-pwd -newkey certs/cl_key.pem -certout certs/cl_cert.pem -subject "/CN=cmptest"
Getting error using CMP client with EJBCA
http://comments.gmane.org/gmane.comp.java.ejbca.devel/4541
ejbca:~/cmpforopenssl-code-766/src/openssl-client$ ./cmpclient --server localhost --port 8080 --path ejbca/public/cmp --srvcert ManagementCA.cacert.pem --ir --user vmware --password vmware --newclcert user1.der --newkey user_key.pem --subject "CN=vmware,C=SC"

2015年1月23日 星期五

Save password in Subversion


Enable the following options in ~/.subversion/config and /etc/.subversion/config:

store-passwords = yes
store-auth-creds = yes
And ~/.subversion/server and /etc/.subversion/config:
store-passwords = yes
store-ssl-client-cert-pp = yes
store-plaintext-passwords = yes
store-ssl-client-cert-pp-plaintext = yes

For unknown reason, my ~/.subversion became (I don't remember I have ran svn with sudo...):
drwx------  6 root root 4.0K  1月 20 21:18 auth
-rw-r--r--  1 root root 7.7K  1月 23 21:38 config
-rw-r--r--  1 root root 4.2K  1月 20 21:18 README.txt
-rw-r--r--  1 root root 8.2K  1月 23 21:39 servers
This prevent svn from storing/reading the password to/from the directory auth. After the following fixed my problem.
chown test:test ~/.subversion -R; chmod +r ~/.subversion/auth -R
It's just too stupid that I don't want to waste my time again.....


svn - How to save password when using Subversion from the console - Stack Overflow
http://stackoverflow.com/questions/2899209/how-to-save-password-when-using-subversion-from-the-console

SVN not storing password
http://www.wandisco.com/svnforum/threads/62783-SVN-not-storing-password

2015年1月20日 星期二

Huawei E3276 (Мегафон М150-1) on Ubuntu 14.04

Question #211095 : Questions : gnome-nettool package : Ubuntu
https://answers.launchpad.net/ubuntu/+source/gnome-nettool/+question/211095

Insert the dongle,

[  136.590998] usb 2-1: new high-speed USB device number 4 using xhci_hcd
[  136.608068] usb 2-1: New USB device found, idVendor=12d1, idProduct=14fe
[  136.608078] usb 2-1: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[  136.608083] usb 2-1: Product: HUAWEI Mobile
[  136.608087] usb 2-1: Manufacturer: HUAWEI Technology
[  136.727118] usb-storage 2-1:1.0: USB Mass Storage device detected
[  136.727169] scsi4 : usb-storage 2-1:1.0
[  136.727244] usb-storage 2-1:1.1: USB Mass Storage device detected
[  136.727289] scsi5 : usb-storage 2-1:1.1
[  136.727349] usbcore: registered new interface driver usb-storage
[  137.726594] scsi 4:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[  137.726600] scsi 5:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
[  137.727334] sd 5:0:0:0: Attached scsi generic sg1 type 0
[  137.728198] sd 5:0:0:0: [sdb] Attached SCSI removable disk
[  137.734924] sr0: scsi-1 drive
[  137.734930] cdrom: Uniform CD-ROM driver Revision: 3.20
[  137.735114] sr 4:0:0:0: Attached scsi CD-ROM sr0
[  137.735200] sr 4:0:0:0: Attached scsi generic sg2 type 5
[  137.833273] Buffer I/O error on device sr0, logical block 9
[  137.833280] Buffer I/O error on device sr0, logical block 9
[  137.833301] Buffer I/O error on device sr0, logical block 0
[  137.833304] Buffer I/O error on device sr0, logical block 0
[  137.833309] Buffer I/O error on device sr0, logical block 2
[  137.833311] Buffer I/O error on device sr0, logical block 2
[  137.833315] Buffer I/O error on device sr0, logical block 0
[  137.833318] Buffer I/O error on device sr0, logical block 0
[  137.833323] Buffer I/O error on device sr0, logical block 0
[  137.833326] Buffer I/O error on device sr0, logical block 1
[  137.835010] systemd-udevd[2260]: Failed to apply ACL on /dev/sr0: No such file or directory
[  137.835022] systemd-udevd[2260]: Failed to apply ACL on /dev/sr0: No such file or directory
[  137.853699] usb 2-1: USB disconnect, device number 4
[  143.088133] usb 2-1: new high-speed USB device number 5 using xhci_hcd
[  143.104880] usb 2-1: New USB device found, idVendor=12d1, idProduct=1506
[  143.104890] usb 2-1: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[  143.104895] usb 2-1: Product: HUAWEI Mobile
[  143.104899] usb 2-1: Manufacturer: HUAWEI Technology
[  143.109191] usb-storage 2-1:1.2: USB Mass Storage device detected
[  143.109412] scsi6 : usb-storage 2-1:1.2
[  143.109604] usb-storage 2-1:1.3: USB Mass Storage device detected
[  143.109742] scsi7 : usb-storage 2-1:1.3
[  143.121976] usbcore: registered new interface driver usbserial
[  143.122001] usbcore: registered new interface driver usbserial_generic
[  143.122018] usbserial: USB Serial support registered for generic
[  143.169158] usbcore: registered new interface driver option
[  143.169173] usbserial: USB Serial support registered for GSM modem (1-port)
[  143.169226] option 2-1:1.0: GSM modem (1-port) converter detected
[  143.169324] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB0
[  143.230122] usbcore: registered new interface driver cdc_ncm
[  143.246865] usbcore: registered new interface driver cdc_wdm
[  143.249678] huawei_cdc_ncm 2-1:1.1: MAC-Address: 0c:5b:8f:27:9a:64
[  143.249744] huawei_cdc_ncm 2-1:1.1: cdc-wdm0: USB WDM device
[  143.250045] huawei_cdc_ncm 2-1:1.1 wwan0: register 'huawei_cdc_ncm' at usb-0000:00:14.0-1, Huawei CDC NCM device, 0c:5b:8f:27:9a:64
[  143.250076] usbcore: registered new interface driver huawei_cdc_ncm
[  144.107254] scsi 7:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
[  144.107469] sd 7:0:0:0: Attached scsi generic sg1 type 0
[  144.111051] scsi 6:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[  144.113405] sd 7:0:0:0: [sdb] Attached SCSI removable disk
[  144.114554] sr0: scsi-1 drive
[  144.114662] sr 6:0:0:0: Attached scsi CD-ROM sr0
[  144.114728] sr 6:0:0:0: Attached scsi generic sg2 type 5
[  144.338466] ISO 9660 Extensions: Microsoft Joliet Level 1
[  144.356014] ISOFS: changing to secondary root
And the following is found in /var/log/syslog. It seems there are some problems with ModemManager.
udisksd[1798]: Mounted /dev/sr0 at /media/test/Mobile Partner on behalf of uid 1000
usb_modeswitch[2446]: usb_modeswitch: switched to 12d1:1506 on 2/6
usb_modeswitch[2446]: usb_modeswitch: add device ID 12d1:1506 to driver option
usb_modeswitch[2446]: usb_modeswitch: please report the device ID to the Linux USB developers!
ModemManager[768]:   Creating modem with plugin 'Huawei' and '3' ports
ModemManager[768]:   Could not grab port (usbmisc/cdc-wdm0): 'Cannot add port 'usbmisc/cdc-wdm0', unsupported'
ModemManager[768]:   Couldn't create modem for device at '/sys/devices/pci0000:00/0000:00:14.0/usb2/2-1': Failed to find primary AT port
Therefore I use the following script from Janhouse (Janis Jansons)
git clone https://github.com/Janhouse/4g-connect-linux
sudo  apt-get install dhcpcd

Modify 4g-connect-linux/huawei-4g-linux.pl, and ensure the following is correct:
my $device="/dev/ttyUSB0";
my $interface="wwan0";
my $apn="Aeroflex.com";
sudo ./huawei-4g-linux.pl
This script also get IP by dhcpcd.
Huawei 4g modem (E3276 and possibly others) script by Janhouse (Janis Jansons).

Opening device: /dev/ttyUSB1
> ATZ
> OK
> ATZ
> OK
> ATQ0 V1 E1 S0=0
> OK
> AT^NDISDUP=1,1,"YOUR_APN_HERE"
> OK
> ^NDISSTAT:1,,,"IPV4"
> AT^DHCP?
> ^DHCP: 1010A0A,FCFFFFFF,2010A0A,2010A0A,0,0,150000000,150000000
> OK
Hexadecimal number > 0xffffffff non-portable at ./huawei-4g-linux.pl line 73.
' ignored at ./huawei-4g-linux.pl line 73.
Hexadecimal number > 0xffffffff non-portable at ./huawei-4g-linux.pl line 73.

You can close this script now or you can keep it open to monitor the link quality.

Link quality:
> AT+CSQ
> +CSQ: 31,99
> OK
dhcpcd.sh: interface wwan0 has been configured with new IP=YOUR_IP_OF_WWAN0
Or you can get it manually.
To get IP
sudo dhcpcd wwan0
sudo dhclient wwan
To release:
sudo dhcpcd -k wwan0
sudo dhclient -r wwan0

/var/lib/dhcp/dhclient.leases
option routers 10.10.1.1;

The connection is setup if DHCP client get an IP.

Known issue: only work for the first time dongle plugged into system. wwan0 is missing at second re-plug. Need reboot.

E3276: Failed to find primary AT port
http://lists.freedesktop.org/archives/modemmanager-devel/2014-June/001241.html

(20150126) Sometime the usb function switch not work, sometimes it does.
Even if it does, the wwan0 is not identified.
[17040.575411] usb 2-1: new high-speed USB device number 47 using xhci_hcd
[17040.592293] usb 2-1: New USB device found, idVendor=12d1, idProduct=14fe
[17040.592302] usb 2-1: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[17040.592307] usb 2-1: Product: HUAWEI Mobile
[17040.592311] usb 2-1: Manufacturer: HUAWEI Technology
[17040.631072] usb-storage 2-1:1.0: USB Mass Storage device detected
[17040.631338] scsi20 : usb-storage 2-1:1.0
[17040.631655] usb-storage 2-1:1.1: USB Mass Storage device detected
[17040.631793] scsi21 : usb-storage 2-1:1.1
[17041.631494] scsi 20:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[17041.631664] scsi 21:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
[17041.634175] sr0: scsi-1 drive
[17041.634887] sr 20:0:0:0: Attached scsi CD-ROM sr0
[17041.635077] sr 20:0:0:0: Attached scsi generic sg1 type 5
[17041.635552] sd 21:0:0:0: Attached scsi generic sg2 type 0
[17041.639660] sd 21:0:0:0: [sdb] Attached SCSI removable disk
[17041.669443] quiet_error: 2 callbacks suppressed
[17041.669448] Buffer I/O error on device sr0, logical block 8
[17041.669453] Buffer I/O error on device sr0, logical block 8
[17041.669464] Buffer I/O error on device sr0, logical block 8
[17041.669467] Buffer I/O error on device sr0, logical block 8
[17041.669471] Buffer I/O error on device sr0, logical block 8
[17041.669474] Buffer I/O error on device sr0, logical block 8
[17041.669477] Buffer I/O error on device sr0, logical block 8
[17041.669480] Buffer I/O error on device sr0, logical block 8
[17041.669483] Buffer I/O error on device sr0, logical block 8
[17041.669487] Buffer I/O error on device sr0, logical block 8
[17041.670818] systemd-udevd[11744]: Failed to apply ACL on /dev/sr0: No such file or directory
[17041.670827] systemd-udevd[11744]: Failed to apply ACL on /dev/sr0: No such file or directory
[17041.690950] usb 2-1: USB disconnect, device number 47
[17041.693473] systemd-udevd[11744]: Failed to apply ACL on /dev/sr0: No such file or directory
[17041.693482] systemd-udevd[11744]: Failed to apply ACL on /dev/sr0: No such file or directory
[17042.058504] usb 2-1: new high-speed USB device number 48 using xhci_hcd
[17042.075271] usb 2-1: New USB device found, idVendor=12d1, idProduct=1506
[17042.075276] usb 2-1: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[17042.075278] usb 2-1: Product: HUAWEI Mobile
[17042.075281] usb 2-1: Manufacturer: HUAWEI Technology
[17042.077056] option 2-1:1.0: GSM modem (1-port) converter detected
[17042.077111] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB1
[17042.077190] option 2-1:1.1: GSM modem (1-port) converter detected
[17042.077237] usb-storage 2-1:1.2: USB Mass Storage device detected
[17042.077291] scsi22 : usb-storage 2-1:1.2
[17042.077363] usb-storage 2-1:1.3: USB Mass Storage device detected
[17042.077395] scsi23 : usb-storage 2-1:1.3
[17043.074668] scsi 22:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[17043.074673] scsi 23:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
[17043.074900] sd 23:0:0:0: Attached scsi generic sg1 type 0
[17043.076595] sd 23:0:0:0: [sdb] Attached SCSI removable disk
[17043.077249] sr0: scsi-1 drive
[17043.077385] sr 22:0:0:0: Attached scsi CD-ROM sr0
[17043.077469] sr 22:0:0:0: Attached scsi generic sg2 type 5

(20150123) After tested several times, the dongle cannot get detected on my 14.04 any more even after reboot
(20150126) Now it can, but not stable. Sometimes works, sometimes not.:
[21274.647803] usb 2-2: new high-speed USB device number 12 using xhci_hcd
[21274.664877] usb 2-2: New USB device found, idVendor=12d1, idProduct=14fe
[21274.664887] usb 2-2: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[21274.664892] usb 2-2: Product: HUAWEI Mobile
[21274.664896] usb 2-2: Manufacturer: HUAWEI Technology
[21274.731839] usb-storage 2-2:1.0: USB Mass Storage device detected
[21274.732441] scsi4 : usb-storage 2-2:1.0
[21274.732533] usb-storage 2-2:1.1: USB Mass Storage device detected
[21274.732647] scsi5 : usb-storage 2-2:1.1
[21274.733080] usbcore: registered new interface driver usb-storage
[21275.731766] scsi 4:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[21275.731898] scsi 5:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
[21275.732925] sr0: scsi-1 drive
[21275.732931] cdrom: Uniform CD-ROM driver Revision: 3.20
[21275.733132] sr 4:0:0:0: Attached scsi CD-ROM sr0
[21275.733245] sr 4:0:0:0: Attached scsi generic sg1 type 5
[21275.736527] sd 5:0:0:0: Attached scsi generic sg2 type 0
[21275.744259] sd 5:0:0:0: [sdb] Attached SCSI removable disk
[21275.838665] Buffer I/O error on device sr0, logical block 7
[21275.838670] Buffer I/O error on device sr0, logical block 7
[21275.839880] systemd-udevd[6071]: Failed to apply ACL on /dev/sr0: No such file or directory
[21275.839886] systemd-udevd[6071]: Failed to apply ACL on /dev/sr0: No such file or directory
[21275.843089] systemd-udevd[6071]: Failed to apply ACL on /dev/sr0: No such file or directory
[21275.843096] systemd-udevd[6071]: Failed to apply ACL on /dev/sr0: No such file or directory

Ubuntu 14.04 的中文輸入法...唉


sudo apt-get install ibus-chewing
重開機後
[System Settings] -> [Text Entry] 
或者到右上角去點去點輸入法的[En] -> [Text Entry Settings]
點[+] -> [選擇Chinese (Chewing)]




Change log : Trusty (14.04) : ibus-chewing package : Ubuntu
https://launchpad.net/ubuntu/trusty/+source/ibus-chewing/+changelog

language - 14.04 Chinese Ibus Input - No Options - Ask Ubuntu
http://askubuntu.com/questions/455682/14-04-chinese-ibus-input-no-options

Pinyin Joe - Ubuntu 10 - 14 Chinese input methods: IBus Pinyin, Chewing and more
http://www.pinyinjoe.com/linux/ubuntu-10-chinese-input-pinyin-chewing.htm

Pinyin Joe - Ubuntu 14.04 Chinese FAQ - ibus-pinyin and invalid utf-8 bugs
http://www.pinyinjoe.com/faq/ubuntu-1404-chinese-ime-problems-faq.htm

2015年1月16日 星期五

Tabatas

大腿肌群很有感...

Burpee jack  & Squat jump


 很累...所有肌群都有一些...心肺


心肺+腿

雖說是腹部核心...但是我跟不上他的pushup....


精神百倍!!!
https://www.youtube.com/watch?v=phCfrsiNwkE


燃燒吧脂肪實驗生活30天 Day26,tabata 4 分鐘 @ The Stand Up Paddling Girl ~ SUP女孩 ~ :: 痞客邦 PIXNET ::
http://supgirl.pixnet.net/blog/post/318602840-%E7%87%83%E7%87%92%E5%90%A7%E8%84%82%E8%82%AA%E5%AF%A6%E9%A9%97%E7%94%9F%E6%B4%BB30%E5%A4%A9-day26%EF%BC%8Ctabata-4-%E5%88%86%E9%90%98

每天4分鐘練出六塊肌,TABATA四分鐘腹肌運動(中階版) | 健塑身 - Yahoo奇摩運動
https://tw.sports.yahoo.com/blogs/fit/%E6%AF%8F%E5%A4%A94%E5%88%86%E9%90%98%E7%B7%B4%E5%87%BA%E5%85%AD%E5%A1%8A%E8%82%8C%EF%BC%8Ctabata%E5%9B%9B%E5%88%86%E9%90%98%E8%85%B9%E8%82%8C%E9%81%8B%E5%8B%95-%E4%B8%AD%E9%9A%8E%E7%89%88-095622089.html

4 分鐘燃脂 12 小時!快來做 TABATA 間歇訓練超享瘦 | BuzzOrange
http://buzzorange.com/2014/10/24/sport-about-tabata/

2015年1月10日 星期六

棒式(Plank)

[MIKE BOYLE 頂尖表現] 建構核心之棒式變化式│動一動│運動小知識│山姆伯伯│棒式Don1Don
http://www.don1don.com/archives/37300

(彈力球)
馬拉松菁英Shalane Flanagan和Kara Goucher的核心課|Don1Don
http://www.don1don.com/archives/12257

2014年12月26日 星期五

minicom+kermit with u-boot

Ubuntu 13.10.

Installation:

  1. sudo apt-get install minicom ckermit
  2. /etc/kermit/kermrc
    set carrier-watch off
    set prefixing all
    set parity none
    set stop-bits 1
    set modem none
    set file type bin
    set file name lit
    set flow-control none
    set prompt "Linux Kermit> "

On minicom, give the following command to u-boot:
==> loadb 0x2000000
## Ready for binary (kermit) download to 0x02000000 at 115200 bps...
Then do ctrl+A+S with "kermit", select file to send. You should see the following screen:
C-Kermit 9.0.302 OPEN SOURCE:, 20 Aug 2011, testPC [192.168.1.105]

   Current Directory: /home/xxxx
Communication Device: /dev/ttyUSB0
 Communication Speed: 115200
              Parity: none
         RTT/Timeout: 01 / 03
             SENDING:  => u-boot.bin
                      BINARY
           File Size: 699264
        Percent Done: 4   //
                          ...10...20...30...40...50...60...70...80...90..100
 Estimated Time Left: 00:01:24
  Transfer Rate, CPS: 7887
        Window Slots: 1 of 1
         Packet Type: D
        Packet Count: 10
       Packet Length: 9024
         Error Count: 0
          Last Error:
        Last Message:

ERROR: ctrl+A+S with "kermit" doesn't work; nothing shown
Maybe something went wrong with kermit. In my case I didn't have kermrc set correctly. You can try to run kermit manually, for example:
# sudo kermit -i -l /dev/ttyUSB0 -b 115200 -s u-boot.bin

?Carrier required but not detected
It might be required for minicom to quit to run this command in console.



lazyf's den : A Personal Weblog: [技術] Linux下使用Minicon+Kermit
http://lazyflai.blogspot.tw/2010/06/linuxminiconkermit.html

Problems running Kermit - FedoraForum.org
http://forums.fedoraforum.org/showthread.php?t=121720

2014年12月25日 星期四

徒手腿部訓練

跑者髖關節訓練│動一動│專欄│Balance的鐵工廠Don1Don
http://www.don1don.com/archives/31610

多向跨步(Lunge Clock)
和運動傷害說掰掰 9項單腳訓練<上>
http://www.sportsnote.com.tw/running/view_article.aspx?id=414c054e-42fb-47ba-b81d-ae149aa667b6
 單腳深蹲 (Single-Leg Squat)


單腿臀部運動(Single-Leg Hip Drive)


單腳跳躍(Single-Leg Hops)
直線前跳後跳左右跳


單腳橫向跳躍(Single-Leg Lateral Hops)
定點左右跳
和運動傷害說掰掰 9項單腳訓練<下>
http://www.sportsnote.com.tw/running/view_article.aspx?id=6d6eb732-72c5-4b99-9a17-9cb6cf2e2efb
單腳星狀跳躍(Hopstar)

LTE

全球LTE標準必要專利佈局(一) LTE技術持續演進的重點方向
http://iknow.stpi.narl.org.tw/post/Read.aspx?PostID=10451

測試LTE基地台OTA 手持式頻譜分析儀走紅 - 學技術 - 新電子科技雜誌
http://www.mem.com.tw/article_content.asp?sn=1410150006&page=2

2014年12月10日 星期三

Strongswan and Cisco ASR5000 SeGW

  1. strongswan would enumerate all the available transform in the first IKE_SA_INIT. But it might be too much and there are some that are not recognizable by Cisco SeGW, and SeGW will just drop it and no response.....
    ike=aes128-sha1-prfsha1-
    modp1024,aes256-sha1-prfsha1-modp1024,3des-md5-prfmd5-modp1024,3des-sha1-prfsha1-modp1024,des-sha1-prfsha1-modp1
    esp=aes128-sha1-modp1024,3des-md5
    Cisco SeGW reports:
    Too Many Transforms:             110
    And dump the packet at Cisco show something like:
    (........a lot of transforms.........)

          Transform Header #39
            Last                 (U08): Yes/0 (0x00)
            Reserved             (U08): 0
            Transform Length     (U16): 8 (0x8) bytes
            Transform Type       (U08): DHGROUP/4 (0x04)
            Reserved             (U08): 0
            Transform ID         (U16): UNKNOWN/30 (0x001E)
    FIX: To fix this, force to use only one of the transform instead let it choose automatically, e.g.
    ike=aes128-sha1-prfsha1-modp1024!
    esp=aes128-sha1-modp1024!
     
  2. By default the mobike is enabled in strongswan, while Cisco SeGW doesn't support it. The tunnel is created without any problem. However, all packets encrypted with ESP is received by SeGW, but "somehow" not recognized. For example, encrypted ping request is received by SeGW, but not decrypted and is dropped.
    And on strongswan PC, all encrypted ping from SeGW is not received.

    FIX: Disable mobike will fix this issue.
    mobike=no

2014年11月28日 星期五

Tabata

每天這樣做,三個月練就完美人魚線! LIFE生活網
http://www.life.com.tw/?app=view&no=115609

將這8個動作依次練20秒然後休息10秒繼續下一個動作

1. 2. 3. 4. 5. 6. 7. 8. 

2014年10月15日 星期三

32.593

3GPP specification: 32.593
http://www.3gpp.org/DynaReport/32593.htm

LTE; Telecommunication management; Home enhanced Node B (HeNB) Operations, Administration, Maintenance and Provisioning (OAM&P); Procedure flows for Type 1 interface HeNB to HeNB Management System (HeMS) (3GPP TS 32.593 version 11.0.0 Release 11)
http://www.etsi.org/deliver/etsi_ts/132500_132599/132593/11.00.00_60/ts_132593v110000p.pdf

2014年10月7日 星期二

PeaZip

PeaZip 免費中文壓縮軟體,支援解壓縮 RAR、7Z、ZIP 等超過 150 種格式
http://free.com.tw/peazip/

PeaZip | Free Zip files utility, free Rar files extractor
http://peazip.sourceforge.net/

2014年10月2日 星期四

泰雅族歡樂歌 Ri muy Sola Ri muy Yo

泰雅族歡樂歌 Rimuy Sola Rimuy Yo
https://www.youtube.com/watch?v=8JeaSYepua0

Ri muy so la ri muy yo

ri muy so la ri muy yo
ri muy so la ri muy yo
ya ba ya ya ya ki
p q(k)a sun(saw) ta ryax soni

p g(t)a sun(saw) ta
p q(k)a sun(saw) ta
(g)u tux ryan so ni

歡樂歌

我們大家聚在一起
爸爸,媽媽,孩子今天都歡喜
讓我們此刻歡喜的聚在一起


台中市立梨山國民中小學母語日網站: 社團活動─泰雅歌謠社
http://lseslanguage.blogspot.com/2013/11/blog-post_7598.html

2014年9月29日 星期一

[Python] Generate executable binary in Linux

Freezing Your Code — The Hitchhiker's Guide to Python
http://docs.python-guide.org/en/latest/shipping/freezing/

How can I create a stand-alone binary from a Python script?
http://effbot.org/pyfaq/how-can-i-create-a-stand-alone-binary-from-a-python-script.htm



Freeze.py

What is the Python freeze process? - Stack Overflow
http://stackoverflow.com/questions/9916647/what-is-the-python-freeze-process

30.1. imp — Access the import internals — Python 2.7.8 documentation
https://docs.python.org/2/library/imp.html#imp.init_frozen

Freeze - Python Wiki
https://wiki.python.org/moin/Freeze

python/freeze.py at master · python-git/python · GitHub
https://github.com/python-git/python/blob/master/Tools/freeze/freeze.py

[projects] Index of /python/trunk/Tools/freeze
http://svn.python.org/view/python/trunk/Tools/freeze/

ubuntu - Error in using Python freeze.py - Stack Overflow
http://stackoverflow.com/questions/20313886/error-in-using-python-freeze-py

Ubuntu 13.10
  1. sudo apt-get install python2.7-examples
    The one mark in red is the freeze.py we need.
    dpkg -S freeze.py
    python-pip: /usr/share/pyshared/pip/commands/freeze.py
    python-pip: /usr/lib/python2.7/dist-packages/pip/commands/freeze.py
    python2.7-examples: /usr/share/doc/python2.7/examples/Tools/freeze/makefreeze.py
    python2.7-examples: /usr/share/doc/python2.7/examples/Tools/freeze/freeze.py
  2. sudo ln -s /usr/lib/python2.7/config-x86_64-linux-gnu/ /usr/lib/python2.7/config
  3. python /usr/share/doc/python2.7/examples/Tools/freeze/freeze.py test.py
  4. make
  5. If make finished successfully, the executable binary should be available at ./test.

cxfreeze script — cx_Freeze 5.0 documentation
http://cx-freeze.readthedocs.org/en/latest/script.html#script