Skip to content

Instantly share code, notes, and snippets.

View gsherman's full-sized avatar

Gary Sherman gsherman

View GitHub Profile
@gsherman
gsherman / inventory.filter.config
Created November 9, 2016 18:44
Example config file for querying on part inventory within Dovetail Agent
<filter name="Inventory" entity="Inventory" allowAdhocQueries="true">
<query from="parts_view">
<addFacet key="partNumber" field="part_number" dataType="string" >
<addSort ascending="true" index="0" />
</addFacet>
<addFacet key="revision" field="mod_level" dataType="string" />
<addFacet key="description" field="part_descr" dataType="string" />
<addFacet key="serialNumber" field="part_serial_no" dataType="string" />
<addFacet key="location" field="location_name" dataType="string" />
@gsherman
gsherman / employees.filter.config.xml
Last active November 7, 2016 18:22
Example Filter Config File
<filter name="Employees" entity="Employee" allowAdhocQueries="true">
<privileges>
<addPrivilege value="Query Employee"/>
</privileges>
<query from="employee">
<addFacet key="firstName" field="first_name" dataType="string" />
<addFacet key="lastName" field="last_name" dataType="string" >
<addSort isAscending="true" index="0" />
</addFacet>
@gsherman
gsherman / 392.cbs
Last active August 16, 2016 22:38
Log Notes Form 392 - example of using solutions as canned responses
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Log Notes Form
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
Declare Function Utils3_ReplaceString ( OldStr As String, ReplacedStr As String, NewStr As String ) As String
'Hold onto our list of responses
Dim CannedResponsesTextList As List
@gsherman
gsherman / log-note.bat
Created July 28, 2016 17:48
Send a message into carrier which logs a note
@echo off
set NEWLINE=\r\n
set msg=
set "x=0"
:SymLoop1
if defined msg[%x%] (
set msg[%x%]=
set /a "x+=1"
@gsherman
gsherman / 0_reuse_code.js
Created March 28, 2016 14:54
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@gsherman
gsherman / annie.ics
Created December 16, 2015 20:08
my test ics file
BEGIN:VCALENDAR
PRODID:Dovetail Agent
X-WR-CALNAME:Annie Agent
VERSION:2.0
BEGIN:VEVENT
DTSTART;VALUE=DATE-TIME:20151217T193600
DTEND;VALUE=DATE-TIME:20151217T203600
DTSTAMP;VALUE=DATE-TIME:20151216T193600
LAST-MODIFIED;VALUE=DATE-TIME:20151216T193600
CREATED;VALUE=DATE-TIME:20151216T193600
@gsherman
gsherman / partial.log4net.config
Created December 16, 2015 16:52
partial log4net config showing a UDP appender
<appender name="LogStashAppender" type="log4net.Appender.UdpAppender">
<remoteAddress value="logserver.mycompany.com" />
<remotePort value="9410" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%utcdate{ISO8601} || %level || %P{log4net:HostName} || prod || AppNameGoesHere|| %identity || %aspnet-request{PATH_INFO} || %logger || %message"/>
</layout>
</appender>
<root>
<level value="DEBUG" />
@gsherman
gsherman / json.example.cbs
Created June 5, 2015 16:52
Consuming JSON in ClearBasic
Option Explicit
Type SearchResult
Url as String
Id as String
Title as String
Content as String
End Type
Dim oneResult as SearchResult
@gsherman
gsherman / commitment.dat
Created January 26, 2015 21:27
commitment template
OBJECT TYPE="com_tmplte", NAME="com_tmplte_commitment"
UNIQUE_FIELD=title
FIELDS
title = "Commitment";
time_til_esc = 7200;
flags = 144;
action = "TO: <OWNER.e_mail>
FR: <OWNER.login_name>
/*
///////////////////////////////////////////////////////////////////////////////
// Product : Dovetail Mobile Agent
//
// Series : Dovetail Software Web Series(tm)
//
// Name : privclass_import.dat
//
// Description : Dovetail Mobile Agent Priv Class Detail
//