This file contains 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
<script type="text/javascript"> | |
;window.NREUM||(NREUM={});NREUM.init={distributed_tracing:{enabled:true},privacy:{cookies_enabled:true},ajax:{deny_list:["bam.nr-data.net"]}}; | |
window.NREUM||(NREUM={}),__nr_require=function(t,e,n){function r(n){if(!e[n]){var o=e[n]={exports:{}};t[n][0].call(o.exports,function(e){var o=t[n][1][e];return r(o||e)},o,o.exports)}return e[n].exports}if("function"==typeof __nr_require)return __nr_require;for(var o=0;o<n.length;o++)r(n[o]);return r}({1:[function(t,e,n){function r(t){try{s.console&&console.log(t)}catch(e){}}var o,i=t("ee"),a=t(32),s={};try{o=localStorage.getItem("__nr_flags").split(","),console&&"function"==typeof console.log&&(s.console=!0,o.indexOf("dev")!==-1&&(s.dev=!0),o.indexOf("nr_dev")!==-1&&(s.nrDev=!0))}catch(c){}s.nrDev&&i.on("internal-error",function(t){r(t.stack)}),s.dev&&i.on("fn-err",function(t,e,n){r(n.stack)}),s.dev&&(r("NR AGENT IN DEVELOPMENT MODE"),r("flags: "+a(s,function(t,e){return t}).join(", ")))},{}],2:[function(t,e,n){function r(t,e,n,r,s){try |
This file contains 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
var dbs = db.runCommand('listDatabases').databases.filter(({ name }) => name.contains('_website')).map(({ name }) => name) | |
dbs.forEach((name) => { | |
var siteSettings = db.getSiblingDB(name).getCollection('SiteSettings').find({"modules.blueconic":true}) | |
siteSettings.forEach((doc) => { | |
print(name); | |
}) | |
}) |
This file contains 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
const redirects = | |
{ | |
'/advanced-engine/ase-l3-study-guide-hybrid-electric-vehicle-specialist-test-prep': 'https://passthease.motoragetraining.com/Content/ASE-Test-Prep-L3-Light-Duty-Hybrid-Electric-Vehicle-Specialist-Certification-Preparation-by-Motor-Age-Training.aspx', | |
'/advanced-engine/l1-advanced-engine-performance-specialist': 'ttps://passthease.motoragetraining.com/Content/ASE-Test-Prep-L1-Advanced-Engine-Performance-Certification-Preparation-by-Motor-Age-Training.aspx', | |
'/advanced-engine/l2-electronic-diesel-engine-diagnostic-specialist': 'https://passthease.motoragetraining.com/Content/ASE-Test-Prep-L2-Medium-Heavy-Vehicle-Electronic-Diesel-Engine-Certification-Study-Guide-by-Motor-Age-Training.aspx', | |
'/ase-advanced-engine-l-series': 'https://passthease.motoragetraining.com/ProductSubCats.aspx?SubCatID=45', | |
'/ase-advanced-engine-series': 'https://passthease.motoragetraining.com/ProductSubCats.aspx?SubCatID=45', | |
'/ase-c1-practice-test-service-consultant-training': 'https://passthease.motorag |
This file contains 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
#include <SoftwareSerial.h> | |
SoftwareSerial HC12(10, 11); | |
void setup() { | |
Serial.begin(9600); | |
HC12.begin(9600); | |
pinMode(LED_BUILTIN, OUTPUT); | |
} | |
void loop() { |
This file contains 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
Copy collection to another DB | |
db.getCollection('AdUnitPattern').find().forEach(function(d){ db.getSiblingDB('ebm_smartbuildingstech_website')['AdUnitPattern'].insert(d); }); | |
# Clone celltion from dev to prod | |
db.cloneCollection("10.0.0.100", "SiteSettings") | |
db.cloneCollection("10.0.0.100", "AdUnitPattern") | |
db.cloneCollection("10.0.0.100", "Layout") | |
# Move collection from dev to prod | |
mongoexport -h 10.0.0.100 -d ebm_electronicdesign_website -c AdUnitPattern --out file |
This file contains 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
/* 1 */ | |
{ | |
"_id" : NumberLong(21163538), | |
"body" : "<p>The <b>Smart Blend Synthetics SAE 75W-140 LS Gear Oil </b>is specially formulated to meet the \nrequirements of performance cars, passenger cars, vans, sport utility vehicles, and light trucks. Smart Blend 75W-140 Synthetic LS is a thermally stable extreme pressure lubricant designed to perform at both extreme high and low temperatures. Smart Blend 75W-140 Synthetic LS Gear Oil is recommended for use in all standard and limited-slip hypoid differentials (conventional and high\n performance). The product meets the performance requirements of API Service GL-5 and provides lubrication and protection against wear and corrosion. The synthetic gear oil is compatible with conventional gear lubricants, says the company.</p>", | |
"status" : NumberLong(1), | |
"created" : ISODate("2020-11-19T21:53:18.000Z"), | |
"createdBy" : ObjectId("5ca3b07276490330008b4577"), | |
"fullName" : "Product: SAE 75W-140 LS Gear Oil (21163538)", | |
"hash" : "e7cd7e86eabffcaddc |
This file contains 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
const AWS = require('aws-sdk'); | |
const minimist = require('minimist'); | |
const args = minimist(process.argv.slice(2)); | |
require('dotenv').config(); | |
const route53domains = new AWS.Route53Domains({ | |
accessKeyId: process.env.AWS_ACCESS_KEY_ID, | |
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, | |
region: 'us-east-1', |
This file contains 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
const cols = { | |
id: "test", | |
data: | |
{ | |
columns: | |
[ | |
{ name: "Date of Birth", dataValue: "response[*].dob"}, | |
{ name: "Name", dataValue: "response[*].name"}, | |
{ name: "hair", dataValue: "response[*].hair"} | |
] |
This file contains 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
k --namespace gemenon get deployments |grep website | |
// Set ENV | |
kubectl --namespace gemenon set env deployment/website-americanmachinist NEW_RELIC_ENABLED=true | |
export K8_NAMESPACE=other | |
kubectl --namespace $K8_NAMESPACE get deployments --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}' |xargs kubectl -n $K8_NAMESPACE patch deployment $1 -p '{"spec":{"revisionHistoryLimit":0}}' | |
// change requested memory |
This file contains 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
var dbs = db.runCommand('listDatabases').databases.filter(({ name }) => name.contains('_platform')).map(({ name }) => name) | |
dbs.forEach((name) => { | |
var content = db.getSiblingDB(name).getCollection('Product').find({"type":"Site"}) | |
content.forEach((doc) => { | |
print(`${doc.url}: ${doc._id}`); | |
}) | |
}) |
NewerOlder