This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-07/schema", | |
"$id": "https://gist.githubusercontent.com/treckstar/175547806360c7f2c81cc961ad8037f1/raw/treckstar.omp.json", | |
"type": "object", | |
"title": "The Oh My Posh theme definition", | |
"description": "https://ohmyposh.dev/docs/configuration/overview", | |
"definitions": { | |
"color": { | |
"anyOf": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { GetStaticPaths, GetStaticProps } from 'next'; | |
type Locale = 'en-US' | 'es' | 'hm'; | |
type PageData = { | |
// Define the properties you need for your page data | |
title: string; | |
content: string; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Import required packages and functions | |
const fs = require('fs'); | |
const { SitemapStream, streamToPromise } = require('sitemap'); | |
const { createGzip } = require('zlib'); | |
const { getSiteMapUrls } = require('@uniformdev/next-jss/server'); | |
// Set up Uniform and Contentful credentials | |
const UNIFORM_API_KEY = process.env.UNIFORM_API_KEY; | |
const CONTENTFUL_SPACE_ID = process.env.CONTENTFUL_SPACE_ID; | |
const CONTENTFUL_ACCESS_TOKEN = process.env.CONTENTFUL_ACCESS_TOKEN; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { withRouter, Router } from 'next/router'; | |
interface IndexProps { | |
router: Router; | |
} | |
interface IndexState { | |
activeLink: string; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { Image, ImageProps } from "next/image"; | |
type ImageLoaderProps = Omit<ImageProps, "src"> & { | |
src: string; | |
}; | |
class ImageLoader extends React.Component<ImageLoaderProps> { | |
public loader({ src, width, quality }: ImageLoaderProps): string { | |
return `${src}?w=${width}&q=${quality || 75}`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { Image, ImageProps } from "next/image"; | |
import { createClient } from "contentful"; | |
type ContentfulImage = { | |
fields: { | |
file: { | |
url: string; | |
details: { | |
image: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { useRouter } from 'next/router'; | |
type Props = { | |
locales: string[]; | |
currentLocale: string; | |
}; | |
class LocaleSwitcher extends React.Component<Props> { | |
private handleLocaleChange = (event: React.ChangeEvent<HTMLSelectElement>) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import Link from 'next/link'; | |
import { useRouter } from 'next/router'; | |
type Locale = { | |
locale: string; | |
label: string; | |
}; | |
type Props = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my personal strapi + gatsby + plain custom + tailwindcss + headlessui + framermotion | |
this site was never finished which is why some things look out of place | |
https://www.treckstar.net | |
The monorepo for above | |
https://github.com/treckstar/grapsbi | |
Gatsby Plugins I use/like | |
https://github.com/treckstar/grapsbi/blob/main/frontend/package.json | |
Packaged with PNPM | |
https://pnpm.io/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# | |
# These are just some functions to add into the ~/.bashrc file | |
# Modified print_r command to output color without installing any themes | |
# Normally around line #118 these can be placed. I always put them at the end of file. | |
# You must restart the terminal after updating the ~/.bashrc file | |
cecho(){ |
NewerOlder