Skip to content

Instantly share code, notes, and snippets.

@treydock
treydock / papply
Created October 16, 2014 04:35
Puppet masterless script
#!/bin/bash
readonly ENVIRONMENTPATH="/apps/puppet/environments"
readonly DEF_ENV="production"
readonly PROGNAME=$(basename $0)
usage () {
cat << EOF
usage: ${PROGNAME} [OPTIONS]
@treydock
treydock / job_submit.lua
Created February 1, 2016 17:13
SLURM Lua job submit plugin - 15.08
--[[
SLURM job submit filter for QOS
Some code and ideas pulled from https://github.com/edf-hpc/slurm-llnl-misc-plugins/blob/master/job_submit/job_submit.lua
--]]
--########################################################################--
--
#!/usr/bin/env python
import os
import sys
import argparse
import subprocess
import time
import datetime
import pytz
import filelock
import logging
import os
from osc.stdlib import exec_cmd
log = logging.getLogger(__name__)
# Needed to support Python 2.6
from osc.logs import logging_null_handler
log.addHandler(logging_null_handler)
class GPFS(object):
@treydock
treydock / main.go
Last active November 11, 2020 15:40
tsm_exporter google/goexpect
package main
import (
"flag"
"fmt"
"log"
"os"
"regexp"
"time"
@treydock
treydock / main.go
Created November 11, 2020 16:08
Test SSH expect
package main
import (
"log"
"os"
"regexp"
"time"
expect "github.com/google/goexpect"
)
{
// Configuration settings for job data input
// The database configuration below assumes everything on the same host and
// XDMoD is installed on the host too.
//
// It is not necessary for all databases to run locally. A more complex
// configuration could have multiple hosts and different credentials for
// each DB.
"xdmodroot": "/etc/xdmod",
"datawarehouse": {
{
"resources": [
{
"resource": "owens",
"resource_id": 1,
"enabled": true,
"datasetmap": "prometheus-osc",
"hardware": {
"gpfs": "scratch",
"network": "eth0"
var app_ident = require('../app_ident.js');
var map_helpers = require('../map_helpers.js');
module.exports = function(config) {
var appident = app_ident(config.applicationDefn);
var getHardwareConfig = function (setting, default_val) {
var val = config.hardware;
var props = setting.split('.');
for (let i = 0; i < props.length; i++) {
<VirtualHost *:443>
ServerName prometheus.DOMAIN
<Location "/">
<RequireAny>
Require claim groups:oscall
</RequireAny>
AuthType openid-connect
</Location>