This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var url = 'http://pan.baidu.com/.......................'; | |
var page = require('webpage').create(); | |
function timeout_shutdown(){ | |
console.info("timeout !!!"); | |
phantom.exit(); | |
} | |
var pageHandler = function (status) { | |
console.log('status: ' + status); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.BorderLayout; | |
import java.awt.Container; | |
import java.awt.Dimension; | |
import java.awt.Font; | |
import java.awt.GraphicsEnvironment; | |
import java.lang.reflect.InvocationTargetException; | |
import javax.swing.JFrame; | |
import javax.swing.JScrollPane; | |
import javax.swing.JTextPane; |
在 gradle 內,執行特定 task 時,需要不同的設定時,可以透 taskGraph 來判斷。下面這例子,很典型地是在 publish 新的 library 時,不含設定檔:
gradle.taskGraph.whenReady { graph ->
if (graph.hasTask(uploadArchives)) {
jar {
exclude '**/*.properties'
}
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var firstName = "-first-name-"; | |
var lastName = "-last-name-"; | |
var email = "-email-"; | |
var phone = "-phone-"; | |
var company = "-company-"; | |
var zipCode = "-zip-code-"; | |
var country = "-country-"; | |
var newLimit = "-limitation-"; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[hdfs@node1 ~]$ hdfs namenode | |
14/05/21 12:37:13 INFO namenode.NameNode: STARTUP_MSG: | |
/************************************************************ | |
STARTUP_MSG: Starting NameNode | |
STARTUP_MSG: host = node1/54.255.200.6 | |
STARTUP_MSG: args = [] | |
STARTUP_MSG: version = 2.2.0 | |
STARTUP_MSG: classpath = /opt/hadoop/etc/hadoop:/opt/hadoop/share/hadoop/common/lib/commons-logging-1.1.1.jar:/opt/hadoop/share/hadoop/common/lib/jetty-util-6.1.26.jar:/opt/hadoop/share/hadoop/common/lib/paranamer-2.3.jar:/opt/hadoop/share/hadoop/common/lib/zookeeper-3.4.5.jar:/opt/hadoop/share/hadoop/common/lib/activation-1.1.jar:/opt/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar:/opt/hadoop/share/hadoop/common/lib/guava-11.0.2.jar:/opt/hadoop/share/hadoop/common/lib/commons-compress-1.4.1.jar:/opt/hadoop/share/hadoop/common/lib/jettison-1.1.jar:/opt/hadoop/share/hadoop/common/lib/commons-digester-1.8.jar:/opt/hadoop/share/hadoop/common/lib/servlet-api-2.5.jar:/opt/hadoop/share/hadoop/common/lib/stax-api-1.0.1.jar:/opt/hadoop/s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.commandlinefu.com/commands/view/1026/empty-the-linux-buffer-cache | |
sync && echo 3 > /proc/sys/vm/drop_caches |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bash-4.1$ kinit hbase/[email protected] -k -t /var/run/cloudera-scm-agent/process/249-hbase-MASTER/hbase.keytab | |
bash-4.1$ klist | |
Ticket cache: FILE:/tmp/krb5cc_484 | |
Default principal: hbase/[email protected] | |
Valid starting Expires Service principal | |
05/25/14 14:29:08 05/26/14 14:29:08 krbtgt/[email protected] | |
renew until 05/25/14 14:29:08 | |
bash-4.1$ klist ^C | |
bash-4.1$ hbase shell /tmp/hbase_test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Configure the instance to run as a Port Address Translator (PAT) to provide | |
# Internet connectivity to private instances. | |
function log { logger -t "vpc" -- $1; } | |
function die { | |
[ -n "$1" ] && log "$1" | |
log "Configuration of PAT failed!" | |
exit 1 |