Skip to content

Instantly share code, notes, and snippets.

View mrmartineau's full-sized avatar
👋
Aho Young Warrior

Zander Martineau mrmartineau

👋
Aho Young Warrior
View GitHub Profile

ZandersComponent

Usage

export { ZandersComponent } from './ZandersComponent'

<ZandersComponent>Some content</ZandersComponent>
@mrmartineau
mrmartineau / UserProvider.tsx
Created October 11, 2023 12:01
Supabase / Next 13 user prefs question
'use client';
import { createClientComponentClient } from '@supabase/auth-helpers-nextjs';
import { ReactNode, createContext, useCallback, useContext } from 'react';
import { useRealtimeProfile } from '../hooks/useRealtime';
import { UserProfile } from '../types/db';
export type UseUpdateReturn = (action: UIStateAction) => void;
type UIState = UserProfile['settings'];
export type UIStateAction =
:root {
--padding-1: 0.25rem;
--padding-2: 0.5rem;
--padding-3: 0.75rem;
--padding-4: 0.75rem;
}
.button {
padding: var(--padding-1);
border: none;
[data-hotkey]:not(.selected)::after {
content: attr(data-hotkey);
color: var(--color-fg-muted);
background-color: var(--color-neutral-subtle);
margin-left: var(--primer-control-medium-gap, 4px);
border-radius: 2em;
font-family: monospace;
display: inline-block;
font-size: var(--primer-text-body-size-small, 12px);
font-weight: var(--base-text-weight-medium, 500);
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 March 28, 2020 23:16 — forked from tkrotoff/HowToTest.md
How I structure my tests

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).

@mrmartineau
mrmartineau / settings.json
Last active September 30, 2024 13:15
vscode settings.json
{
"[handlebars]": {
"editor.formatOnSave": false
},
"[markdown]": {
"editor.quickSuggestions": {
"comments": "off",
"other": "on",
"strings": "off"
}
@mrmartineau
mrmartineau / .babelrc
Last active July 1, 2018 21:39
jest/styled-components snapshot bug...
{
"presets": [
[
"env",
{
"modules": false
}
],
"react"
],