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)]

為什麼的「麼」打不出來?? - Google Groups
https://groups.google.com/forum/#!topic/chewing-devel/8VnzaqsniRI

剛才看了一下新酷音給的字檔、辭檔,「麼」有這些讀音:
ㄇㄚˊ, ㄇㄚ˙, ㄇㄛˊ, ㄇㄜ˙



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