Skip to content

Instantly share code, notes, and snippets.

View jodyheavener's full-sized avatar
🥰

Jody Heavener jodyheavener

🥰
View GitHub Profile
diff --git a/app/experimenter/nimbus-ui/src/gql/experiments.ts b/app/experimenter/nimbus-ui/src/gql/experiments.ts
index 384c3c7c..2c2c6de1 100644
--- a/app/experimenter/nimbus-ui/src/gql/experiments.ts
+++ b/app/experimenter/nimbus-ui/src/gql/experiments.ts
@@ -60,6 +60,15 @@ export const GET_EXPERIMENT_QUERY = gql`
populationPercent
totalEnrolledClients
proposedEnrollment
+
+ featureConfig {
@jodyheavener
jodyheavener / pm2-devtools-recipe.js
Created August 2, 2020 21:53
PM2 DevTools - FxA Signin Code recipe
window.addEventListener('pm2:log:inbox', (event) => {
const otpForm = document.querySelector('.confirm-signup form')
const otpField = otpForm.querySelector('.otp-code')
const submitBtn = otpForm.querySelector('#submit-btn')
const signInRegex = /Signin code (\d{6})/gm
const signInCode = signInRegex.exec(event.detail)
if (signInCode[1]) {
console.log('Filling in signin code')
otpField.value = signInCode[1]
@jodyheavener
jodyheavener / .git_commit_template
Created July 16, 2020 15:18
Git Commit Template
type(scope): subject
# Why is this change happening?
Because:
- ...
# What does this commit change?
This commit:
@jodyheavener
jodyheavener / file.js
Created July 3, 2020 03:23
short-circuit attempts thwarted by async
// version 1 - every
if (!await conditionChecks.every(async (check) => {
const result = await check();
if (!result.passing) {
return false;
}
if (result.key && result.value !== undefined) {
satisfiedConditions[result.key] = surveyGizmoSafe(result.value);
}
return true;
function setFavicon(scheme) {
const svgFavicon = document.querySelector('.js-site-favicon[type="image/svg+xml"]'),
pngFavicon = document.querySelector('.js-site-favicon[type="image/png"]');
scheme || (scheme = "light");
if (svgFavicon && pngFavicon) {
svgFavicon.href = `favicon-${scheme}.svg`;
pngFavicon.href = `favicon-${scheme}.png`;
}

Keybase proof

I hereby claim:

  • I am jodyheavener on github.
  • I am jodyheavener (https://keybase.io/jodyheavener) on keybase.
  • I have a public key ASCXQnZgDrW6_zP8n24aGypguKG1WYfFQsOOmTFvPbuXJgo

To claim this, I am signing this object:

@jodyheavener
jodyheavener / git-push.bash
Created February 27, 2020 04:50
Override git-push builtin to always use --force-with-lease any time --force is used, unless you also specify --seriously
function git {
# Only touch git if it's the push subcommand
if [[ "$1" == "push" ]]; then
force=false
override=false
for param in "$@"; do
if [[ $param == "--force" ]]; then force=true; fi
if [[ $param == "--seriously" ]]; then override=true; fi
done
@jodyheavener
jodyheavener / manifest-dtpm.json
Created February 22, 2020 21:51
An example DTPM manifest
{
"id": "dtpm-example",
"name": "dtpm-example",
"description": "This is an example plugin generated by the Design Tool Plugin Manager",
"homepage": "https://www.example.com/",
"version": "0.1.0",
"icon": "assets/icon.png",
"author": {
"name": "John Doe",
"email": "john@example.com"
@jodyheavener
jodyheavener / rectangle-dtpm.js
Created February 22, 2020 21:49
Creating a simple Rectangle with DTPM
import { insert, Rectangle } from 'dtpm/document';
const rectangle = new Rectangle({
name: 'Example',
width: 100,
height: 200,
fill: '#2345ac'
});
// insert it in the page afterward
@jodyheavener
jodyheavener / adobexd-rectangle.js
Created February 22, 2020 21:29
Creating simple Rectangles in Adobe XD, Figma, and Sketch
import { Rectangle, Color } from 'scenegraph';
let rectangle = new Rectangle();
rectangle.name = 'Example';
rectangle.width = 100;
rectangle.height = 200;
rectangle.fill = new Color('#2345ac');
rectangle.fillEnabled = true;