Skip to content

Instantly share code, notes, and snippets.

@erin-at-work
erin-at-work / deploy-to-prod
Last active July 30, 2019 14:23
deploy-master-template
🚨*PRODUCTION* 🚨
<LINK_TO_RELEASE_COMMENT_HERE>
@erin-at-work
erin-at-work / js.js
Last active July 25, 2019 14:21
Optimizely Rollout example
// optimizely.js
import optimizelySDK from '@optimizely/optimizely-sdk'
const optimizelyClientInstance = optimizelySDK.createInstance({
datafile: window.optimizelyDatafile,
})
export default optimizelyClientInstance
/* -- */
@erin-at-work
erin-at-work / product_constants.md
Last active July 26, 2019 15:31
Product Constants

Product Constants

Constants

lib/constants.js

Individual Product Constants

Constants are prefixed with the product category + name + field in all caps snakecase format. ie: WHITENING + _PEN + _NAME

@erin-at-work
erin-at-work / Errors.md
Created September 16, 2019 14:15
Nextjs-9-funky-town

containers/checkout-success/index.js:

    <Button arrow fullWidth onClick={() => Router.push(setupLink)} primary>
      Continue
    </Button>
@erin-at-work
erin-at-work / Errors.md
Last active September 16, 2019 14:54
Nextjs-9-funky-town

containers/checkout-success/index.js:

    <Button arrow fullWidth onClick={() => Router.push(setupLink)} primary>
      Continue
    </Button>

containers/booking/reschedule.js:

@erin-at-work
erin-at-work / erin-cypress-talk.md
Last active November 21, 2019 01:00
cypress-share

Cypress in WWW


  • Time Travel
  • Debugging in familiar tools (Chrome dev tools)
  • Real time reloads
  • Automatic awaiting
  • Screenshots & videos of failing tests
  • Consistent results (flake-free)
{
"typeScriptReactFunctionalComponent": {
"prefix": "newComponent",
"body": [
"import React, { FC } from 'react'",
"",
"const ${1:${TM_FILENAME_BASE}}: FC = () => {",
"\treturn (",
"\t\t<div>",
"\t\t\t$0",
@erin-at-work
erin-at-work / contracts...AdvanceStorage.sol
Created March 2, 2022 17:44
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
contract AdvanceStorage {
mapping(address => uint8) public ages;
// register -> anybody can register by providing their address & age
function register(uint8 age) external returns(bool) {
// [address1 - 8]