Skip to content

Instantly share code, notes, and snippets.

Avatar
👋
Coding

Zander Martineau mrmartineau

👋
Coding
View GitHub Profile
View iOS-URL-schemes.txt
BIG iOS URL SCHEME LIST
HAD TO MAKE A DROPBOX FILE BECAUSE THIS LIST WAS TOO LONG TO POST IN THE COMMENTS OR NOT MAKE THE WORKFLOW APP TAKE FOREVER TO READ IT.
☠JAILBREAK/SYSTEM APPS
--------------------------
activator://
itms-apps://
itms-services://
@mrmartineau
mrmartineau / HowToTest.md
Created Mar 28, 2020 — forked from tkrotoff/HowToTest.md
How I structure my tests
View HowToTest.md

File structure

  • src/fooBar.js
  • src/fooBar.html
  • src/fooBar.scss
  • src/fooBar....
  • src/fooBar.test.js => npm run test
  • src/fooBar.test.e2e.js (if I have E2E tests - Puppeteer, Playwright...) => npm run test:e2e

Tests should not be separated from the source code (think autonomous modules).

View chrome-extensions.md
  • 1Password extension
  • Pesticide for Chrome
  • JSON Formatter
  • Octotree
  • Octo Preview
  • Feature Queries Manager
  • Copy as Markdown
  • React Developer Tools
  • Copy Title and Url as Markdown Style
  • Refined GitHub
@mrmartineau
mrmartineau / settings.json
Last active Aug 6, 2020
vscode settings.json
View settings.json
{
"[handlebars]": {
"editor.formatOnSave": false
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
@mrmartineau
mrmartineau / .babelrc
Last active Jul 1, 2018
jest/styled-components snapshot bug...
View .babelrc
{
"presets": [
[
"env",
{
"modules": false
}
],
"react"
],
View connect.js
import React from 'react'
import { connect } from 'react-redux'
import { doClearQuery } from './some/file/of/action/creators'
// We again use a simple, functional component.
const OurComponent = ({ query, results, clearQuery }) => (
<div>
query: {query}
<button onClick={clearQuery}>Clear</button>
<ul>
@mrmartineau
mrmartineau / authorizationHeader.js
Created May 16, 2018
setting an authorization header
View authorizationHeader.js
const USERNAME = 'admin@foobar.com'
const TOKEN = 'hPPacTBSv7k0xAhAJrZjtmrmfhBj6rYd4UVfZvCO'
const authToken = btoa(
unescape(encodeURIComponent(`${USERNAME}:${TOKEN}`))
)
// authToken = 'YWRtaW5AZm9vYmFyLmNvbTpoUFBhY1RCU3Y3azB4QWhBSnJaanRtcm1maEJqNnJZZDRVVmZadkNP'
@mrmartineau
mrmartineau / package.json
Last active May 8, 2018
Pre-commit stuff
View package.json
// 1
scripts: {
// ...
"precommit": "lint-staged",
"lint-staged-stash": "git stash save --keep-index 'lint-staged' && touch .didstash || rm .didstash || true",
"lint-staged-stash-pop": "test -f .didstash && rm .didstash && git stash pop || true"
},
"lint-staged": {
"*.js": ["lint-staged-stash", "eslint --fix", "git add", "lint-staged-stash-pop"]
},
You can’t perform that action at this time.