Skip to content

Instantly share code, notes, and snippets.

Jackie Chen jc1518

Block or report user

Report or block jc1518

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jc1518
jc1518 / S3AccessForSSM
Created Sep 11, 2019
S3 Access Policy for SSM
View S3AccessForSSM
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:GetObject",
"Resource": [
"arn:aws:s3:::aws-ssm-<region>/*",
"arn:aws:s3:::aws-windows-downloads-<region>/*",
"arn:aws:s3:::amazon-ssm-<region>/*",
View jira_sprintquery_sample.js
/*
* Jira sprint query sample
* Find out current sprint and next sprint
*/
'use strict'
const Promise = require('promise')
const request = require('request')
const lodash = require('lodash')
@jc1518
jc1518 / confluence_cql_sample.js
Created Jul 8, 2019
Find all Confluence spaces (including archived ones) that are in Cloud category
View confluence_cql_sample.js
/**
* Confluence CQL sample
* Find all spaces (including archived ones) that are in Cloud category
*/
const request = require('request')
const options = {
headers: { "Content-Type": "application/json" },
auth: {
View check_undo_tablespace.sql
SELECT SUM(a.bytes) as UNDO_SIZE
FROM v$datafile a,
v$tablespace b,
dba_tablespaces c
WHERE c.contents = 'UNDO'
AND c.status = 'ONLINE'
AND b.name = c.tablespace_name
AND a.ts# = b.ts#;
@jc1518
jc1518 / nginx.conf
Created Jan 23, 2019
Nginx config example of reverse proxy for LDAP and HTTP
View nginx.conf
# 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 Dec 13, 2018
Check if the Confluence key has been used.
View confluence_key_query.js
<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 Dec 6, 2018
Comala Workflow for Confluence Page Data Classification
View data_classification_workflow
{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 Dec 6, 2018
Nodejs splunk query sample
View splunk_query.js
'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 Dec 6, 2018
Nodejs JMX query sample
View check_confluence_jmx.js
/**
* Check confluence jmx status
*/
'use strict';
const exec = require('child_process').exec;
module.exports = function (robot) {
You can’t perform that action at this time.