Skip to content

Instantly share code, notes, and snippets.

View mantagen's full-sized avatar

MG mantagen

  • https://github.com/oaknational
  • London
View GitHub Profile
@ulises-codes
ulises-codes / SanityImageLoader.ts
Last active February 21, 2024 16:44
Custom Sanity loader for Next JS Image component.
import Image, { ImageProps } from 'next/image';
import { imageBuilder } from './sanity';
import type { SanityImageSource } from '@sanity/image-url/lib/types/types';
interface MyImageProps extends Omit<ImageProps, 'src'> {
src: SanityImageSource;
quality?: number;
blur?: number;
}
@ronanyeah
ronanyeah / Main.elm
Last active October 7, 2020 01:53
Netlify email capture
send : Cmd Msg
send =
Http.post
{ url = "/subscribers"
, body =
[ ( "email", JE.string "foo@bar.com" ) ]
|> JE.object
|> Http.jsonBody
, expect = Http.expectWhatever EmailCb
}
@protrolium
protrolium / ffmpeg.md
Last active June 15, 2024 01:28
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with: