googlesheet如果需要將兩個array串成一個array時,使用{array1;array2}的格式。
參考資料
忘了留
2015年10月5日 星期一
XFCE自動完成失效問題
在XFCE下ubuntu的tab自動完成失效,解決方法是修改xml file
.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
把下面改掉
<property name=”<Super>Tab” type=”string” value=”switch_window_key”/>
.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
把下面改掉
<property name=”<Super>Tab” type=”string” value=”switch_window_key”/>
改成這個
<property name=”<Super>Tab” type=”empty”/>
參考資料
https://241931348f64b1d1.wordpress.com/2012/05/04/shell-autocomplete-not-working-on-xrdp-xubuntu-12-04-xfce/
selenium
selenium get url of webpage
selenium2library 可以使用 keyword "Get Location"
另外Get Element Attribute 需要使用id name@class而非一般XPATH格式否則會有錯誤
參考資料
自己
http://stackoverflow.com/questions/15985339/how-do-i-get-current-url-in-selenium-webdriver-2-python
selenium2library 可以使用 keyword "Get Location"
另外Get Element Attribute 需要使用id name@class而非一般XPATH格式否則會有錯誤
The expression is not a legal expression
而使用Get Value獲取@href不行因為結果會是attribute而非element,會有錯誤
[object XrayWrapper [object Attr]]
當需要驗證popup windows兩者標題又相同無法switch window時,後來採取抓取button href資訊並直接go to就可以不被popup限制參考資料
自己
http://stackoverflow.com/questions/15985339/how-do-i-get-current-url-in-selenium-webdriver-2-python
rebot
robotframework 可以使用 rebot <file1>.xml <file2>.xml來合併xml,並且合併之後log.html與report.html也會跟著update
可使用參數--name <name>來變更suite name
如用Windows寫sh script時要注意檔案格式需為UNIX,否則可能有執行上問題,錯誤訊息
' failed: Data source does not exist.Appengine/X3000001.robot
Try --help for usage information.
: not found3: script.sh:
參考資料
https://twiki.cern.ch/twiki/bin/view/EMI/RobotFrameworkAdvancedGuide#Using_the_rebot_Tool
http://stackoverflow.com/questions/25988071/combining-robot-framework-test-reports
可使用參數--name <name>來變更suite name
如用Windows寫sh script時要注意檔案格式需為UNIX,否則可能有執行上問題,錯誤訊息
' failed: Data source does not exist.Appengine/X3000001.robot
Try --help for usage information.
: not found3: script.sh:
參考資料
https://twiki.cern.ch/twiki/bin/view/EMI/RobotFrameworkAdvancedGuide#Using_the_rebot_Tool
http://stackoverflow.com/questions/25988071/combining-robot-framework-test-reports
ddwrt設定wake on lan
由於無法NAT layer-2 broadcast,所以必須使用wake on internet (255.255.255.255)發送packet NAT到主機ip並寫入arp table使得router不須透過arp request取得ip的mac address。由於arp table會在重開機時清除所以使用指令arp -s <ip> <mac>並使用cron定時寫入防止遇到device重開機。
cron指令詳如下
*/20 * * * * arp -s <ip> <mac> 代表每3分鐘寫入一次
參考資料
Apache 使用virtualbox分享資料夾做為www資料夾內容 gitweb設定
1) Power the VM down and add the shared folder with the Virtualbox Manager (never works right for me if VM is on)
2) Power on the VM and make your symbolic link to the shared folder where ever you want your web root to be:
ln -s /media/sf_share /var/www
chown -h www-data /var/www
NOTE: If your OS runs apache under the user: apache or apache2, replace www-data with that.
3) Add the user apache runs under to the group vboxsrv. Edit /etc/group and on the line that defines the vboxsrv group. Here is what my line in the group file looks like:
vboxsf:x:1001:sean,www-data
NOTE: Again, swap out www-data for the user apache runs under, if not www-data.
4) Reboot the VM.
重點是在建立soft link到www資料夾下 step 2
https://forums.virtualbox.org/viewtopic.php?f=3&t=34922
檢查link是否建立成功
http://linux.vbird.org/linux_basic/0230filesystem.php#ln
apache tool
htdigest -c 建立密碼檔
mod-avaliable and mod-enabled
使用symbolic link把avaliable link到enable下,apache啟動時會讀取enable下之所有module
gitweb需要load module如下
alias.conf
alias.load
auth_basic.load
auth_digest.load
authn_file.load
authz_default.load
authz_groupfile.load
authz_host.load
authz_user.load
autoindex.conf
autoindex.load
cgi.load
dav_fs.conf
dav_fs.load
dav.load
deflate.conf
deflate.load
dir.conf
dir.load
env.load
mime.conf
mime.load
negotiation.conf
negotiation.load
php5.conf
php5.load
reqtimeout.conf
reqtimeout.load
setenvif.conf
setenvif.load
status.conf
status.load
gitolite client設定
git clone git@<ip>:<repository name>.git
以下需在repository目錄下
看狀態 git status
commit 差異文件 git commit -a
上傳 git push <remote name, default origin> <branch name/master>
加入檔案 git add <file1> <file2> ...
git remote add [<options>] <name> <url>
參考資料
同事
SVN架設
架設SVN時遇到無法commit,後來查到是因為apache user沒有該svn資料夾權限,因此將該repository資料夾
參考資料
Can't open file '/server/svn/repo/db/txn-current-lock': Permission denied
http://stackoverflow.com/questions/960241/svn-permission-denied
svn架設
http://eric0806.blogspot.tw/2014/05/ubuntu-svn-server-with-websvn.html
chown -R apache:apache *, chmod -R 664 *即可正常使用參考資料
Can't open file '/server/svn/repo/db/txn-current-lock': Permission denied
http://stackoverflow.com/questions/960241/svn-permission-denied
svn架設
http://eric0806.blogspot.tw/2014/05/ubuntu-svn-server-with-websvn.html
訂閱:
文章 (Atom)