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
get_last_update_date() { | |
days_since=$(gh repo view $1 --json pushedAt -q ".pushedAt" | ./diff_date.sh) | |
echo "$1 $days_since" | |
} |
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
#!/bin/bash | |
# Bash function to read a date from stdin | |
# and then calculate the number of days from that date | |
# to today. | |
# Date to compare | |
read -r target_date | |
# Get the current date in UTC | |
current_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") |
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
{ | |
"name": "Unreviewed Changes To AWS Managed Policies", | |
"description": "AWS Managed Policies that have been unreviewed by the Security team.", | |
"version": 1, | |
"specVersion": 1, | |
"pollingInterval": "ONE_DAY", | |
"templates": {}, | |
"outputs": [ | |
"alertLevel" | |
], |
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
version: '3' | |
services: | |
db: | |
image: mysql:5.7 | |
ports: | |
- "8081:3306" | |
volumes: | |
- ./sql:/docker-entrypoint-initdb.d | |
restart: always | |
environment: |
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
Verifying my Blockstack ID is secured with the address 1Ak8np9dvD8ytQ7zL2E77kSecbUCCQbfea https://explorer.blockstack.org/address/1Ak8np9dvD8ytQ7zL2E77kSecbUCCQbfea |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
// check to see if a variable is an array | |
// from [Douglas_Crockford]_JavaScript_The_Good_Parts | |
var is_array = function (value) { | |
return value && | |
typeof value === 'object' && | |
typeof value.length === 'number' && | |
typeof value.splice === 'function' && | |
!(value.propertyIsEnumerable('length')); | |
}; |
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 moonWalkers = [ | |
"Neil Armstrong", | |
"Buzz Aldrin", | |
"Pete Conrad", | |
"Alan Bean", | |
"Alan Shepard", | |
"Edgar Mitchell", | |
"David Scott", | |
"James Irwin", | |
"John Young", |
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
// Iterate through the localizedRuleNames in ruleResults and | |
// return an array of their strings. | |
function ruleList(results) { | |
var localizedRuleNamesArr = []; | |
var locationToIterate = results.formattedResults.ruleResults | |
for(var rule in locationToIterate) { | |
if(locationToIterate.hasOwnProperty(rule)) { | |
localizedRuleNamesArr.push(locationToIterate[rule].localizedRuleName); | |
} | |
} |
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 getRelationship(x, y) { | |
if(x !== x) { | |
return "Can't compare relationships because " + x + " and undefined are not numbers"; | |
} | |
if (typeof x != 'number' || typeof y != 'number') { | |
if(arguments.length === 2) { | |
if(typeof x != 'number' && typeof y != 'number') { | |
return "Can't compare relationships because " + x + " and " + y + " are not numbers"; |