openssl req -new -newkey rsa:4096 -days 365 -x509 -subj "/CN=Kafka-Security-CA" -keyout ca-key -out ca-cert -nodes
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"; | |
declare variable $TARGET-FILENAME as xs:string := "/tmp/"||xdmp:random()||".zip"; | |
declare variable $URIS as xs:string* := cts:uris((), ("limit=100")); | |
declare function local:write-zipfile() { | |
let $zip := xdmp:zip-create( | |
<parts xmlns="xdmp:zip">{$URIS ! element part {.}}</parts>, | |
($URIS ! doc(.)) | |
) |
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 boto3 | |
from termcolor import colored | |
ec2 = boto3.resource('ec2') | |
for i in ec2.instances.all(): | |
print("Id: {0}\tState: {1}\tLaunched: {2}\tRoot Device Name: {3}".format( | |
colored(i.id, 'cyan'), | |
colored(i.state['Name'], 'green'), |
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 function local:update($map, $key, $num) { | |
let $key := fn:tokenize($key, "-")[3] | |
let $e := ( map:get($map, $key), 0) [1] | |
return map:put($map, $key, $e + $num) | |
}; | |
let $map:= map:map() | |
let $_ := |
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"; | |
declare namespace fs = "http://marklogic.com/xdmp/status/forest"; | |
xdmp:forest-status(xdmp:database-forests(xdmp:database("test")))/fs:forest-name |
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 | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
for KERNEL in /boot/vmlinuz-*; do | |
grubby --update-kernel="$KERNEL" --args='transparent_hugepage=never' | |
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
all: | |
vars: | |
ksql_service_environment_overrides: | |
KSQL_HEAP_OPTS: "-Xmx7g" | |
kafka_broker_service_environment_overrides: | |
KAFKA_HEAP_OPTS: "-Xmx5g" | |
ansible_connection: ssh | |
ansible_user: centos | |
ansible_become: true | |
# ansible_ssh_private_key_file: /home/centos/.ssh/key.pem |
I had issues which I initially believed were related to python 3 but may have been XCode issues - I got it to work by doing all of these things but I'm not sure what was actually necessary - so I'll put all the steps in that I can recall.
Ultimately, I was seeing python stack traces when running tools/dev/v8gen.py x64.optdebug
; the resulting stack trace looked like this:
tools/dev/v8gen.py x64.optdebug
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"; | |
xdmp:save("/Users/ableasdale/javadoc28.html", | |
element html { attribute lang {"en"}, | |
element head { | |
element meta {attribute charset {"utf-8"}}, | |
element meta {attribute name {"viewport"}, attribute content {"width=device-width, initial-scale=1"}}, | |
element link { | |
attribute href {"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css"}, | |
attribute rel {"stylesheet"}, |
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"; | |
xdmp:save("/Users/ableasdale/javadoc.html", | |
element html { attribute lang {"en"}, | |
element head { | |
element meta {attribute charset {"utf-8"}}, | |
element meta {attribute name {"viewport"}, attribute content {"width=device-width, initial-scale=1"}}, | |
element link { | |
attribute href {"https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css"}, | |
attribute rel {"stylesheet"}, |
NewerOlder