This file contains 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
for i in *.pdf; do | |
name=$i; | |
name=${name%.*}; | |
dirname=${name} | |
echo $dirname | |
mkdir -p $dirname | |
cp $i $dirname/$i | |
cd $dirname | |
convert -quality 100 $i ${name}.png; | |
rm -rf $i |
This file contains 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/sh | |
# Usage: ./profile.sh pid output.txt | |
PROFILED_PID=$1 | |
OUTPUT_FILE=$2 | |
echo "Getting stacktraces from process $PROFILED_PID... Will stop on ^C or when the process exits." | |
rm -f "$OUTPUT_FILE" |
This file contains 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
If you attempt to proxy pass CDH 5 Manager using apache, you may run into following error: | |
2014-06-29 08:43:02,977 WARN [600353515@scm-web-6:csrf.CsrfRefererInterceptor@68] Rejecting request originating from x.x.x.x for http://x.x.x.x:7180/cmf/parcel/validate with referrer blah | |
To resolve the issue, just set ProxyPreserveHost to On. |
This file contains 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
#!/usr/bin/env bash | |
sudo mkdir -p /data/app/my-profiler-agent/logs | |
sudo chmod 777 /data/app/my-profiler-agent | |
sudo chmod 777 /data/app/my-profiler-agent/logs | |
sudo yum install -y wget | |
wget http://cmmaven.cm.aol.com:8081/nexus/content/repositories/aol-advertising/com/aol/advertising/dmp/my-profiler-agent/0.0.1/my-profiler-agent-0.0.1.jar -O /data/app/my-profiler-agent/my-profiler-agent.jar | |
java -jar /data/app/my-profiler-agent/my-profiler-agent.jar > /data/app/my-profiler-agent/logs/out.log & | |
This file contains 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 org.apache.spark.SparkContext | |
import org.apache.spark.sql.{Dataset, SQLContext, SparkSession} | |
object DataSetOptBug { | |
def main(args: Array[String]): Unit = { | |
if (System.getProperty("spark.master") == null) System.setProperty("spark.master", "local[*]") | |
val sparkSession: SparkSession = SparkSession.builder.appName("AudScale Context").getOrCreate | |
val sqlContext: SQLContext = sparkSession.sqlContext | |
val sparkContext: SparkContext = sparkSession.sparkContext |
This file contains 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
Caused by: javax.ws.rs.ProcessingException: Error closing message content input stream. | |
at org.glassfish.jersey.message.internal.EntityInputStream.close(EntityInputStream.java:159) | |
at org.glassfish.jersey.message.internal.InboundMessageContext$EntityContent.close(InboundMessageContext.java:151) | |
at org.glassfish.jersey.message.internal.InboundMessageContext.close(InboundMessageContext.java:909) | |
at com.github.dockerjava.jaxrs.connector.ApacheConnectorClientResponse.close(ApacheConnectorClientResponse.java:45) | |
at org.glassfish.jersey.client.InboundJaxrsResponse.close(InboundJaxrsResponse.java:163) | |
at com.github.dockerjava.jaxrs.util.WrappedResponseInputStream.close(WrappedResponseInputStream.java:57) | |
at com.github.dockerjava.core.async.ResultCallbackTemplate.close(ResultCallbackTemplate.java:80) | |
at com.getintent.aerospike.embedded.AerospikeContainerMonitor.run(AerospikeContainerMonitor.java:41) | |
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) |
This file contains 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
object EnumeratorFun extends App { | |
var counter: Int = 0 | |
val enumerator = Enumerator.generateM[Int]({ | |
val ret: Option[Int] = if (counter < 5) { | |
counter += 1 | |
Some(counter) | |
} else None | |
Future(ret) |
This file contains 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 | |
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server | |
############################################### | |
# To use: | |
# wget https://gist.github.com/aniketbhatnagar/6576857/raw/b8618f01dc9221c05101a391e95f2291fe662364/install-redis.sh | |
# chmod 777 install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
echo "*****************************************" |
This file contains 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
################################################################################################# | |
## This scripts install elastic search. Please save and run this script from directory ## | |
## newly created directory. ## | |
################################################################################################# | |
#Download and elastic search RPM | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.3.noarch.rpm |
This file contains 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
ec2-authorize default -p 2003 |
NewerOlder