Skip to content

Instantly share code, notes, and snippets.


David Hayes drhayes

View GitHub Profile
drhayes /
Last active Jan 31, 2022
Script to change the background to a random file in my backgrounds directory.
#! /usr/bin/env zsh
DISPLAY=:0 feh --recursive --randomize --bg-fill ~/Pictures/backgrounds/* &> /dev/null
drhayes /
Last active Jan 31, 2022
Automatically download the latest Simple Desktop to a backgrounds-stage directory.
#! /usr/bin/env bash
pushd ~/Dropbox/Pictures/backgrounds-stage
http --print b | tq 'item description' --text | tq 'img' --attr src --squash | head -1 | wget --no-clobber --input-file=-
drhayes / .editorconfig
Created Jul 16, 2021
My personal root .editorconfig.
View .editorconfig
root = true
end_of_line = lf
insert_final_newline = true
indent_style = space
charset = utf-8
drhayes / squiggly-line.svg
Created Jul 15, 2021
A neato, animated squiggly line that could repeat horizontally.
View squiggly-line.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
drhayes / markdown.json
Created Jun 14, 2021
My current custom markdown snippets for Visual Studio Code.
View markdown.json
"Manual excerpt split": {
"prefix": "more",
"body": [
"description": "A properly formatted content summary split which I can never remember."
"New note template": {
"prefix": "newnote",
drhayes / lua.json
Created Jun 14, 2021
My current custom lua snippets for Visual Studio Code.
View lua.json
// Place your snippets for lua here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
drhayes / javascript.json
Created Jun 14, 2021
My current custom JavaScript snippets for Visual Studio Code.
View javascript.json
"Print to console": {
"prefix": "clog",
"body": [
"description": "Console log"
"CommonJS require": {
"prefix": "creq",
drhayes /
Last active May 26, 2021
The Code of Conduct for the Discord server Work Nerds

Welcome to the Work Nerds community!

In order to foster a welcoming and inclusive environment for everyone, we ask all members to read and agree to our Code of Conduct when joining. This Code of Conduct is a living document and will be updated from time to time as necessary. The current version can always be found at All changes will be announced in the #announcements channel of our Discord server as they are made. Agreeing to the Code of Conduct implies that you will monitor these changes and revoke your agreement if and when you no longer agree.

Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible

View createReleaseNotes.js
const { exec } = require('child_process');
const verbData = {
chore: {
label: 'Chores',
renderOrder: 4,
feat: {
label: 'New Features',
renderOrder: 0,
drhayes / button.lua
Created Apr 3, 2020
The basic button control from my GUI lib in Gemini Rising
View button.lua
local Button = Control:extend()
function Button:new(text, x, y, w, h)
self.text = text
w = w or (ui.font:getWidth(text) + 20)
h = h or 20, x, y, w or 40, h)
self.layout = fillLayout(0)
self.fill = self:add(Fill())