I hereby claim:
- I am daldei on github.
- I am daldei (https://keybase.io/daldei) on keybase.
- I have a public key ASD7e_4q1N0JwG5DSbdZUhLTg99I8tJ3ng60y-Uxd2eRJAo
To claim this, I am signing this object:
#!/bin/bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
source /bath/to/bash-getopt | |
foo_dflt="wibble" | |
bash-getopt "$@" <<END_OPTS |
#!/bin/sh | |
############################################################################# | |
## Usage: cfvalidate file.template [ file ...] | |
############################################################################## | |
## Convenience wrapper script for aws cli 'cloudformation validate-template' | |
## which requires a inline, file URL or S3 url for templates to validate | |
## This script takes simple, absolute or relative filenames and validate them | |
## using the AWS API | |
## https://aws.amazon.com/cli/ | |
## |
/* | |
* Vairiadic Macros used in this form are portable to MSVC and GCC | |
* https://gcc.gnu.org/onlinedocs/gcc/Variadic-Macros.html#Varia | |
* https://msdn.microsoft.com/en-us/library/ms177415(v=vs.100).aspx | |
*/ | |
#include <stdio.h> | |
#if __GNUC__ | |
#define __FUNCSIG__ __PRETTY_FUNCTION__ | |
#endif |
Demonstrate invoking the internal /eval xdbc endpoint on a HTTP server in MarkLogic to create a Redirect. | |
Note that there are simplier and easier ways to accomplish this, e.g using the user defined error handler or | |
rewriting to a endpoint that calls xdmp:redirect-response(). This example shows that it can be done 'out of the box' | |
by utilizing the builtin support for XDBC handling. | |
On Port 8000 in the default installation, and on any new REST servers a block of the declarative rewriter dispatches | |
XDBC requests to the internal XCDBC endpoints directly. | |
The xdbc.xml attached file shows the relevent block of XML. The enableing factor is the use of <dispatch xdbc="true">. | |
A custom rewriter can rewrite any request to one of the builtin endpoints ( /eval, /invoke , /spawn , /insert ) and then dispatch to xdbc. |
#!/bin/bash | |
# | |
# git-mv-with-history -- move/rename file or folder, with history. | |
# | |
# Moving a file in git doesn't track history, so the purpose of this | |
# utility is best explained from the kernel wiki: | |
# | |
# Git has a rename command git mv, but that is just for convenience. | |
# The effect is indistinguishable from removing the file and adding another | |
# with different name and the same content. |
// from | |
// http://stackoverflow.com/questions/35852475/how-to-use-the-default-aws-credentials-chain-for-an-s3-backed-maven-repository-i | |
apply plugin: 'java' | |
apply plugin: 'maven-publish' | |
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { |
#! /usr/bin/python | |
# Print the 'NEVRA' of an rpm file using its path only | |
# This is what yum tools does when given only an rpm filename | |
import sys | |
import re | |
from rpmUtils.miscutils import splitFilename | |
for path in sys.argv[1:]: | |
x = path[path.rfind( '/' )+1:] | |
# print "Path: {0} File: {1}".format(path,x) |
#! /usr/bin/python | |
# Same as rpmname.sh but using rpmUtils python library | |
import sys | |
import re | |
import rpmUtils.transaction | |
from rpmUtils.miscutils import splitFilename | |
from rpmUtils.miscutils import hdrFromPackage | |
from rpmUtils.miscutils import pkgTupleFromHeader | |
ts = rpmUtils.transaction.initReadOnlyTransaction() |
#! /usr/bin/python | |
# normalize an rpm path. | |
# Given an rpm file print its normalized path as name-version-release-arch.rpm | |
# Note: this reads the metadata from the rpm file itself to generate the path | |
import sys | |
import re | |
import rpmUtils.transaction | |
from rpmUtils.miscutils import splitFilename | |
from rpmUtils.miscutils import hdrFromPackage | |
from rpmUtils.miscutils import pkgTupleFromHeader |
I hereby claim:
To claim this, I am signing this object: