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
# Try to get the profile path | |
PROFILE_PATH='' | |
getProfilePath(){ | |
if [[ "$SHELL" == *"zsh"* ]]; then | |
PROFILE_PATH=$HOME/'.zshrc' | |
elif [[ "$SHELL" == *"bash"* ]]; then | |
if [ -f $HOME/.bashrc ]; then | |
PROFILE_PATH=$HOME/'.bashrc' | |
elif [ -f $HOME/.profile ]; then | |
PROFILE_PATH=$HOME/'.profile' |
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 possibleDateFormats = [ | |
'Updated on 3/25, 9:35PM', | |
'Updated on 03/25, 9:35PM', | |
'Updated 3/25/2020, 9:35PM', | |
'Updated 3/25/2020 at 9:35PM', | |
'Updated 3/25/2020 at 9:35 p.m.', | |
'Updated 3/25 21:35', | |
'updated on 03/25/20 21:35 PM' | |
] |
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
/* Last Updated */ | |
{ | |
"version": "0.6", | |
"reqId": "0", | |
"status": "ok", | |
"sig": "2121529001", | |
"table": { | |
"cols": [ | |
{ | |
"id": "A", |
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
{ | |
"secondaryInfo": { | |
"presModelMap": { | |
"dataDictionary": { | |
"presModelHolder": { | |
"genDataDictionaryPresModel": { | |
"dataSegments": { | |
"0": { | |
"dataColumns": [ | |
{ |
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
{ | |
"secondaryInfo": { | |
"presModelMap": { | |
"dataDictionary": { | |
"presModelHolder": { | |
"genDataDictionaryPresModel": { | |
"dataSegments": { | |
"0": { | |
"dataColumns": [ | |
{ |
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 fetch = require('node-fetch'); | |
const hotShots = require('hot-shots'); | |
const ddAgentHost = process.env.DD_AGENT_HOST || 'localhost'; | |
async function checkAgentStatus() { | |
let metricsUp = 'OK (no error returned)'; | |
let apmUp = ''; | |
const datadog = new hotShots.StatsD({ |
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
function sortObject(object) { | |
//Thanks > http://whitfin.io/sorting-object-recursively-node-jsjavascript/ | |
if (!object) { | |
return object; | |
} | |
const isArray = object instanceof Array; | |
var sortedObj = {}; | |
if (isArray) { | |
sortedObj = object.map((item) => sortObject(item)); |
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
javascript: (async function() { | |
/* Bug template created by Anna Smith, Program Manager at NYTimes */ | |
const summaryTemplate = | |
"**Bug Ticket Template** EPIC | Bug : [High-level summary]"; | |
const descriptionTemplate = `*Howdy! This is the bug ticket template. Please copy and paste this when you create a new ticket.* To get started, go to the "Configure Fields" dropdown in the upper right of the Create Issue pop-up screen. Select only the following: Assignee, Attachment, Description, Epic Link, Priority, and Sprint. (You'll only need to do this once.)\n\n\n\n | |
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
javascript: (async function() { | |
var bookmarkletVersion = "1.0.0"; | |
var apiRoot = "https://parenting.nytimes.com/api/v1"; | |
var cmsRoot = "https://nyt-parentingcms-prd.appspot.com"; | |
console.log("Running Parenting Edit Bookmarlet v" + bookmarkletVersion); | |
/* | |
Generic function for requesting URLs | |
*/ |
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
import logging | |
from django.core.management.base import BaseCommand, CommandError | |
logger = logging.getLogger('django') | |
class Command(BaseCommand): | |
def handle(self, *args, **options): |
NewerOlder