Skip to content

Instantly share code, notes, and snippets.

View drhayes's full-sized avatar
🐱

David Hayes drhayes

🐱
View GitHub Profile
@drhayes
drhayes / rexpaint.lua
Last active March 5, 2024 02:13
A lightweight REXPaint .xp file reader for LOVE2D.
--
-- A lightweight REXPaint .xp reader for LOVE2D.
-- By Vriska Serket / @arachonteur
-- Adapted by drhayes to not use self, make constants uppercase,
-- and updated to work with love 11.2.
-- From https://gist.github.com/vriska-serket/334bfcfa7dfe7265ddbe089e4a51e522
--
-- Output table looks like this.
--[[
{
I'm proving something for https://drhayes.proven.lol.
Here it is: proven853dc3
@drhayes
drhayes / query.graphql
Created January 13, 2020 16:51
GraphQL query for v4 GitHub API to find every user in an organization
query {
organization(login: "org-goes-here") {
samlIdentityProvider {
ssoUrl
externalIdentities(first: 100) {
edges {
node {
guid
samlIdentity {
nameId
@drhayes
drhayes / fetch-simple-desktop.sh
Last active January 31, 2022 15:35
Automatically download the latest Simple Desktop to a backgrounds-stage directory.
#! /usr/bin/env bash
pushd ~/Dropbox/Pictures/backgrounds-stage
http --print b https://feeds.feedburner.com/simpledesktops | tq 'item description' --text | tq 'img' --attr src --squash | head -1 | wget --no-clobber --input-file=-
@drhayes
drhayes / change-background.sh
Last active January 31, 2022 15:35
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
drhayes / .editorconfig
Created July 16, 2021 16:05
My personal root .editorconfig.
root = true
[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
[*.{js,py}]
charset = utf-8
@drhayes
drhayes / squiggly-line.svg
Created July 15, 2021 20:42
A neato, animated squiggly line that could repeat horizontally.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@drhayes
drhayes / markdown.json
Created June 14, 2021 15:27
My current custom markdown snippets for Visual Studio Code.
{
"Manual excerpt split": {
"prefix": "more",
"body": [
"<!--more-->"
],
"description": "A properly formatted content summary split which I can never remember."
},
"New note template": {
"prefix": "newnote",
@drhayes
drhayes / lua.json
Created June 14, 2021 15:26
My current custom lua snippets for Visual Studio Code.
{
// 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
drhayes / javascript.json
Created June 14, 2021 15:25
My current custom JavaScript snippets for Visual Studio Code.
{
"Print to console": {
"prefix": "clog",
"body": [
"console.log($1);$0"
],
"description": "Console log"
},
"CommonJS require": {
"prefix": "creq",