Skip to content

Instantly share code, notes, and snippets.

View jc1518's full-sized avatar
🐶

Jackie Chen jc1518

🐶
View GitHub Profile
@jc1518
jc1518 / nginx.conf
Created January 23, 2019 23:25
Nginx config example of reverse proxy for LDAP and HTTP
# http://nginx.org/en/docs/
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/log/nginx/nginx.pid;
events {
worker_connections 1024;
}
@jc1518
jc1518 / confluence_key_query.js
Created December 13, 2018 05:09
Check if the Confluence key has been used.
<form class="aui">
<script>
AJS.toInit(function() {
AJS.$("#check-key").click(function() {
var validate = /^[0-9a-zA-Z]+$/;
var spacekey = AJS.$("#space-key").val();
if (spacekey.match(validate)) {
AJS.$.ajax({
url: "/rest/api/space/" + spacekey,
type: "GET",
@jc1518
jc1518 / data_classification_workflow
Created December 6, 2018 05:49
Comala Workflow for Confluence Page Data Classification
{workflow:name=Data Classification Workflow}
{description}
Description here
{description}
{state:Public|colour=Green}
{state}
{state:Internal|colour=Blue}
{state}
{state:Protected|colour=Orange}
{state}
@jc1518
jc1518 / splunk_query.js
Last active December 6, 2018 05:50
Nodejs splunk query sample
'use strict';
var splunkjs = require('splunk-sdk');
module.exports = function (robot) {
var service = new splunkjs.Service({
username: process.env.SPLUNK_USERNAME,
password: process.env.SPLUNK_PASSWORD,
scheme:"https",
@jc1518
jc1518 / check_confluence_jmx.js
Last active December 6, 2018 05:51
Nodejs JMX query sample
/**
* Check confluence jmx status
*/
'use strict';
const exec = require('child_process').exec;
module.exports = function (robot) {