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
{ | |
// See https://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "Create Lambda", | |
"type": "shell", | |
"command": "target/manage.sh create", | |
"group": "none", |
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
mvn compile com.github.johnpoth:jshell-maven-plugin:1.3:run |
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
ansible-playbook -i hosts pacakges.yml -k -K |grep -A 1000 "PLAY RECAP"|tail -n +2|tr -d ':'|tr -s '[:space:]'|sed 's/[[:space:]]/,/g'> fixed_output.csv |
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
SELECT | |
th.name as metric, | |
long_lat.site AS name, | |
long_lat.Latitude AS latitude, | |
long_lat.Longitude AS longitude, | |
COUNT(th.type_id) AS value | |
FROM ticket_history th | |
LEFT JOIN | |
-- SUB QUERY FOR LOCATIONS | |
(SELECT |
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
import sys, os | |
# sys.path.append('./Common') # noqa | |
sys.path.append(os.path.abspath('./Common')) | |
import Common.common as common | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.patches as mpatches | |
import matplotlib | |
from collections import Counter, OrderedDict |
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
echo '"userName", "enabled", "firstName", "lastName", "jobtitle", "organization", "location", "telephone", "mobile", "email", "companyaddress1", "companyaddress2", "companyaddress3", "companypostcode", "companytelephone", "companyFax", "companyemail", "isDeleted"' > people.csv | |
curl -u user:"password" "https://domain.com/alfresco/s/api/people?maxResults=2000" | \ | |
jq -r '.people[] | [.userName, .enabled, .firstName, .lastName, .jobtitle, .organization, .location, .telephone, .mobile, .email, .companyaddress1, .companyaddress2, .companyaddress3, .companypostcode, .companytelephone, .companyFax, .companyemail, .isDeleted] | @csv' >> people.csv |
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 | |
export project=$1 | |
export pathOfProject=$2 | |
mkdir -p "./$project" | |
# find data/B8493 -type f -printf '%h\n' | sort -u | |
echo "Empty Dirs" |
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
import java.io.File | |
import org.apache.poi.ss.usermodel.WorkbookFactory | |
import org.apache.poi.ss.usermodel.{Row, Cell} | |
val baseUnitFile = new File("./BaseUnits_export_.xlsx") | |
var workbook = WorkbookFactory.create(baseUnitFile) | |
val sheet = workbook.getSheetAt(0) | |
val xmlTemplate = (DevName: Cell, IP: Cell) => <MirrorOp> | |
<Device> |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import argparse, sys, re, signal | |
from subprocess import call | |
parser = argparse.ArgumentParser() | |
parser.add_argument("--file", help="The log file to parse.") | |
parser.add_argument( | |
"--notest", help="Use --notest to finally rename the files.", action="store_true") | |
parser.add_argument("--printtest", help="Just print out line contents") |
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
/** | |
* Summary. Attempts to fix metadata that is in the Alfresco Repo. | |
* @param {object} args | |
*/ | |
const invalidArg = function (message) { | |
status.code = 400 | |
status.message = message | |
status.redirect = true | |
} |