有時候必須使用 命令列 方式 來 commit files
但經常有很多散在各個子目錄裡的新增檔案
若用 svn add 一個一個來新增 實在費時費工
後來在這裡找到一個好方法:
-
svn status | grep “^\?" | awk ‘{print $2}’ | xargs svn add
這樣就可一次將新增檔案加入
不過要小心不要加到垃圾檔了….
有時候必須使用 命令列 方式 來 commit files
但經常有很多散在各個子目錄裡的新增檔案
若用 svn add 一個一個來新增 實在費時費工
後來在這裡找到一個好方法:
這樣就可一次將新增檔案加入
不過要小心不要加到垃圾檔了….
Step.1 Install exFAT Driver
$ sudo apt-get install exfat-fuse
Step.2 Mount USB Flash Disk
$ sudo mount -t exfat -o rw /dev/sda1 /media/usbstick
Step.1 Install Samba package
Step.2 add samba user
Step.3 restart samba service
今天發現可以用 apt-get 來安裝 SDCC Compiler 了!
$ sudo apt-get install sdcc
從 OpenSUSE 12.2 升級至 OpenSUSE 12.3 後
不知為何原本正常的 Apache + NIS Authentication 居然
一直出現密碼錯誤無法登入
[Thu Apr 11 18:33:55 2013] [error] [client 192.168.103.1] AuthExtern checkpassword-pam [/usr/local/bin/checkpassword-pam -H --noenv --debug --stdout -s httpd -- /bin/true]: Failed (2) for user steve [Thu Apr 11 18:33:55 2013] [error] [client 192.168.103.1] user steve: authentication failure for "/svn/": Password Mismatch
似乎是 checkpassword-pam 出了問題
重新下載 checkpassword source re-compile and re-install 也無效
大膽假設 checkpassword 在 OpenSUSE 12.3 有相容性問題 無法工作
無計可施的情況下,只好尋求其他的 Apache + NIS Authentication 的方案
最後找到另一個 solution : http://www.yolinux.com/TUTORIALS/LinuxTutorialApacheAddingLoginSiteProtection.html#NIS
Step.1 Install Perl Modules: ExtUtils-AutoInstall, Net-NIS, Apache2-AuthenNIS
$ perl -MCPAN -e shell ... (Answer no) install ExtUtils::AutoInstall install Net::NIS install Apache2::AuthenNIS quit
Step.2 Test if perl modules installed correct
$ vi testApache2AuthenNIS.pl
#!/usr/bin/perl BEGIN{push @INC, "/usr/lib/perl5/site_perl/5.16.2/Apache2";} eval "use Apache2::AuthenNIS"; $hasApacheAuth = $@ ? 0 : 1; printf "Apache2::AuthenNIS". ($hasApacheAuth ? "" : " not") . " installed"; printf "\n";
$ sudo perl testApache2AuthenNIS.pl Apache2::AuthenNIS installed
Step.3 Modify subversion.conf
$ vi /etc/apache2/conf.d/subversion.conf
<Location /svn/> DAV svn SVNParentPath /svn/repos SVNListParentPath on # Limit write permission to list of valid users. # Require SSL connection for password protection. # SSLRequireSSL AuthType Basic AuthName "Subversion Server" PerlAuthenHandler Apache2::AuthenNIS PerlSetVar AllowAlternateAuth no #AuthExternal checkpassword-pam #AuthBasicProvider external Require valid-user AuthzSVNAccessFile /svn/svnaccess.conf </Location>
Step.5 restart Apache2
Done!
今日將兩台工作站從 OpenSUSE 12.2 升級至 12.3
不料其中一台在升級完成後卻無法開機
研判似乎是 GRUB 損毀了
動作:使用 OpenSUSE 12.3 Rescue CD 修復 GRUB
Step.1 Download OpenSUSE 12.3 Rescue CD ISO file and burn.
Step.2 Boot using rescue CD
Step.3 Check & active LVM
$ vgscan $ vgchange -ay system # system is my volume group name
Step.4 mount original OS
$ mount /dev/mapper/system-root /mnt $ mount /dev/sda1 /mnt/boot $ mount --bind /dev /mnt/dev $ mount --bind /proc /mnt/proc
Step.5 chroot and rebuild GRUB
$ chroot /mnt $ yast bootloader
Step.6 using yast-bootloader to rebuild GRUB
Step.7 reboot
Done!
參考來源:個人收藏指令集:gw6c的LaunchDaemons http://cmd.hhmr.biz/2012/11/gw6claunchdaemons.html
建立檔案 /System/Library/LaunchDaemons/gw6c.plist
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>UserName</key> <string>root</string> <key>GroupName</key> <string>wheel</string> <key>Label</key> <string>gw6c</string> <key>ProgramArguments</key> <array> <string>/usr/local/gw6c/bin/gw6c</string> <string>-f</string> <string>/usr/local/gw6c/bin/gw6c.conf</string> </array> <key>RunAtLoad</key> <true/> <key>OnDemand</key> <false/> <key>KeepAlive</key> <dict> <key>SuccessfulExit</key> <true/> <key>NetworkState</key> <true/> </dict> </dict> </plist>
之後 重新開機 或執行
$ sudo launchctl load /System/Library/LaunchDaemons/gw6c.plist
不過,gw6c 似乎會與 Tunnelblick OpenVPN Client 相衝!?
只要 gw6c 執行中,OpenVPN Client 就無法連接 OpenVPN Server
目前還無對策,只好在需要使用 openvpn 時,先結束 gw6c
$ sudo launchctl unload /System/Library/LaunchDaemons/gw6c.plist
聽說使用 IPv6 可以加快 Youtube 尤其是看 1080p 的時候
以下是安裝過程:
下載/安裝 TunTap for Mac OS X
$ sudo port install vpnc $ sudo port load tuntaposx
下載/編譯 gw6c
$ wget http://nabla.googlecode.com/files/gw6c-6_0-RELEASE.tar.gz $ tar -zxvf gw6c-6_0-RELEASE.tar.gz $ cd gw6c-6_0-RELEASE/tspc-advanced $ make target=darwin all $ sudo make target=darwin installdir=/usr/local/gw6c install
設定 gw6c.conf
$ cd /usr/local/gw6c/bin $ sudo vi gw6c.conf #使用 HiNet 免認證模式: userid= passwd= server=203.74.21.89 auth_method=anonymous #使用 HiNet 認證模式: userid=填入HiNet帳號 如8xxxxxx,只需要數字部分 passwd=填入HiNet密碼 server=203.74.21.88 auth_method=any
啟動 gw6c
$ sudo ./gw6c $ ifconfig 看看 tun0 有沒有出現
測試網站: http://ipv6.google.com
$ sudo vi /etc/modprobe.d/i2c.conf options i2c_bcm2708 baudrate=400000
then reboot…