Skip to content

Instantly share code, notes, and snippets.

View MaxMonteil's full-sized avatar
🏠
Working from home

MaxMonteil

🏠
Working from home
View GitHub Profile
@cawfree
cawfree / case.js
Last active April 10, 2026 19:31
Convert between Camel Case (camelCase) and Snake Case (snake_case) in ES6
export const toCamelCase = (e) => {
return e.replace(/_([a-z])/g, (g) => g[1].toUpperCase());
};
export const toSnakeCase = (e) => {
return e.match(/([A-Z])/g).reduce(
(str, c) => str.replace(new RegExp(c), '_' + c.toLowerCase()),
e
)
.substring((e.slice(0, 1).match(/([A-Z])/g)) ? 1 : 0);
@alexander-hanel
alexander-hanel / exercise.md
Last active April 17, 2026 07:40
Resources for Exercising

Resources for Exercising Recommendations

Why Did I Write This?

Occasionally I get asked what resources I would recommend for someone who wants to get into working out or to start exercising. The following is a list of resources that I have found useful over the years.

Let's Get Started

The first resource I would recommend is the book Core Performance. It is probably the best introductory book that you can read on exercising. Its not a book about picking up weights. That is only one of the seven parts of this book. It covers movement prep (dynamic stretching), prehab, physio-ball routines (stability), elasticity, strength, cardio and regeneration. All of these topics are perfect for anyone getting into exercising or anyone who wants to prevent injuries. The book has beginner, intermediate and advanced routines in the back. TIP: download the app FitNotes. It might take a little bit of time to add your routines but it is the best app a

@colllin
colllin / Readme.md
Last active August 11, 2020 03:03
Auth0 + FaunaDB integration strategy

Goal

Solutions

At the very least, we need two pieces of functionality:

  1. Create a user document in Fauna to represent each Auth0 user.
  2. Exchange an Auth0 JWT for a FaunaDB user secret.
@mmyoji
mmyoji / migrate-npm-to-pnpm.md
Last active April 15, 2026 20:21
Migrate npm to pnpm
@ericclemmons
ericclemmons / codegen.ts
Created April 22, 2024 04:41
graphql-codgen config for the best fully-typed, client-side GraphQL experience with TypeScript
import type {CodegenConfig} from '@graphql-codegen/cli';
const config: CodegenConfig = {
config: {
namingConvention: {
// Ensure enum values are the same as their name, not a number or camelCased
enumValues: 'keep',
},
},
schema: ['src/**/schema.graphql'],
<template>
<h1>List items</h1>
<ul>
<li v-for="item in items" :key="item.id">
{{ item.name }}
</li>
</ul>
<button @click="addItem">Add item</button>
</template>