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 | |
FILE=/var/log/speedtest/speedtest-`date +"%Y%m"`.results | |
printf -- '-%.0s' {1..80} >> $FILE | |
echo >> $FILE | |
date >> $FILE | |
/usr/local/bin/speedtest --progress=no >> $FILE | |
printf -- '-%.0s' {1..80} >> $FILE | |
echo >> $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
IFS=','; for c in `curl -k -s https://localhost:8083/connectors | sed 's/\"//g; s/\[//g; s/\]//g'`; do echo $c; curl -k -s https://localhost:8083/connectors/$c/config > $c.config; done |
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 | |
echo "Shutting down control_center" | |
ansible all -i $1 --limit control_center -m service -a "name=confluent-control-center state=stopped" | |
sleep 60 | |
echo "Shutting down ksql" | |
ansible all -i $1 --limit ksql -m service -a "name=confluent-ksql state=stopped" | |
sleep 60 | |
echo "Shutting down schema_registry" | |
ansible all -i $1 --limit schema_registry -m service -a "name=confluent-schema-registry state=stopped" | |
sleep 60 |
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 | |
## The ./send-syslog-data.sh command below runs as a background task to maximize the cores and ram. | |
## This script may make the system usable. Change the "&" to a ";" if you want to run it one file at | |
## a time. | |
for x in `find ./$1 -type f`; do ./send-syslog-data.sh $x & done |
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 | |
echo "Sending $1" | |
while read line; do printf "."; echo $line | nc SYSLOG-CONNECT-FQDN_GOES-HERE 1514; done < $1 | |
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
(: Password rules | |
: | |
: at least 12 characters | |
: has not been used in the previous 24 passwords | |
: has not been changed in the last day | |
: does not contain your account or full name | |
: contains at least three of the the four character groups | |
: - lower case | |
: - upper case | |
: - numbers |
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
xquery version "1.0-ml"; | |
import module namespace tde = "http://marklogic.com/xdmp/tde" | |
at "/MarkLogic/tde.xqy"; | |
let $template-uri := "/gds_sample_GeoJSON.tde" | |
let $template := | |
<template xmlns="http://marklogic.com/xdmp/tde"> | |
<description>Example template for GeoJSON documents</description> | |
<context>/envelope[header/type="geojson"]</context> |
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
cts:uris('/sources/', "document", cts:element-query(xs:QName('myElement'),cts:and-query(()))) |
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
declare namespace z = "xdmp:zip"; | |
let $parts := | |
element z:parts { | |
for $uri in cts:uris('/sources/', "document", cts:element-query(xs:QName('UploadDocumentMetadata'),cts:and-query(())))[1 to 100] | |
return (<z:part>{$uri}</z:part>, <z:part>{fn:doc($uri)//UploadedDocumentPath/text()}</z:part>) | |
} | |
let $zip := xdmp:zip-create($parts, ( | |
for $p in $parts/z:part | |
return fn:doc($p) ) |
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
xdmp:document-load("/tmp/docs.zip") | |
; | |
declare namespace z = "xdmp:zip"; | |
for $x in xdmp:zip-manifest(doc("/tmp/docs.zip"))//z:part/text() | |
return | |
xdmp:document-insert($x, xdmp:zip-get(doc("/tmp/docs.zip"), $x)) |
NewerOlder