Skip to content

Instantly share code, notes, and snippets.

Avatar
:electron:
Free as in Freedom

trevDev(); trev-dev

:electron:
Free as in Freedom
View GitHub Profile
@trev-dev
trev-dev / aliases.muttrc
Created Oct 1, 2022 — forked from guiniol/aliases.muttrc
neomutt configuration with notmuch
View aliases.muttrc
alias YOU YOUR NAME <email@somewhere.com>
@trev-dev
trev-dev / config.scm
Created Jun 23, 2022
Home mcron setup
View config.scm
;; This "home-environment" file can be passed to 'guix home reconfigure'
;; to reproduce the content of your profile. This is "symbolic": it only
;; specifies package names. To reproduce the exact same profile, you also
;; need to capture the channels being used, as returned by "guix describe".
;; See the "Replicating Guix" section in the manual.
(add-to-load-path (dirname (current-filename)))
(use-modules
(srfi srfi-171 meta)
(gnu home)
(gnu packages)
@trev-dev
trev-dev / mailsync.scm
Created Jun 21, 2022
Notmuch sync script
View mailsync.scm
#!/run/current-system/profile/bin/guile -s
!#
(define (nm-tag terms)
(system* "notmuch" "tag" (car terms) "--" (cdr terms)))
(define %post-sync-terms '(("+inbox" . "path:/.*\\/INBOX/")
("+draft" . "path:/.*\\/Drafts/")
("+sent" . "path:/.*\\/Sent/")
("+trash" . "path:/.*\\/Trash/")
View add-to-existing-namespaces.js
/* 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 **/ {
/**
View openpgp.md
View keybase.md

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:

View rollup.config.js
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'
@trev-dev
trev-dev / .xinitrc
Last active Jun 17, 2021
Super Simple "Display Manager" for X11
View .xinitrc
eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
export SSH_AUTH_SOCK
CHOICE="${SESSION_CHOICE:-i3}";
exec $CHOICE
View index.html
<!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 / app.ts
Last active Oct 30, 2020
A functional example of an application entrypoint
View app.ts
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'