Skip to content

Instantly share code, notes, and snippets.

View imCorfitz's full-sized avatar
🧩
Putting things together

Corfitz imCorfitz

🧩
Putting things together
View GitHub Profile
@imCorfitz
imCorfitz / .functions
Last active November 2, 2021 14:59
Create a custom create-next-project function to facilitate creating next.js apps using https://github.com/jpedroschmitz/typescript-nextjs-starter
# $HOME/.functions
function create-next-project() {
NAME=${1:-too-lazy-to-come-up-with-a-project-name}
npx create-next-app $NAME -e https://github.com/jpedroschmitz/typescript-nextjs-starter
}
# In order to have these functions available in your terminal at all times
# make sure to add following command to your .bashrc or .zshrc file:
# source $HOME/.functions
@imCorfitz
imCorfitz / Auth.js
Created June 14, 2021 11:27
Strapi Refresh Token
// extensions/users-permissions/controllers/Auth.js
"use strict";
/**
* Auth.js controller
*
* @description: A set of functions called "actions" for managing `Auth`.
*/
/* eslint-disable no-useless-escape */
@imCorfitz
imCorfitz / _app.tsx
Created December 5, 2020 15:14
Ant Design – Switching between Dark and Light mode
import '@/styles/themes.scss';
import '@/styles/global.scss';
function App({ Component, pageProps }): JSX.Element {
return <Component {...pageProps} />
}
export default App;
@imCorfitz
imCorfitz / Fly.svelte
Created October 14, 2019 12:59
Transition for Sapper Navigation
<script>
import { fly } from 'svelte/transition';
export let active = false;
</script>
{#if active}
<div transition:fly={{ y: 50, duration: 300 }}>
<slot></slot>
</div>
{/if}