Skip to content

Instantly share code, notes, and snippets.

View jvanmetre's full-sized avatar

James Van Metre jvanmetre

  • New Relic
  • Portland OR
View GitHub Profile
"use strict";
var __getOwnPropNames = Object.getOwnPropertyNames;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
// node_modules/jose/dist/node/cjs/runtime/digest.js
var require_digest = __commonJS({
"node_modules/jose/dist/node/cjs/runtime/digest.js"(exports2) {
"use strict";
/**
* NRExampleBaseScript.js
* Copyright (c) 2019 New Relic Inc. All Rights Reserved.
*
* This script downloads the api tester script from github
* Loads a schema definition from a url (GitHub, or locally)
* And then accesses each of the items in the
* $paths variable to verify the following $schema with.
* It uses the TV4 validator - https://github.com/geraintluff/tv4 (Public Domain)
*
[
{
"$paths": [
"/v2/applications.json"
],
"$description": "Tests the public api applications endpoint",
"$schema": {
"type": "object",
"minProperties": 1,
"properties": {
/**
* NRAPITester.js
* Copyright (c) 2019 New Relic Inc. All Rights Reserved.
*
*/
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([], factory);
} else if (typeof module !== 'undefined' && module.exports) {
@jvanmetre
jvanmetre / GenGitVersion.sh
Created March 23, 2011 20:25
Script to generate the Variables needed for XCode Versioning with Git
git=/usr/local/git/bin/git
touch Info.plist
version=`$git describe --dirty`
version=`echo $version | sed 's/[a-zA-Z]*//'`
versionNum=`echo $version | sed 's/\-[0-9]*\-[a-zA-Z0-9]*//'`
echo "#define GIT_VERSION $version" > InfoPlist.h
echo "#define APP_VERSION $versionNum" >> InfoPlist.h