Skip to content

Instantly share code, notes, and snippets.

View hasparus's full-sized avatar

Piotr Monwid-Olechnowicz hasparus

View GitHub Profile
// @ts-ignore
import GatsbyParser from "gatsby/dist/query/file-parser";
import path from "path";
import glob from "glob";
/**
* Collect all graphql fragments from a directory
* @see https://github.com/gatsbyjs/gatsby/issues/12155#issuecomment-618424527
*/
export const collectGraphQLFragments = async (
@hasparus
hasparus / print-readme.yml
Created July 7, 2020 14:12
Print GitHub readme to PDF with Pandoc
name: Print readme to PDF
on:
push:
paths: ['readme.md', '.github/workflows/print-readme.yml']
jobs:
make_pdf:
runs-on: ubuntu-18.04
@hasparus
hasparus / lazy-avatar-nextjs.ts
Created March 30, 2020 21:11
avatar = facebook || tinygraphs
import { NextApiResponse, NextApiRequest } from "next";
import fetch from "isomorphic-unfetch";
export default async function avatar(
req: NextApiRequest,
res: NextApiResponse
) {
const {
query: { username_slug },
} = req;
{"lastUpload":"2020-02-13T08:01:14.026Z","extensionVersion":"v3.4.3"}
@hasparus
hasparus / README.md
Last active February 22, 2024 21:18
A color scheme for Windows Terminal

👨‍🎤 Cyberpunk SCARLET for Windows Terminal

screenshot of terminal presenting colors and borg cowsay saying "Hello!"

profile settings in screenshot

  "colorScheme": "Cyberpunk SCARLET",
  "cursorHeight": 25,
 "cursorShape": "vintage",
@hasparus
hasparus / wrots-r3f.md
Last active February 11, 2020 13:16
talk idea for the February Wrocław TypeScript meetup

Title: Case Study: Helping with TypeScript problems of react-three-fiber.

Dan Questions:

  • How will you deliver the idea to the audience?

    • R3F is pretty rad. Gonna show this on the first slide.
  • What is the one thing that you want people to take away from your talk?

    • Compiler API is powerful. We can use this power to hard solve problems.
@hasparus
hasparus / after.tsx
Last active January 17, 2020 12:20
vanity babel macro for concise React.lazy components
const UserProfile = React.lazy(() => import("./scenes/UserProfile").then(module => ({
default: module.UserProfile
})));

Grammar checking of MDX blog posts

Update

Grammarly extension for VSCode almost solves the problem (HTML syntax introduces sentence-fragment and capitalization problems).

Problem

  • I'm using MDX, or at least Markdown to write blog posts.
  • I'm not a native english speaker and I feel I need Grammarly or similar tool to publish long-form content online.
  1. Yo I'm Piotr
  2. I'm working at Chop-Chop. We're recruiting. I'll get some money for bringing you in.
  3. 3 things I wanna sell tonight
    1. Follow me on Twitter
    2. Option has problems
    3. Write your own instances

Yo I'm Piotr Monwid-Olechnowicz.