October 13, 2011
September 30, 2011
chmod 644 for files and 755 for directories
- find path -type f | xargs chmod 644
- find path -type d | xargs chmod 755
Labels: Notes
August 18, 2011
August 08, 2011
August 04, 2011
gitolite + http mode + LDAP
gitolite 安裝
參考這邊,將 /var/www 改為想要放置 git repo 位置的目錄cd /var/www/mkdir gitolite-homeexport GITOLITE_HTTP_HOME=/var/www/gitolite-homePATH=$PATH:$GITOLITE_HTTP_HOME/bincd gitolite-home/git clone git://github.com/sitaramc/gitolite gitolite-sourcecd gitolite-source/GHH=$GITOLITE_HTTP_HOMEmkdir -p $GHH/bin $GHH/share/gitolite/conf $GHH/share/gitolite/hookssrc/gl-system-install $GHH/bin $GHH/share/gitolite/conf $GHH/share/gitolite/hooksvim /var/www/gitolite-home/share/gitolite/conf/example.gitolite.rcgl-setup ADMIN的LDAP帳號
apache 設定
參考這邊,修改 auth 的部份為 LDAP
<LocationMatch "/git">AuthType BasicAuthName "Git"Require valid-userAuthBasicProvider ldapAuthzLDAPAuthoritative offAuthLDAPURL "ldap://server:389/dc=company,dc=local?sAMAccountName?sub?(objectclass=*)" NONEAuthLDAPBindDN "cn=user,ou=team,ou=department,dc=company,dc=local"AuthLDAPBindPassword secret</LocationMatch>
設定gitolite
選擇以後要放設定檔的位置
- git clone http://server/git/gitolite-admin
gitolite.conf 的設定說明,要新增 repo 或是要加入使用者設定都是在這個檔案修改,修改完成以後將 gitolite.conf 更新回 server
- git add
- git commit
- git push origin master
July 28, 2011
git-http-backend on CentOS 5.5
from CentOS, Git & http-push unavailable
- install new version curl in local directory
- configure git as ./configure --with-curl=curl dir
apache settings from
- git init --bare git-repo-dir (beware of the directory permission - httpd user writable)
- git update-server-info
- in /etc/httpd/conf/httpd.conf or /etc/httpd/conf.d/git.conf
SetEnv GIT_PROJECT_ROOT git-repo-dirSetEnv GIT_HTTP_EXPORT_ALLAliasMatch ^/git/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$ /git-repo-dir/$1AliasMatch ^/git/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /git-repo-dir/$1ScriptAliasMatch \"(?x)^/git/(.*/(HEAD | \info/refs | \objects/(info/[^/]+ | \[0-9a-f]{2}/[0-9a-f]{38} | \pack/pack-[0-9a-f]{40}\.(pack|idx)) | \git-(upload|receive)-pack))$" \/usr/local/libexec/git-core/git-http-backend/$1ScriptAlias /git/ /usr/local/share/gitweb/gitweb.cgi<Directory "git-repo-dir">Allow from all</Directory><LocationMatch "/git">AuthType BasicAuthName "Git"#AuthUserFile AuthFile#Require valid-userAuthBasicProvider ldapAuthLDAPURL "ldap://server:389/dc=company,dc=local?sAMAccountName?sub?(objectclass=*)" NONEAuthLDAPBindDN "cn=user,ou=team,ou=department,dc=company,dc=local"AuthLDAPBindPassword secretAuthzLDAPAuthoritative onrequire ldap-user user1 user2 user3</LocationMatch>
auth
- git clone http://server/git-repo-dir
- git clone http://username@server/git-repo-dir
- git clone http://username:password@server/git-repo-dir
- unset SSH_ASKPASS
June 07, 2011
Website to Kindle
- HTTTrack
download website - calibre
e-book management tool - How do I convert a collection of HTML files in a specific order?
create a table of contents file: another HTML file contains links to all the other files in the desired order (if there is *.zip inside zip then delete it)
Labels: kindle
Change Kindle Locale
[Home] - [Del]
;debugOn
~changeLocale zh-TW.utf8
;debugOff
[Home] - [Menu] - Settings - [Menu] - Restart
Labels: kindle
June 03, 2011
May 25, 2011
google calendar的農曆日曆
語系是英文就找不到,切到中文才看的到的日曆
link:
https://www.google.com/calendar/feeds/zh_tw.lunar%23holiday%40group.v.calendar.google.com/public/basic
Labels: google
Subscribe to:
Posts (Atom)