PCA9555 TCA9555 TCA6416A GCA9555 GCA6416A
分類彙整: 未分類
解決 wordpress 自動 Update 的問題
Step.1 先到 FileServe.com 申請帳號,他會寄給你一個 FTP Account.
Step.2 到 Wrodpress 下設定 Auto Update 的 FTP 相關設定。
若看到:
Unable to locate WordPress Root directory. Installation Failed
的錯誤訊息,則在 wp-config.php 檔案中加上以下幾行:
/* Fix WordPress autoupgrades on Byethost.com */ putenv('TMPDIR=' . ini_get('upload_tmp_dir')); if(is_admin()) { add_filter('filesystem_method', create_function('$a', 'return "direct";' )); define( 'FS_CHMOD_DIR', 0751 ); }
以上參考: Unable to locate WordPress Root directory. Installation Failed
另外,也要注意,wordpress 檔案目錄的權限設定是否正確。
在 wordpress.com 上發布 原始碼
之前一直都不知道要如何才可以貼 source code 而不需擔心排版與字元格式
今天參考了 這篇
才知道可以這樣做:
[sourcecode language="css"]
your code here
[/sourcecode]
支援的程式語言有:
actionscript3, bash, coldfusion, cpp, csharp, css, delphi, erlang, fsharp, diff
groovy, javascript, java, javafx, matlab (keywords only)
objc, perl,php, text, powershell, python, r, ruby, scala, sql, vb, xml
SVN + http + NIS Authentication on OpenSUSE 11.2
Step.1 Install OpenSUSE 11.2
- New Installation
- English
- select GNOME Desktop
- LVM Partitioning
- /boot : 70.57MB
/ : 40GB
/srv : max
swap : 4GB - disable Fireware
- NTP: time.stdtime.gov.tw
Step.2 Network
- IP : 192.168.103.xxx
- Gateway : 192.168.103.254
- Subnet Mask : 255.255.0.0
- DNS : 192.168.xxx.xxx
- Hostname : svn
Step.3 NIS Client
- domain: xxx
- server: 192.168.xxx.xxx
- Enable automount
- Check /etc/nsswitch.conf setting
- passwd: files nis
group: files nis
shadow: files nis
hosts: files nis dns
Step.4 Add Software Repository
- Apache Module
- http://download.opensuse.org/repositories/Apaches:/Modules/OpenSUSE_11.2
- RemoteDesktop
- http://download.opensuse.org/repositories/X11:/RemoteDesktop/OpenSUSE_11.2
Step.5 Install Nvidia Driver
- Visit http://en.opensuse.org/NVIDIA_drivers
Step.6 Software Install by using yast2
- Update All Patches
- Install Apache
- apache2
apache2-mod_perl, apache2-mod_php5,
apache2-mod_authnz_external
apache2-mod_security2
yast2-http-server - Install FTP server
- pure-ftpd
yast2-ftp-server - Install Development Tools
- gcc, gcc-c++, make, autoconf, compat
Step.7 Enable Network Service
- enable sshd, autofs, httpd service
Step.8 SVN Repository
- create directory
#mkdir /srv/svn/projects
#mkdir /srv/svn/users - Change Owner
# chown -R wwwrun /srv/svn
# chgrp -R www /srv/svn - Create SVN Repository
# sudo -u wwwrun svnadmin create /srv/svn/projects
# sudo -u wwwrun svnadmin create /srv/svn/users
Step.9 Apache + NIS Auth
- Reference: http://forums.opensuse.org/get-help-here/network-internet/436171-nis-system-auth-apache-subversion.html
- Download pwauth source code, modify and Recompile
- Download pwauth-2.3.8.tar.gz from http://code.google.com/p/pwauth/downloads/list
# tar -zxvf pwauth-2.3.8.tar.gz
# cd pwauth-2.3.8
# vi config.h- change
- #define SERVER_UIDS 72 /* user "nobody" */
to
- #define SERVER_UIDS 30 /* user "wwwrun" */
# make
# cp ./pwauth /usr/bin
# chmod 4755 /usr/bin/pwauth
- Install checkpassword-pam
- Download checkpassword-pam-0.99.tar.gz from http://sourceforge.net/projects/checkpasswd-pam/files
# tar -zxvf checkpassword-pam-0.99.tar.gz
# cd checkpassword-pam-0.99
# ./configure
# make
# make install - create /etc/pam.d/httpd is
auth include common-auth
account include common-account
password include common-password
session include common-session - In /etc/apache2/default-server.conf, add:
AddExternalAuth pwauth /usr/bin/pwauth
AddExternalAuth checkpassword-pam "/usr/local/bin/checkpassword-pam -H --noenv --debug --stdout -s httpd -- /bin/true"
SetExternalAuthMethod checkpassword-pam checkpassword
AddExternalGroup unixgroup /usr/bin/unixgroup
SetExternalGroupMethod unixgroup environment - In the /etc/apache2/conf.d/subversion.conf:
- DAV svn
SVNParentPath /home/srv/svn
SVNListParentPath on
# Limit write permission to list of valid users.
# Require SSL connection for password protection.
# SSLRequireSSL
AuthType Basic
AuthName "Subversion Server"
AuthExternal checkpassword-pam
AuthBasicProvider external
Require valid-user
AuthzSVNAccessFile /srv/svnaccess.conf - In the /etc/apache2/conf.d/authnz_external.conf :
- AddExternalAuth pwauth /usr/sbin/pwauth
SetExternalAuthMethod pwauth pipe - Enable aoache module and restart apache2
# a2enmod authnz_external
# a2enmod dav
# a2enmod dav_svn
# a2enmod authz_svn
# a2enmod perl
# rcapache2 restart
Step.10 Setup FreeNX
- # nxsetup –install –setup-nomachine-key –clean
Subaru 2010 Outback Crash Test
2010 Subaru Outback NHTSA Frontal Impact
[youtube=http://www.youtube.com/watch?v=pQjcaKhEXUo&hl=zh_TW&fs=1&]
Subaru Outback CM
Parade
[youtube=http://www.youtube.com/watch?v=PU0pIVze2YE&hl=zh_TW&fs=1&]
My All New Subaru 2010 Outback 2.5i
Enable TFTP Server on Mac OS X 10.6
Step.1 啟動 TFTP service
# sudo /sbin/service tftp start
Step.2 變更 TFTP root directory (如果有必要的話)
TFTP root directory 的預設路徑是在 /private/tftpboot
如果想要變更的話,請修改 tftp.plist 的 tag,如:
/usr/libexec/tftpd
-i
/Users/fly/tftp
修改完畢之後,tftpd 需要重新啟動
# sudo /sbin/service tftp stop
# sudo /sbin/service tftp start
安裝 Altera USB-Blaster Driver for OpenSuSE 11.2
Step.1 新增 /etc/udev/rules.d/51-usbblaster.rules 內容如下
# USB-Blaster
BUS=="usb", SYSFS{idVendor}=="09fb", SYSFS{idProduct}=="6001", MODE="0666",
PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev};
printf /proc/bus/usb/%%03i/%%03i$${K%%%%.*} $${K#*.}'",
RUN+="/bin/chmod 0666 %c"
特別注意: 上面敘述”BUS==…”要在同一行
Step.2 新增 /etc/fstab 內容如下
usbfs /proc/bus/usb usbfs devmode=0666 0 0
Step.3 執行下面指令 或 直接重新開機也可
sudo mount /proc/bus/usb
SystemVerilog Interface 的 inout port
發現一個現象,
當使用 SystemVerilog Interface 時,
若 Interface 內有用到 inout,
則該訊號不能宣告成 logic,
必須要宣告成 wire,
不然如果與非 interface 寫法的 inout port 相連時,
NC 會回報錯誤:
ncelab: *E,CUVMIO (../tb/tb.sv,58|48): port connections to inout ports must be collapsible, that is, they must be nets of the same size.