Skip to content

Instantly share code, notes, and snippets.

View d3v1an7's full-sized avatar

Ben White d3v1an7

  • Sydney, Australia
View GitHub Profile
@d3v1an7
d3v1an7 / prettier-plugin-js-frontmatter.js
Last active December 16, 2024 23:29
Prettier plugin for formatting JS frontmatter in WebC (while keeping Tailwind CSS class sorting)
import prettier from 'prettier';
import { parsers as tailwindPluginParser } from 'prettier-plugin-tailwindcss';
import babelParser from 'prettier/plugins/babel';
const frontmatterRegex = /^---js\n([\s\S]*?)\n---\n/;
function parse(text, options) {
const match = text.match(frontmatterRegex);
if (match) {
const frontmatter = match[1];
const content = text.slice(match[0].length);
@d3v1an7
d3v1an7 / config.yaml
Last active December 9, 2024 03:34
macos-fresh-config
---
brew:
brew:
- coreutils
- jq
- mas
- poetry
- python-yq
- shellcheck
- zsh-completions
@d3v1an7
d3v1an7 / logseq-custom-priorities.css
Created November 7, 2022 07:05
Logseq theme customisation: switch A/B/C priorities to P1/P2/P3
a[priority],
a.priority {
font-size: 0px;
}
a[priority]::before {
font-size: var(--ls-page-text-size);
}
a[priority=A]::before,
a.priority[href="#/page/A" i]:before {
content: "P1";
@d3v1an7
d3v1an7 / ddr-extreme.md
Last active September 28, 2024 07:47
Setting up Stepmania to look/feel like DDR Extreme

Setting up Stepmania to look/feel like DDR Extreme

The first time I played DDR was on a 6th Mix DDR MAX cabinet, but I spent most of my time with this massive custom LED wall screen that housed DDR Extreme. So when I got a foam pad for home, I wanted to replicate what felt most comfortable.

I'm sure it's not pixel perfect, and there are probably some arcade features/behaviours I'm missing, but this setup is close enough for me!

  1. Download Beware's Stepmania Extreme build (direct)

If you don't mind using an older version of Stepmania, you're probably good to go and can ignore the rest!

@d3v1an7
d3v1an7 / gist:efa831775b37d9a39cc3548583bd3654
Created January 25, 2021 07:31
Minecraft stuff for the kiddos
# Make fun caves by walking around
# Repeat/Unconditional/Always Active
execute @a ~ ~ ~ fill ~-5 0 ~-5 ~5 250 ~5 air 0 replace stone 0
# Repeat/Unconditional/Always Active
execute @a ~ ~ ~ fill ~-5 0 ~-5 ~5 250 ~5 air 0 replace dirt 0
# Repeat/Unconditional/Always Active
execute @a ~ ~ ~ fill ~-5 0 ~-5 ~5 250 ~5 sealantern 0 replace stone 3
# Sand trap (dig a hole under the coordinates, have 2 layers of spider web after 1 block of air, then lava at the bottom)
# Activate trap
@d3v1an7
d3v1an7 / nowplaying.htm
Last active September 6, 2020 09:12
Now Playing for Spotify in OBS/Streamlabs OBS via Snip
<div id="container">
<img id="cover" src="Snip_Artwork.jpg" />
<div id="text">
<div id="track"></div>
<div id="artist"></div>
</div>
</container>
<style>
body {
background-color: rgba(0, 0, 0, 0);
<!--
Song cover path: ~/.config/cover.png
Song info path: ~/.config/song.htm
-->
<!-- Song format -->
<container><img src="cover.png" /><text><song>%t</song><artist>%m</artist></text></container><script>setTimeout(function(){location.reload()},1000);</script><style>@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro);body{background-color:rgba(0,0,0,0);margin:0 auto;overflow:hidden}artist,container,cover,song{display:block}container{background:rgba(0,0,0,.8);border-radius:6px;box-shadow:0 4px 8px 0 rgba(0,0,0,.2);display:flex;height:100px;width:320px}img{border-radius:6px 0 0 6px;float:left;height:100px;left:0;width:100px}text{align-self:center;color:#fff;font-family:"Source Sans Pro",sans-serif;font-size:12px;padding:10px}artist,song{-webkit-box-orient:vertical;-webkit-line-clamp:2;display:-webkit-box;max-height:39px;overflow:hidden}song,pause{-webkit-line-clamp:2;font-size:16px;font-weight:700;padding-bottom:5px}</style>
<!-- Placeholder -->
<container><img src="https://developer.spotify.c
@d3v1an7
d3v1an7 / inspector-stylesheet.css
Last active April 15, 2020 03:35
TeamGantt nicer screenshots
/* Zoom (week view) until you can fit everything vertically, adjust the font size as required */
/* Open Chrome dev tools, press Ctrl+P, and type: inspector-stylesheet */
/* Paste the following into the new stylesheet window */
.day_lines {
display: none;
}
.task_month_day_day {
border: none;
@d3v1an7
d3v1an7 / install.ps1
Last active August 1, 2022 05:08
For quick app install after a format.
<#
HOW TO USE
- Download this file
- Modify the `Install` and `Download` arrays below as required
- Find other packages here: https://winget.run
- Run `winget list` before formatting to help make your own array from scratch
- For anything you can't install via winget, get a download link, and add it to the download array
- Right click, then select 'Run with PowerShell'
WHAT WILL HAPPEN