Skip to content

Instantly share code, notes, and snippets.

View dbryantm's full-sized avatar

Douglas Moore dbryantm

View GitHub Profile
@rphlmr
rphlmr / helpers.ts
Last active December 26, 2025 17:07
Drizzle ORM, deep sub queries
/* -------------------------------------------------------------------------- */
/* More here; */
/* -------------------------------------------------------------------------- */
// https://gist.github.com/rphlmr/0d1722a794ed5a16da0fdf6652902b15
export function distinctOn<Column extends AnyColumn>(column: Column) {
return sql<Column["_"]["data"]>`distinct on (${column}) ${column}`;
}
export function jsonBuildObject<T extends SelectedFields>(shape: T) {
@insertish
insertish / React Native.md
Last active August 19, 2025 05:17
Configure React Native with Typescript, Vite.js for react-native-web and Storybook.
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active March 16, 2026 08:27
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
@ghostbear
ghostbear / Spotify - How to reduce and limit the cache size (Windows - Mac).md
Last active March 9, 2026 13:09
[Spotify] How to limit the cache size (Windows/Mac OS)

Credit to MadHatter

WINDOWS

Use your text editor of choice or if you don't have one use Windows Notepad
Opening with Notepad may or may not result in a fancy mess

  1. Close Spotify
  2. Open File Explorer and paste the following into the address bar %appdata%/Spotify¤
  3. Open the file named prefs with your text editor
  4. Change the numeric value following storage.size= . If storage.size= doesn't exist add it manually to the end of the file and assign numeric value. This value represents megabytes. One gigabyte equals 1024 megabytes. In the end, it should look something like this storage.size=1024
  5. Save the file
@shortjared
shortjared / list.txt
Last active March 9, 2026 12:12
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
@menduz
menduz / guide.md
Last active May 11, 2022 09:19
Frontend React + TypeScript guidelines

Directory Structure

The sources of the project follows this structure:

/src
  /app
    /{domain}
      /actions.ts
 /actions.spec.ts
@adityapurwa
adityapurwa / vue-react-sfc.js
Created October 11, 2017 14:48
Single File Component in Vue and React.
// Vue (MyComponent.vue)
<template>
<h1>My Component, Hello {{name}}</h1>
</template>
<script>
export default {
data(){
return {name: 'Aditya'}
}
}
@flbuddymooreiv
flbuddymooreiv / passgitgpg.md
Last active February 23, 2026 10:59
Setting up pass on git with a gpg key

The following shell transcript shows how to:

  • Create a GPG key
  • Create a pass database
  • Add git support to the pass database
  • Create a remote git repository
  • Push the pass database to the remote git repository
  • Fetch and display your passwords from another host

It is assumed that the pass package has been installed on both the first and second computers.

# sleepy flower girl
(◡ ‿ ◡ ✿)
# y u no
ლ(ಠ益ಠლ)
# smiling breasts
(^人^)
# flipping tables
@funkjedi
funkjedi / marionette.handlebars.js
Last active July 14, 2025 23:23
Integrates Handlebars with Marionette. First attempts to load pre-compiled templates, then by selector, and finally via XHR.
/**
Usage: Just include this script after Marionette and Handlebars loading
IF you use require.js add script to shim and describe it in the requirements
*/
(function(Handlebars, Marionette) {
Marionette.Handlebars = {
path: 'templates/',
extension: '.handlebars'
};