This file contains hidden or 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 | |
curl -u USERNAME:PASSWORD -k 'https://[instance].service-now.com/change_request.do?JSONv2&sysparm_query=YOUR_QUERY' | |
# -u will perform basic auth anformat your USERNAME:PASSWORD to bas64. | |
# -k will not check SSL certificate if you don't have certficate setup |
This file contains hidden or 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
int button = D0; // the button to press to order the coffee.. | |
int led = D7; // The built in LED.. | |
int counter = 0; | |
void setup() { | |
// Setup the inputs and outputs | |
pinMode(button, INPUT_PULLDOWN); | |
pinMode(led, OUTPUT); |
This file contains hidden or 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
$COURI = 'https://central1dev.service-now.com/change_request.do?WSDL' | |
$ApprovalURI = 'https://central1dev.service-now.com/sysapproval_approver.do?WSDL' | |
$ECCURI = 'https://central1dev.service-now.com/ecc_queue.do?WSDL' | |
$username = "SERVCIEACCOUNTUSER" | |
$password = ConvertTo-SecureString "PASSWORD" -AsPlainText -Force | |
$mycreds = New-Object System.Management.Automation.PSCredential ($username, $password) | |
# Prep the mac file | |
$MacContent = Get-Content H:\Mac.csv -Raw | |
$MacBase64Content = [System.Text.Encoding]::UTF8.GetBytes($MacContent) |
This file contains hidden or 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
function GetCiForCMDB_CI() { | |
var a = ''; | |
if(current.u_root_cause=='3rd Party') { // restrict to 3rd party business services when root cuase is C1 Supplier | |
var gr = new GlideRecord('cmdb_ci'); | |
gr.addQuery('sys_class_name', 'u_cmdb_ci_service_3rdparty'); | |
gr.query(); | |
while (gr.next()) { | |
if (a !='') { | |
a = a + '^ORsys_id='+ gr.sys_id ; | |
} else { |
This file contains hidden or 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
////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
function Generate_Row_Count( TASK_TYPE, KPIPERIOD, QUERY, PORTFOLIO, SYS_ID ) { // GET CURRENT MONTH KPI VALUE | |
var QSTR = QUERY ; | |
if(PORTFOLIO) { | |
if(TASK_TYPE=='change_request') { var PP = 'cmdb_ci.u_ci_portfolio' } else { var PP = 'u_portfolio'; } | |
QSTR += '^'+ PP + '=' + PORTFOLIO ; | |
} | |
// gs.addInfoMessage( QSTR ); | |
var gr = new GlideRecord( TASK_TYPE ); |
This file contains hidden or 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
<?php | |
include("../common.inc.php"); // Contains definitions for INSTANCE, USER, PASS | |
$query=urlencode('active=true^stateNOT IN6,^priorityIN1,2'); // Active, NOT Resolved, Hi Priority INC | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, 'https://'.INSTANCE.'.service-now.com/incident_list.do?XML&useUnloadFormat=true&sysparm_query='.$query); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); |
This file contains hidden or 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
action.setRedirectURL(current); | |
var DIFF = gs.dateDiff(current.u_bcp_last_test.getDisplayValue(), gs.now(), true) | |
gs.addInfoMessage(DIFF); | |
gs.addInfoMessage(gs.yearsAgo(2)); | |
gs.addInfoMessage(gs.dateDiff(current.u_bcp_last_test.getDisplayValue(), gs.now(), true)); | |
gs.addInfoMessage(gs.dateDiff('2014-10-01 00:00:00', gs.now(), true)); | |
gs.addInfoMessage(gs.dateDiff('2013-10-07 22:50:17', gs.now(), true)); | |
gs.addInfoMessage(gs.dateDiff('2012-10-07 22:50:17', gs.now(), true)); |
This file contains hidden or 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
<?php | |
include("../common.inc.php"); | |
start_page("Linux Servers without Provides Production For :: Applications"); | |
// get stuff | |
$arr = getXML('cmdb_ci_linux_server','operational_status=1'); | |
// query for a production relationship where the parent is the application | |
foreach($arr as $k => $v) { |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8" ?> | |
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null"> | |
<g:evaluate> | |
var R = new GlideRecord('grc_risk'); | |
R.orderBy('likelihood.weighting'); | |
R.query(); | |
</g:evaluate> | |
<h1>Inherent Risk Summary</h1> |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8" ?> | |
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null"> | |
<script language="javascript" src="/scripts/prototype-adapter.jsx" /> | |
<script language="javascript" src="/scripts/GlideV2ChartingIncludes.jsx" /> | |
<script> | |
document.observe("dom:loaded", function() { | |
var chart1 = new Highcharts.Chart({ | |
chart: { | |
renderTo: 'newchart', | |
type: 'bubble', |