Skip to content

Instantly share code, notes, and snippets.

View trev-dev's full-sized avatar
:electron:
Free as in Freedom

Trev trev-dev

:electron:
Free as in Freedom
View GitHub Profile
@trev-dev
trev-dev / schema.json
Created September 15, 2020 21:07
Intermittently Breaking Section
{
"name": "Pool Safety Covers",
"settings": [
{
"type": "paragraph",
"content": "Set up safety covers for your pool covers and steps."
}
],
"blocks": [
{
@trev-dev
trev-dev / dadjoke.js
Created September 15, 2020 23:46
I can haz dadjoke plz
#! /usr/bin/node
const https = require('https')
const options = {
headers: {
'Accept': 'application/json'
}
}
https.get('https://icanhazdadjoke.com', options, req => {
@trev-dev
trev-dev / _contact_page.scss
Last active October 4, 2020 22:39
Rendering Wagtail's AbstractEmailForm on a field-by-field basis
#is-contact-form {
input {
@extend .input;
}
textarea {
@extend .textarea;
}
}
@trev-dev
trev-dev / app.ts
Last active October 30, 2020 11:09
A functional example of an application entrypoint
import { pipe } from '../utilities'
import { Model } from './model'
import { HyperScriptView } from './view'
import {
MessageObject, Updater, MSG, Dispatcher, dispatchList
} from './update'
import createElement from 'virtual-dom/create-element'
import { diff, patch } from 'virtual-dom'
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@trev-dev
trev-dev / .xinitrc
Last active June 17, 2021 22:12
Super Simple "Display Manager" for X11
eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
export SSH_AUTH_SOCK
CHOICE="${SESSION_CHOICE:-i3}";
exec $CHOICE
@trev-dev
trev-dev / rollup.config.js
Last active July 17, 2021 01:52
Svelte Rollup
import path from 'path'
import ts from '@rollup/plugin-typescript'
import svelte from 'rollup-plugin-svelte'
import sveltePreprocess from 'svelte-preprocess'
import scss from 'rollup-plugin-scss'
import commonjs from '@rollup/plugin-commonjs'
import css from 'rollup-plugin-css-only'
import resolve from '@rollup/plugin-node-resolve'
import filesize from 'rollup-plugin-filesize'

Keybase proof

I hereby claim:

  • I am trev-dev on github.
  • I am trev_dev (https://keybase.io/trev_dev) on keybase.
  • I have a public key ASDNC-db0OmFfkkBntl20Lwqro8iArTpycwiynH5KLOt0wo

To claim this, I am signing this object:

@trev-dev
trev-dev / add-to-existing-namespaces.js
Created February 18, 2022 22:55 — forked from idettman/add-to-existing-namespaces.js
JavaScript: JSDoc Advanced Tips
/* https://leahayes.wordpress.com/2011/08/28/documenting-javascript-with-jsdoc3/
Namespaces can still be documented when a more abstract mechanism is used. @lends allows members to be added to an existing namespace:
*/
/**
* Root namespace
* @namespace root
*/
$namespace('root', /** @lends root **/ {
/**