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
xquery version "1.0-ml"; | |
declare namespace fs = "http://marklogic.com/xdmp/status/forest"; | |
declare variable $DATABASE as xs:string := xdmp:get-request-field("db") | |
max(xdmp:forest-status(xdmp:database-forests(xdmp:database($DATABASE)))/fs:last-incr-backup) |
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
max(xdmp:forest-status(xdmp:database-forests(xdmp:database("test")))/fs:last-incr-backup) |
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
xquery version "1.0-ml"; | |
declare namespace fs = "http://marklogic.com/xdmp/status/forest"; | |
xdmp:forest-status(xdmp:database-forests(xdmp:database("test")))/fs:last-incr-backup |
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
max(xdmp:forest-status(xdmp:database-forests(xdmp:database("test")))/fs:last-backup) |
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
xquery version "1.0-ml"; | |
declare namespace fs = "http://marklogic.com/xdmp/status/forest"; | |
xdmp:forest-status(xdmp:database-forests(xdmp:database("test")))/fs:last-backup |
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
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 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
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 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
xquery version "1.0-ml"; | |
import module namespace info = "http://marklogic.com/appservices/infostudio" at "/MarkLogic/appservices/infostudio/info.xqy"; | |
declare variable $DATABASE as xs:string := "DB-NAME-HERE"; | |
info:database-create($DATABASE, 2) |
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
import httplib2 | |
import concurrent.futures | |
EMPTY_REQ_BODY = body = "" | |
URI = "http://0.0.0.0:8001/admin/v1/timestamp" | |
REQ_HEADERS = headers = {'Accept': 'text/plain'} | |
EXECUTOR = concurrent.futures.ThreadPoolExecutor(max_workers=64) | |
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
import httplib2 | |
h = httplib2.Http() | |
h.add_credentials('username', 'password') | |
TIMESTAMP_URI = "http://localhost:8001/admin/v1/timestamp" | |
REST_URI = "http://localhost:8002/LATEST/rest-apis" | |
BODY = body = "" | |
ACCEPT_JSON = headers = {'Accept': 'application/json'} | |
ACCEPT_XML = headers = {'Accept': 'application/xml'} |