Skip to content

Instantly share code, notes, and snippets.

View timfee's full-sized avatar

Tim Feeley timfee

View GitHub Profile
@timfee
timfee / timezones.ts
Last active April 19, 2024 18:51
Friendly Timezones
type TimeZoneInfo = {
friendlyName: string
offsetString: string
offsetNumeric: number
longTimezones: string[]
}
function offsetStringToNumeric(offsetString: string): number {
const sign = offsetString.startsWith("GMT-") ? -1 : 1
const [hours, minutes] = offsetString.slice(4).split(":").map(Number)
@timfee
timfee / next.config.js
Created August 16, 2020 19:10
environment for Next.js issue
const fs = require(`fs`)
const withCSS = require(`@zeit/next-css`)
const blogPostsFolder = `./_content/posts`
const withMdxFm = require(`next-mdx-frontmatter`)
const getPathsForPosts = () => {
return fs
.readdirSync(blogPostsFolder)
.map((blogName) => {
const trimmedName = blogName.substring(0, blogName.length - 3)
module.exports = {
siteMetadata: {
title: 'Tim Feeley',
description: 'People-centric Product Management',
author: 'Tim Feeley',
},
plugins: [
{
resolve: `gatsby-source-filesystem`,
options: {