Skip to content

Instantly share code, notes, and snippets.

View meandavejustice's full-sized avatar

Dave Justice meandavejustice

View GitHub Profile
import { create } from '@web3-storage/w3up-client'
import { filesFromPaths } from 'files-from-path'
import path from "path";
const client = await create()
const userId = 'myuserId'
async function createAndProvisionSpace(userId) {
const space = await client.createSpace(`durin-${userId}`)
@meandavejustice
meandavejustice / regexp-parse-cid.js
Created January 20, 2023 01:59
Regular expression for parsing CIDs from IPFS
const CID_REGEXP = /(Qm[1-9A-HJ-NP-Za-km-z]{44,}?|b[A-Za-z2-7]{58,}?|B[A-Z2-7]{58,}?|z[1-9A-HJ-NP-Za-km-z]{48,}?|F[0-9A-F]{50,}?)/

Keybase proof

I hereby claim:

  • I am meandavejustice on github.
  • I am davejustice (https://keybase.io/davejustice) on keybase.
  • I have a public key ASCVnFgMEb2IN-0IJ51sBTDv8fQbFC1kdhMuLMQ4DtLlsQo

To claim this, I am signing this object:

@meandavejustice
meandavejustice / windows10sanitysetup.md
Last active August 28, 2020 06:51
Windows 10 Sanity Setup

windows 10 sanity setup

Basic preferences

Disable all telemetry and privacy breaching settings on initial setup. (voice search, location services, etc...)

remap capslock
$hexified = "00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00".Split(',') | % { "0x$_"};
$kbLayout = 'HKLM:\System\CurrentControlSet\Control\Keyboard Layout';
62c62
< \ressubheading{Mozilla}{Remote}{Staff Engineer}{August 2015 - Present}
---
> \ressubheading{Mozilla}{Remote}{Senior Engineer}{August 2015 - Present}
65,66c65,68
< \resitem{Min Vid}
< \resitem{Test Pilot}
---
> \resitem{Picture In Picture}
> \resitem{Test Pilot}

exp_month and exp_year have a type of number

Argument of type 'string' is not assignable to parameter of type 'number'.  TS2345

  > 80 |   const expirationDate = dayjs().set("month", exp_month)
       |                                               ^
    81 |         .set("year", exp_year)
 82 | .format("MMMM, YYYY");
@meandavejustice
meandavejustice / gist:03d349e0447fd887595d1bc78b516f64
Created June 21, 2019 21:09
`TypeError: a float is required` with moz-phab patch
$ moz-phab patch D35379 --apply-to here
Upgrading libphutil...
You have uncommitted changes in the working copy for this library:
- bin/aws-s3
Usage Exception: `arc upgrade` can only upgrade clean working copies.
arc failed to upgrade, which may be caused by using an arcanist package from
your system package manager.
Would you like to skip arc upgrades in the future? (YES/No)? no

Keybase proof

I hereby claim:

  • I am meandavejustice on github.
  • I am meandave (https://keybase.io/meandave) on keybase.
  • I have a public key ASBMwrLM6l3EdHt-mh-UN4d86vVpqsZ-NMO39ppsAlVrcAo

To claim this, I am signing this object:

export default class NewsletterForm extends React.Component {
constructor(props: NewsletterFormProps) {
super(props);
this.handleEmailChange = this.handleEmailChange.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
}
componentDidMount () {
if (this.form) {
> eslint addon --ext=js,jsx
/mnt/c/Users/Dave Justice/Code/email-tabs/addon/background.js
142:3 error Function 'loginInterrupt' expected no return value consistent-return
/mnt/c/Users/Dave Justice/Code/email-tabs/addon/emailTemplates.jsx
13:15 error 'React' is not defined react/jsx-no-undef
30:22 error 'React' is not defined react/jsx-no-undef
42:16 error 'React' is not defined react/jsx-no-undef