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 -ex | |
orig_git=$HOME/caas | |
# want to make sure that what is pointed to has a .git directory ... | |
git_dir=$(cd "$orig_git" 2>/dev/null && git rev-parse --git-dir 2>/dev/null) | |
if test $? -ne 0; then | |
echo "Not a git repository: \"$orig_git\"" | |
exit 128 | |
fi |
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 -A props | |
eval `grep -v '^#' $PROPS_FILE | sed -e 's/"/\\"/g;s/\${\([^}]*\)}/${props[\1]}/g;s/^\([^=]*\)=\(.*\)$/props[\1]="\2"/'` |
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
Map<String, String> headers = Collections.list(request.getHeaderNames()).stream().collect(Collectors.toMap(Function.identity(), n -> request.getHeader(n))); |
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
function sqlplus { | |
local USER=SYS | |
local PASS=<default_password> | |
local NET | |
local HOST=localhost | |
local PORT | |
local SID=<default_sid> | |
local ROLE=SYSDBA | |
local EDITION | |
local DEFAULT_DOCKER_IMAGE=oracle/database:12.2.0.1-ee |
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/perl | |
use strict; | |
use warnings; | |
use JSON; | |
$/ = undef; | |
print JSON->new->allow_nonref->pretty->encode(decode_json scalar <>); |
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 | |
# Creates a "reference repository" on a Jenkins slave to speed up build times. | |
# Assumes that you will clone using HTTPS and enter username/password, then | |
# Jenkins will use an SSH key in the future. | |
# | |
# Works with Jenkins and GitLab. For other applications your mileage may vary. | |
REPO_SERVER=osn-git.us.oracle.com | |
REPO_PATH=ccs/caas.git |
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
function findCommonParent(a, b) { | |
var $a = $(a), | |
$b = $(b), | |
found; | |
/* | |
* A complicated one-liner here; with each element a & b, | |
* get the set of parents, | |
* and add to this the element | |
* .add() will sort the elements in document order though |
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
# mysql <container> [...] | |
function mysql { | |
docker run -it --link $1:mysql --rm mariadb sh -c "exec mysql -h\"\$MYSQL_PORT_3306_TCP_ADDR\" -P\"\$MYSQL_PORT_3306_TCP_PORT\" -uroot -p\"\$MYSQL_ENV_MYSQL_ROOT_PASSWORD\" ${@:2}" | |
} | |
# mysqladmin <container> [...] | |
function mysqladmin { | |
docker run -it --link $1:mysql --rm mariadb sh -c "exec mysqladmin -h\"\$MYSQL_PORT_3306_TCP_ADDR\" -P\"\$MYSQL_PORT_3306_TCP_PORT\" -uroot -p\"\$MYSQL_ENV_MYSQL_ROOT_PASSWORD\" ${@:2}" | |
} |
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
$.fn.reduce = function() { | |
return (arguments.length > 1 || this.length) ? $([].reduce.apply(this.toArray(), arguments)) : this; | |
}; |
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
You can add matic by adding "matic" and "jade" to the package.json, then add "RUN $(npm bin)/matic" to the Dockerfile. | |
I wonder if it would be as easy to add harpjs? |
NewerOlder