Categories
- FFMpeg (5)
- Libav (1)
- Google (3)
- iBeacon (1)
- LDAP (3)
- Me (2)
- Network (11)
- OS (149)
- RTMP (4)
- SIP (1)
- Kamailio (1)
- SNMP (1)
- VMware (20)
- VCP考試 (1)
- 伺服器 網站服務 (105)
- 名詞解釋 (4)
- 專案管理 (1)
- 工具軟體 (51)
- Adobe (1)
- FMS (1)
- Cloudera (1)
- Docker (1)
- Eclipse (4)
- Intellij (2)
- OBS (2)
- Office (10)
- Excel (4)
- PowerPoint (5)
- Postman (2)
- Splunk (13)
- Virtualbox (2)
- Visual Studio (2)
- 文字編輯器 (10)
- Sublime Text 2 (6)
- Sublime Text 3 (3)
- Vim (3)
- 連線工具 (1)
- Xshell (1)
- Adobe (1)
- 程式語言 (80)
- CSS (2)
- HTML (2)
- iOS (1)
- Java (30)
- JavaScript (5)
- jQuery (4)
- jsTree (2)
- JSP (3)
- PHP (16)
- Python (8)
- Ruby (1)
- sed (1)
- Shell Script (8)
- Windows Bash Script (1)
- XML (1)
- 資料庫 (37)
- FFMpeg (5)
Category Archives: OS
[Linux] use tee to write log
Source: stackoverflow: How do I write stderr to a file while using “tee” with a pipe? sh test.sh 2>&1 | tee “test.log”
Posted in Linux
Leave a comment
Getting around Active Directory search size limit via ldapsearch
ldapsearch -E pr=500/noprompt -v -x -LLL -h host:port -D account -w password -b “DC=base,DC=dn” -s sub “(objectClass=user)” -E pr=500/noprompt : 500 results per page, no prompt -E pr=1000/prompt : 1000 results per page, show prompt Source: Getting around Active Directory … Continue reading
Posted in LDAP, Linux
Leave a comment
Linux command to get time in milliseconds
src: Linux command to get time in milliseconds date +”%T.%N” returns the current time with nanoseconds. date +”%T.%6N” returns the current time with nanoseconds rounded to the first 6 digits, which is microseconds. date +”%T.%3N” returns the current time with … Continue reading
Posted in Linux
Leave a comment
open external program from java for mac os x
String[] cmds = {“open”, tempFile.getAbsolutePath(), “-a”, “/Applications/Microsoft Office 2011/Microsoft Excel.app”}; Runtime.getRuntime().exec(cmds);
Posted in Java, Mac, Office
Leave a comment
Add git branch name to bash prompt
edit ~/.bash_profile if [ -f $(xcode-select -p)/usr/share/git-core/git-completion.bash ]; then . $(xcode-select -p)/usr/share/git-core/git-completion.bash . $(xcode-select -p)/usr/share/git-core/git-prompt.sh fi #enables color in the terminal bash shell export CLICOLOR=1 #sets up the color scheme for list export LSCOLORS=ExFxCxDxBxegedabagacad #sets up the prompt color (currently … Continue reading
Install Hbase 5.9 in Mac OS X
Download hbase package tar.gz file from https://www.cloudera.com/documentation/enterprise/release-notes/topics/cdh_vd_cdh_package_tarball_59.html Untar tar.gz file edit conf/hbase-env.sh export JAVA_HOME={{JAVA_HOME Directory path}} edit conf/hbase-site.xml <property> <name>hbase.rootdir</name> <value>file:///{{location}}/data</value> </property> <property> <name>hbase.zookeeper.property.dataDir</name> <value>{{location}}/zookeeper</value> </property> <property> <name>hbase.zookeeper.quorum</name> <value>{{hostname}}</value> </property> start hbase service bin/start-hbase.sh run hbase shell bin/hbase shell stop … Continue reading
Posted in HBase, Mac
Leave a comment
Get timestamp in milliseconds
echo $(($(date +%s%N)/1000000)) in Mac OS X, the command date does not support the %N flag, we can install coreutils using homebrew. brew install coreutils Then use gdate to get which we want. echo $(($(gdate +%s%N)/1000000))
Posted in Linux, Mac
Leave a comment
find unused files and delete them
find /var/log/radius/radacct -type f -name “reply*” -mtime +60 -exec rm -rf {} \; -mtime N — more than N days without being edited -exec CMD {} \; — comands, {} means the files which be found.
Posted in Linux, Shell Script
Leave a comment
[Linux] sudo: sorry, you must have a tty to run sudo
edit /etc/sudoers find ‘requiretty’ add username like this Defaults:webuser requiretty
Posted in Linux
Leave a comment
Delete the specific files in all subdirectories
check the find result find . -name “*.bak” -type f delete it find . -name “*.bak” -type f -delete Ref. ask Ubuntu: How can I recursively delete all files of a specific extension in the current directory?
Posted in Linux
Leave a comment