Skip to content

Instantly share code, notes, and snippets.

View bryndyment's full-sized avatar
👹
React, MUI, Next.js, Sanity, TypeScript

Bryn Dyment bryndyment

👹
React, MUI, Next.js, Sanity, TypeScript
View GitHub Profile
@martinheld
martinheld / GraphQL introspection query via curl.md
Last active August 15, 2025 00:10
GraphQL introspection query via curl

GraphQL introspection query via curl

cat introspection_query.json

{ 
  "query": "query IntrospectionQuery {
      __schema {
        queryType { name }
        mutationType { name }
@pcmaffey
pcmaffey / Code.gs
Last active September 19, 2023 15:56
Roll your own analytics - Google Apps Script for writing custom analytics to Google Sheets
// original from: http://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/
// original gist: https://gist.github.com/willpatera/ee41ae374d3c9839c2d6
// NOTE: Uses es5 javascript
// handle method: get
function doGet(e){
return handleResponse(e);
}
// handles method: post
function doPost(e){
@rdyson
rdyson / install-git-mjoave.md
Last active September 4, 2018 07:36
Install `git` on macOS 10.14 Mojave beta without installing brew

Install git on Mojave without brew

I was able to set up git without installing brew on Mojave (10.14 Beta 18A293u) as follows:

  1. Install XCode Beta (build 10L176w) from https://developer.apple.com/download
  2. Install Command Line Tools (macOS 10.14) for Xcode 10 Beta from https://developer.apple.com/download/more
  3. Set developer directory by running sudo xcode-select -s /Applications/Xcode.app/Contents/Developer in the terminal
  4. Verify that git works
@kerma
kerma / convert_flac_to_aac.sh
Last active March 8, 2026 03:02
Convert all flac files in folder to m4a using ffmpeg and libfdk_aac
# on os x use brew to get ffmpeg with libfdk_aac
brew install ffmpeg --with-fdk-aac
# convert and use m4a as file extension
find . -name '*.flac' -exec sh -c 'ffmpeg -i "$1" -c:a libfdk_aac -b:a 320k "${1%.flac}.m4a"' _ {} \;
@svlentink
svlentink / bash.sh
Created December 23, 2015 10:56
Crontab cron job to delete all the .DS_Store files on OSx, please run once in your terminal
cronStr="1 * * * * cd / && find . -name '*.DS_Store' -type f -delete" && sudo crontab -l > /tmp/currentCrons || true && echo "$cronStr" >> /tmp/currentCrons && sudo crontab /tmp/currentCrons
@jonathantneal
jonathantneal / Math.between.js
Created July 31, 2012 18:03
Math.between // returns whether a number is between two numbers
Math.between = function (n1, n2, n3) {
return isNaN(n1) || isNaN(n2) || isNaN(n3) ? NaN : n1 >= Math.min(n2, n3) && n1 <= Math.max(n2, n3);
};