Skip to content

Instantly share code, notes, and snippets.

View forivall's full-sized avatar
🕴️
levitating

Emily Marigold Klassen forivall

🕴️
levitating
View GitHub Profile
/*! bulma.io v0.9.3 | MIT License | github.com/jgthms/bulma */
/* Bulma Utilities */
.button, .input, .textarea, .select select, .file-cta,
.file-name, .pagination-previous,
.pagination-next,
.pagination-link,
.pagination-ellipsis {
-moz-appearance: none;
-webkit-appearance: none;
align-items: center;
{
"$schema": "https://raw.githubusercontent.com/Septh/tmlanguage/master/tmLanguage.schema.json",
"name": "Embedded Javascript",
"scopeName": "text.html.ejs",
"injectionSelector": "L:text.html",
"injections": {
"text.html.ejs - (meta.embedded.block.ejs | meta.embedded.line.ejs | meta.tag | comment), L:meta.tag, L:source.js.embedded.html": {
"patterns": [
{
"begin": "(^\\s*)(?=<%+#(?![^%]*%>))",
@forivall
forivall / customizeui.settings.json
Last active May 31, 2021 17:43
my customizeui settings for vscode - todo - fork customizeui to "compactui" and roll into an extension
{
"customizeUI.font.monospace": "Fantasque Sans Mono",
// "customizeUI.font.regular": "Input Sans Compressed",
"customizeUI.font.regular": "SF Pro Display",
"customizeUI.fontSizeMap": {
"13px": "12px"
// "monospace": "12px"
},
"customizeUI.stylesheet": {
// ".monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-name-container>.label-name": "font-weight: lighter",
# Usage: yarn list --json | jq -r 'include "yarn-list-flat"; yarnListFlat'
def yarnListFlat:
select(.type = "tree")
|.data.trees[]
|(
.name,
(.children[]? | (
.name,
(.children[]? | (
.name,
@forivall
forivall / depcruiser-vscode-links.js
Created August 6, 2020 20:25
bookmarklet to update links to open vscode
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CPUAverageLowerHalfProcs</key>
<true/>
<key>CPUAverageMultiProcs</key>
<false/>
<key>CPUDisplayMode</key>
<integer>2</integer>
@forivall
forivall / gitlab-dark-ops-dashboard.user.css
Last active July 18, 2020 00:21
Gitlab Dark Operations Dashboard Improvements
/* ==UserStyle==
@name Gitlab Dark Operations Dashboard Improvements
@namespace github.com/openstyles/stylus
@version 1.0.0
@description Show more cards in the dashboard! Fix some styling!
@author Emily Marigold Klassen <github.com/forivall>
==/UserStyle== */
@-moz-document domain('custom.domain'),
domain('invent.kde.org'),
type ValueOf<T> = T[keyof T];
export const literalToEnum = <Enum extends Record<string, string | number>>(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
enumButJustForTyping: Enum
) => <Candidate extends EnumLiteralType<Enum>>(v: Candidate) =>
(v as string) as LiteralToEnum<Enum, Candidate>;
export type LiteralToEnum<
Enum extends Record<string, string | number>,
@forivall
forivall / UnionToInterface.ts
Last active June 17, 2022 04:35
UnionToInterface - fixed UnionToIntersection for ts 3.9
import {UnionToIntersection} from 'ts-essentials';
/**
* Turns a union like `{ a: number } | { b: string }` into `{ a: number, b?:
* never } | { b: string, a?: never }
*/
type UnionKeys<T> = T extends never ? never : keyof T;
export type UnionExpand<T> = ValueOf<UnionExpandInner<T, UnionKeys<T>>>;
type UnionExpandInner<T, Keys extends PropertyKey> = {
[K in Keys]: T extends { [_ in K]: any }
? T & { [_ in Exclude<Keys, keyof T>]?: never }
@forivall
forivall / UnionToBuildable.ts
Created June 8, 2020 23:17
Useful type for mutating unioned types
import type { UnionToIntersection } from 'ts-essentials';
export type UnionToBuildable<T> = {
-readonly [K in Extract<keyof UnionToIntersection<T>, keyof T>]: T[K];
} &
{
-readonly [K in Exclude<
keyof UnionToIntersection<T>,
keyof T
>]?: T extends { [_ in K]: infer U } ? U : never;