Skip to content

Instantly share code, notes, and snippets.

View ccondry's full-sized avatar

Coty Condry ccondry

  • Cisco Systems
  • Ireland
  • 08:27 (UTC +01:00)
View GitHub Profile
@ccondry
ccondry / makeFormData.js
Created May 19, 2020 16:55
make form data body for fetch / node-fetch
function makeFormData (params) {
return Object.keys(params).map((key) => {
return encodeURIComponent(key) + '=' + encodeURIComponent(params[key])
}).join('&')
}
@ccondry
ccondry / addUrlQueryParams.js
Created May 19, 2020 16:54
add URL query parameters for fetch / node-fetch
function addUrlQueryParams (endpoint, params) {
let url = new URL(endpoint)
if (params) {
// append URL query paramenters
Object.keys(params).forEach(key => {
url.searchParams.append(key, params[key])
})
}
return url
}
@ccondry
ccondry / amiibos.txt
Created April 15, 2020 21:42
amiibo NFC list
001 - Isabelle
002 - Tom Nook
003 - DJ KK
004 - Sable
005 - Kappn
006 - Resetti
007 - Joan
008 - Timmy
009 - Digby
010 - Pascal
@ccondry
ccondry / open-campaign-logs.bat
Created March 16, 2020 16:06
dump CCE process log to text file and open text file
cdlog pcce la
dumplog /o /hr 1 CampaignManager
CampaignManager.txt
@ccondry
ccondry / get-public-ip.sh
Created January 23, 2020 19:08
get public IP
#!/bin/sh
dig +short myip.opendns.com @resolver1.opendns.com
# or use the following:
# dig TXT +short o-o.myaddr.l.google.com @ns1.google.com
@ccondry
ccondry / update-adfs-trust.ps1
Created January 14, 2020 16:32
update AD FS relying party trust certificate
Update-AdfsRelyingPartyTrust -MetadataFile C:\Temp\sp.xml -TargetName cuic1.dcloud.cisco.com
@ccondry
ccondry / ldaps-log.sh
Created January 8, 2020 16:50
reveal ldaps certificate information
#!/bin/sh
openssl s_client -connect servername:636
@ccondry
ccondry / sleep.js
Created December 6, 2019 17:45
async sleep for JavaScript
function sleep (ms) {
return new Promise(resolve => setTimeout(resolve, ms))
}
@ccondry
ccondry / close-ece-activities.md
Created December 4, 2019 20:26
Close open or stuck ECE activities

Close open or stuck ECE activities

  1. Find the open activity IDs by running this SQL query against the ECE eGActiveDb database in MSSQL Management Studio:
SELECT * FROM egpl_casemgmt_activity 
WHERE activity_status !=9000 
AND assigned_to= (SELECT user_id FROM egpl_user WHERE user_name LIKE 'georgmcc')
@ccondry
ccondry / nginx-load-balance.conf
Created May 9, 2019 16:04
nginx proxy load balance config
/etc/nginx/nginx.conf, inside http section:
# load balance web requests to cs-manager and cs-manager-2
upstream csmanager {
ip_hash;
server 198.19.253.32;
server 198.19.253.49;
}