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: 2 | |
registries: | |
git-all-orgs: | |
type: git | |
url: https://github.com | |
username: im-pipeline-bot | |
password: ${{secrets.READ_PKG_TOKEN}} | |
npm-github-packages-all-orgs: | |
type: npm-registry | |
url: https://npm.pkg.github.com |
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
// Title case the bounded context and event name | |
FS?.event('Bounded Context/Event Name', { data... }) | |
// 👎 Wrong way to name an event | |
FS?.event('Click page button to add household member', { data... }) | |
// 👍 Right way to name an event | |
FS?.event('Shopping/Cart/Button/Add Household Member', { data... }) | |
FS?.event('IFP/Assessment/Selected Silver Plan', { data... }) |
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
export function getEnumValueLookup<T extends Record<keyof T, string>>(object: T) { | |
return Object.fromEntries( | |
Object.entries(object).map(([key, value]) => [value as string, key as keyof T]) | |
); | |
} |
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
// https://css-tricks.com/quick-whats-the-difference-between-flexbox-and-grid/ | |
const Tile = styled.aside` | |
padding: 25px; | |
border: 2px solid #e4e4e4; | |
border-radius: 5px; | |
`; | |
// Flex | |
// https://css-tricks.com/snippets/css/a-guide-to-flexbox/#aa-background | |
const TileContainer = styled.section` |
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
// Only capture requests for a specific path based-route | |
excludeRequestFromAutoTrackingPatterns: [ | |
new RegExp( | |
`^https?:\\/\\/([^\\/\\s]+\\/)(?!${escapeRegExp(removeSlashes(pathBase))}).+$`, | |
'i' | |
) | |
] |
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/sh | |
JSON=$(<test.json) | |
for encodedPair in $(echo "${JSON}" | jq -r 'to_entries[] | @base64'); do | |
__jq() { | |
echo "${encodedPair}" | base64 --decode | jq -r ${1} | |
} | |
key=$(__jq '.key') | |
value=$(__jq '.value') | |
echo "::set-output name=${key}::${value}" |
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 runs on an interval as the user is using the 3rd party site | |
function() { | |
return function() { | |
var xhr = new XMLHttpRequest(); | |
xhr.onreadystatechange = function() { | |
console.debug('Refresh token response', xhr); | |
if (xhr.status >= 200 && xhr.status < 300) return; |
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
// Run using node | |
// Output first before running this command terraform show -json > file.json | |
const tfShowOutput = require(process.argv.slice(2)[0]); | |
function parseChildModules(modules) { | |
for (const {address: parentAddress, child_modules : childModules, resources} of modules) { | |
if (childModules) parseChildModules(childModules); |
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
<% if (htmlWebpackPlugin.options.applicationInsightsInstrumentationKey) { %> | |
<!-- AppInsights --> | |
<!-- Intended to be blocking, don't defer or load async --> | |
<script type="text/javascript"> | |
<% | |
// https://docs.microsoft.com/en-us/azure/azure-monitor/app/javascript | |
const {applicationInsightsInstrumentationKey: instrumentationKey, appInsights: props = {}} = htmlWebpackPlugin.options; | |
const { role, roleInstance, version, onInit, onAfterInit, cfg, ...rest} = props; |
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 getDomainWithoutSubdomain = hostname => { | |
const parts = hostname.split('.') | |
return parts | |
.slice(0) | |
.slice(-(parts.length === 4 ? 3 : 2)) | |
.join('.') | |
} |
NewerOlder