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 | |
for i in {1..10000000} | |
do | |
DATE=`date '+%Y-%m-%d %H:%M:%S'` | |
TEXT="TEXT VALUE" | |
#echo "Looping ... number $i" | |
echo "INSERT INTO test.bulk1 (partition, create_date, description, randon) VALUES (1, '$DATE', '$TEXT $RANDON', '$i');" >> result.txt | |
done | |
echo "exit;" >> result.txt | |
cat result.txt | ccm node1 cqlsh |
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 | |
# Our custom function | |
pull_updates(){ | |
cd $1 | |
pwd | |
git stash -q | |
git checkout -q master | |
git pull | |
sleep 1 | |
} |
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
%dep | |
z.load("/usr/zeppelin/interpreter/interpreter/spark/spark-cassandra-connector-assembly-2.0.2.jar") | |
%spark | |
import com.datastax.spark.connector._ | |
import org.apache.spark.{SparkConf, SparkContext} | |
import org.apache.spark.SparkContext._ | |
val rdd = sc.cassandraTable("test","users") | |
println("Row count:" + rdd.count) | |
println("Age:" + rdd.first.getInt("age")) |
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
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer | |
wget http://ftp.unicamp.br/pub/apache/cassandra/3.0.16/apache-cassandra-3.0.16-bin.tar.gz | |
tar -xzvf apache-cassandra-3.0.16-bin.tar.gz | |
cd apache-cassandra-3.0.16/tools/bin |
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 | |
# Configure the following default variables according to your requirements | |
language="en-US" # e.g. "de" or "en-US" | |
if [ ! "$1" ]; then | |
# default if no argument is set: | |
version="53.0" # chose from http://download.cdn.mozilla.net/pub/mozilla.org/firefox/releases/ | |
application="firefox" # "thunderbird" or "firefox" but file extension, archive extraction, and binary ######################################################## | |
fi |
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
package foo; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.net.URL; | |
import java.security.cert.Certificate; | |
import javax.net.ssl.HttpsURLConnection; |