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 com.vho.hudisparkstreaming; | |
import org.apache.hudi.DataSourceWriteOptions; | |
import org.apache.hudi.config.HoodieWriteConfig; | |
import org.apache.hudi.hive.MultiPartKeysValueExtractor; | |
import org.apache.hudi.keygen.CustomKeyGenerator; | |
import org.apache.spark.sql.Dataset; | |
import org.apache.spark.sql.Row; | |
import org.apache.spark.sql.SparkSession; | |
import org.apache.spark.sql.streaming.*; |
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.avro.generic.GenericRecord | |
import org.apache.hadoop.conf.Configuration | |
import org.apache.hadoop.fs.Path | |
import org.apache.parquet.avro.{AvroParquetReader, AvroReadSupport, AvroSchemaConverter} | |
import org.apache.parquet.filter2.compat.FilterCompat | |
import org.apache.parquet.filter2.predicate.{FilterApi, UserDefinedPredicate} | |
import org.apache.parquet.format.converter.ParquetMetadataConverter | |
import org.apache.parquet.hadoop.{ParquetFileReader, ParquetInputFormat} | |
import org.apache.parquet.io.api.Binary |
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
// debit | |
$jq.map($jq("td.cT-bodyTableColumn3 span.cT-line1.cM-numberCell"), function(r, i) { return parseFloat(r.innerHTML.replace(",", "").substring(4)); }).reduce(function(acc, x) { return acc + x; }) | |
// credit | |
$jq.map($jq("td.cT-bodyTableColumn4 span.cT-line1.cM-numberCell"), function(r, i) { return parseFloat(r.innerHTML.replace(",", "").substring(4)); }).reduce(function(acc, x) { return acc + x; }) | |
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
## create new keystore | |
keytool -genkeypair [-keyalg EC -keysize 256 -sigalg SHA256withECDSA] -keystore keystore.jks -alias domain.com | |
## list entries in keystore | |
keytool -list -keystore keystore.jks -v | |
## concatinate multiple keystores | |
keytool -importkeystore -srckeystore keystore1.jks -destkeystore keystore2.jks -deststoretype pkcs12 |
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
ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected] |
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
echo "$(ifconfig eth0|grep "inet add"|awk -F\: '{print $2}'|awk '{print $1}')" "$(hostname)" |
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
myApp.directive('ngSize', function() { | |
return { | |
restrict:'A', | |
scope: { | |
ngSize: '=' | |
}, | |
link: function(scope, elem, attrs) { | |
scope.$watch("ngSize", function(newVal, oldVal) { | |
angular.element(elem).attr('size', newVal); | |
}); |