Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View araphiel's full-sized avatar
🌟

Armon Raphiel araphiel

🌟
View GitHub Profile
@araphiel
araphiel / README.md
Last active April 12, 2024 15:02
Typechecking fix for react-native-gifted-charts

Typechecking fix for react-native-gifted-charts

Note: Includes the subdependency gifted-charts-core+0.0.21.patch

Fixes an issue where these packages prevent strict typechecking for any codebases using this package.

Instructions

  1. Setup patch-package - https://www.npmjs.com/package/patch-package
  2. Add the following files to your patches folder in your project's root directory
@araphiel
araphiel / pull_request_template.md
Created June 7, 2023 16:12
Pull Requests Template

Links

  • Jira ticket(s):
  • Storybook:

Testing

@araphiel
araphiel / .gitconfig
Last active July 24, 2023 17:06
.gitconfig for multiple clients / organizations
# .gitconfig
[user]
name = Name
email = name@gmail.com
username = primary-github-username
signingKey = ~/.ssh/id_rsa.pub
[pull]
ff = only
[commit]
@araphiel
araphiel / jest-resizer.ts
Last active July 14, 2023 16:33
simple jest viewport resizer
/** note: jest global.innerWidth defaults to 1024px */
const resizeJestViewport = (breakpoint: Breakpoints) => {
act(() => {
let width;
switch (breakpoint) {
case "desktop":
width = 1200;
break;
case "tablet":
width = 768;
@araphiel
araphiel / marketo-forms.md
Created July 22, 2021 20:01
Marketo Form Tips

On submission, my Marketo Form gives me a "Please Wait" & does not work!

Possible reasons:

  • Ensure you're using SSL/HTTPS (even your local dev environment) - the forms will not work properly without this.
  • Ensure the forms is uses your personal marketo domain MktoForms2.loadForm("//go.yourdomain.com", accountId, formId)
  • Check your callback functions! Pay close attention to form.onSuccess behavior.
@araphiel
araphiel / jrawls.md
Last active May 21, 2021 19:15
Jonathan Rawls - King of Wrike

He was a champion of efficiency

@araphiel
araphiel / body-to-rawbody.js
Created March 15, 2021 04:10
Convert parsed body to rawbody
const webhookPayloadParser = (req) =>
new Promise((resolve) => {
let data = ""
req.on("data", (chunk) => {
data += chunk
})
req.on("end", () => {
resolve(Buffer.from(data).toString())
})
})
@araphiel
araphiel / contentful-mjml.js
Last active March 15, 2021 04:12
Basic Contentful + MJML email example
require('dotenv').config()
const { resolve } = require('path')
const { outputFile, pathExists, removeSync } = require('fs-extra')
const contentful = require('contentful')
const { CONTENTFUL_SPACE, CONTENTFUL_ACCESS_TOKEN } = process.env
const { documentToHtmlString } = require('@contentful/rich-text-html-renderer')
const { BLOCKS, INLINES } = require('@contentful/rich-text-types')
@araphiel
araphiel / custom_brandbot_form.html
Last active March 15, 2021 04:13
Example Brand Bot Setup
<!-- Begin BrandBot Signup Form -->
<!-- <link href="https://assets.brandbot.com/forms/embed/embed.css" rel="stylesheet" type="text/css" /> -->
<div id="bb_form">
<form
method="post"
action="https://microservices.brndbot.net/forms/answers"
name="{formId}"
id="bb_form_inner"
>
<div id="alert"></div>
@araphiel
araphiel / getFormFields.js
Last active October 30, 2020 14:40
Grab fields from a form
Object.values(document.forms[0]).reduce((obj,field) => { obj[field.name] = field.value; return obj }, {})