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
| https://jkstoragedata.blob.core.windows.net/data/spark_materials.tar.gz | |
| https://jkstoragedata.blob.core.windows.net/data/products.json.zip | |
| spark-shell --driver-memory 10G --executor-memory 15G --executor-cores 8 | |
| CREATE TABLE `movie`( | |
| `id` int, | |
| `name` string, |
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
| sourcetype="access_combined_wcookie" status=200|stats count as views count(eval(action="addtocart")) as addtocart count(eval(action="purchase")) as purchases by productName |eval viewstopurchases=(purchases/views) *100| eval carttopurchases=(purchases/addtocart) *100| table productName views addtocart purchases viewstopurchases carttopurchases | rename productName as "Product Name", views as "Views", addtocart as "Adds to Cart", purchases as "Purchases" | |
| Field Extraction | |
| (?i)^(?:[^"]*"){8}\s+(?P<response>.+) | |
| index=main sourcetype=access_combined| eval browser=useragent|replace *Firefox* with Firefox , *Chrome* with Chrome, *MSIE* with IE, *Version*Safari* with Safari , *Opera* with Opera in browser|top limit=5 useother=t browser | |
| index=main sourcetype=access_combined| eval os=useragent|replace *Windows* with Windows, *Macintosh* with Apple, *Linux* with Linux in os| top limit=3 useother=t os | |
| index=main sourcetype=access_combined|stats dc(clientip) as Referals by referer_domain|sort - Referals |
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 http = require('http'); | |
| var handleRequest = function(request, response) { | |
| console.log('Received request for URL: ' + request.url); | |
| response.writeHead(200); | |
| response.end('Hello World!'); | |
| }; | |
| var www = http.createServer(handleRequest); | |
| www.listen(8080); |
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
| az vmss extension set \ | |
| --publisher Microsoft.Azure.Extensions \ | |
| --version 2.0 \ | |
| --name CustomScript \ | |
| --resource-group myResourceGroupAG \ | |
| --vmss-name myvmss \ | |
| --settings '{ "fileUris": ["https://raw.githubusercontent.com/Azure/azure-docs-powershell-samples/master/application-gateway/iis/install_nginx.sh"], "commandToExecute": "./install_nginx.sh" }' |
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
| sudo yum install git | |
| wget http://ftp.wayne.edu/apache/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz | |
| tar xvf apache-maven-3.5.4-bin.tar.gz | |
| mv apache-maven-3.5.4 maven | |
| sudo mv maven/ /usr/local/ | |
| export PATH=$PATH:/usr/local/maven/bin | |
| git clone https://github.com/jwkidd3/kafka | |
| cd kafka/kafka_macys | |
| mvn package |
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
| https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-table |
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
| git clone https://github.com/kubernetes-incubator/metrics-server.git | |
| kubectl create -f metrics-server/deploy/1.8+/ |
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
| provider "azurerm" {} | |
| resource "azurerm_resource_group" "rg" { | |
| name="jkterratestrg" | |
| location="southcentralus" | |
| } | |
| terraform init | |
| terraform plan | |
| terraform apply -auto-approve | |
| terraform destroy -auto-approve |
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
| create new vm from ubuntu 16.04LTS | |
| ssh into new vm | |
| install nginx | |
| run sudo waagent -deprovision+user -force | |
| az vm deallocate --resource-group myResourceGroup --name myVM | |
| az vm generalize --resource-group myResourceGroup --name myVM | |
| az image create -g myResourceGroup -n myImage --source myVM |
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
| provider "azurerm" {} | |
| data "azurerm_resource_group" "image" { | |
| name = "jktempvmrg" | |
| } | |
| data "azurerm_image" "image" { | |
| name = "jknginx" | |
| resource_group_name = "${data.azurerm_resource_group.image.name}" | |
| } |