Skip to content

Instantly share code, notes, and snippets.

View Brettm12345's full-sized avatar
:octocat:
Working from home

Brett Mandler Brettm12345

:octocat:
Working from home
View GitHub Profile
@Brettm12345
Brettm12345 / org-manual.org
Created December 29, 2018 09:37
Org manual

Org Mode - Organize Your Life In Plain Text!

@Brettm12345
Brettm12345 / reddit.css
Created December 29, 2018 09:42
Reddit custom css
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
@Brettm12345
Brettm12345 / discord.css
Created January 22, 2019 10:18
Discord custom css
:root {
--accent-color-active: #b3ccff;
--accent-color-hover: #9bbbff;
--accent-color: #82aaff;
--accent-rgb: rgba(130, 170, 255, 0.3);
--alert-color-active: #ff97a9;
--alert-color-hover: #ff758c;
--alert-color: #ff5370;
--border-radius-bar: 3px;
--border-radius-big: 8px;
@Brettm12345
Brettm12345 / stylerc
Created January 22, 2019 10:20
Qtcurve custom theme
[Settings]
activeTabAppearance=customgradient20
animatedProgress=false
appearance=customgradient13
bgndAppearance=flat
bgndGrad=horiz
bgndImage=none
bgndOpacity=100
boldProgress=false
borderInactiveTab=true
@Brettm12345
Brettm12345 / MaterialPalenight.colors
Created January 22, 2019 10:41
Material Palenight KDE Colorscheme
[ColorEffects:Disabled]
Color=112,111,110
ColorAmount=0
ColorEffect=0
ContrastAmount=0.05
ContrastEffect=2
IntensityAmount=0.1
IntensityEffect=0
[ColorEffects:Inactive]
@Brettm12345
Brettm12345 / cloudSettings
Last active April 16, 2019 07:57
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-04-16T07:57:44.680Z","extensionVersion":"v3.2.8"}
@Brettm12345
Brettm12345 / cloudSettings
Last active August 30, 2020 14:21
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-08-30T14:20:57.634Z","extensionVersion":"v3.4.3"}
@Brettm12345
Brettm12345 / media.js
Created June 22, 2019 05:19
Media query generator for css in js
import { curry, pipe, prop } from 'rambda'
import layout from 'theme/layout'
const media = value =>
`@media (${Array.isArray(value) ? value.join('and') : value})`
const minWidth = curry(bp => `min-width: ${prop(bp, layout.breakpoints)}`)
const maxWidth = curry(bp => `max-width: ${prop(bp, layout.breakpoints)}`)
@Brettm12345
Brettm12345 / validate.ts
Created September 20, 2019 08:08
Yup validate function with fp-ts
import { toError } from 'fp-ts/lib/Either';
import { tryCatch } from 'fp-ts/lib/TaskEither';
import { Schema } from 'yup';
const validate = <T extends Schema<any>>(constructor: T) => (input: any) =>
tryCatch<Error, T extends Schema<infer P> ? P : never>(
() => constructor.validate(input),
toError
);
@Brettm12345
Brettm12345 / nexus-prisma.ts
Created October 18, 2019 04:18
When using nexus-prisma don't put all your mutations and queries in one file! Use these functions to extend your query or mutation type
import { prismaExtendType } from 'nexus-prisma';
import { PrismaExtendTypeBlock } from 'nexus-prisma/dist/blocks/extendType';
import { PrismaObjectTypeNames } from 'nexus-prisma/dist/types';
import { FieldOutConfig } from 'nexus/dist/definitions/definitionBlocks';
type ConfigFunc<
TypeName extends PrismaObjectTypeNames,
FieldName extends string
> =
| FieldOutConfig<TypeName, FieldName>