Chuyển đến nội dung chính

Bài đăng

Change Timezone in CentOS | Thay đổi múi giờ trong CentOS

Timezone of VietNam is Asia/Ho_Chi_Minh. To change default timezone in centos, follow this struction.   mv /etc/localtime /etc/localtime.bak ln -s /usr/share/zoneinfo/Asia/Ho_Chi_Minh /etc/localtime Type date in terminal and you will see time in Viet Nam In Linux, the system time zone is determined by the symbolic link /etc/localtime . This link points to a time zone data file that describes the local time zone. The time zone data files are located at either /usr/lib/zoneinfo or /usr/share/zoneinfo depending on what distribution of Linux you use. For example, on a SuSE system located in New Jersey the /etc/localtime link would point to /usr/share/zoneinfo/US/Eastern . On a Debian system the /etc/localtime link would point to /usr/lib/zoneinfo/US/Eastern . If you fail to find the zoneinfo directory in either the /usr/lib or /usr/share directories, either do a find /usr -print | grep zoneinfo or consult your distribution's do...

Xcode duplicate/delete line key shortcut

Follow this tutorial http://stackoverflow.com/questions/551383/xcode-duplicate-delete-line sudo chmod 666 / Applications / Xcode . app / Contents / Frameworks / IDEKit . framework / Resources / IDETextKeyBindingSet . plist     sudo chmod 777 / Applications / Xcode . app / Contents / Frameworks / IDEKit . framework / Resources /  Open /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist with Xcode himself and add this new entry :   deleteToBeginningOfLine :, moveToEndOfLine :, deleteToBeginningOfLine :, deleteBackward :, moveDown :, moveToBeginningOfLine : Restart Xcode and open Xcode > Preferences > KeyBindings. Find your macro and define a shortkey :

startup mongod when mac osx start

create new plist named: org.mongo.mongod.plist in /Library/LaunchDaemons/ <?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>Label</key> <string>org.mongo.mongod</string> <key>RunAtLoad</key> <true /> <key>ProgramArguments</key> <array> <string>/usr/local/bin/mongod</string> <string>--logpath</string> <string>/var/log/mongodb.log</string> </array> </dict> </plist> ensure that file mongodb.log already exist or you should create empty file ( touch /var/log/mongodb .log or vim /var/log/mongodb.lo g) chown root:wheel /Library/LaunchDaemons/org.mongo.mongod.plist launchctl load /Library/LaunchDaemons/org .mongo.mongod.plist la...