Skip to content

Instantly share code, notes, and snippets.

View jcrd's full-sized avatar
📀
Remastering

James Reed jcrd

📀
Remastering
View GitHub Profile
@jcrd
jcrd / Tiptap.svelte
Created January 17, 2024 21:14
svelte tiptap component with enforced bullet list
<script>
import { onMount } from 'svelte';
import { createEditor, EditorContent } from 'svelte-tiptap';
import BulletList from '@tiptap/extension-bullet-list'
import Document from '@tiptap/extension-document'
import ListItem from '@tiptap/extension-list-item'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'
@jcrd
jcrd / rename.sh
Created August 9, 2023 15:23
Batch rename converting underscores to hyphens
for f in *.md; do
mv "$f" "$(echo "$f" | tr "_" "-")"
done
@jcrd
jcrd / toolboxcutter.rpkg.spec
Created February 5, 2023 17:42
toolboxcutter rpkg spec template for blog post
%global cli_cmd tb
Name: {{{ git_cwd_name name="toolboxcutter" }}}
Version: {{{ git_cwd_version lead="$(git tag | sed -n 's/^v//p' | sort --version-sort -r | head -n1)" }}}
Release: 1%{?dist}
Summary: A script to automate use of toolbox
License: MIT
URL: https://github.com/jcrd/toolboxcutter
VCS: {{{ git_cwd_vcs }}}
@jcrd
jcrd / clight.rpkg.spec
Created February 4, 2023 21:26
clight rpkg spec template for blog post
Name: {{{ git_cwd_name name="clight" }}}
Version: {{{ git_cwd_version lead="$(git tag | sed -n 's/^v//p' | sort --version-sort -r | head -n1)" }}}
Release: 1%{?dist}
Summary: A C daemon that turns your webcam into a light sensor. It will adjust screen backlight based on ambient brightness.
License: GPL-3.0
URL: https://github.com/FedeDP/clight
VCS: {{{ git_cwd_vcs }}}
Source0: {{{ git_cwd_pack }}}
@jcrd
jcrd / clight.spec
Created February 3, 2023 21:24
clight spec for blog post
Name: Clight
Version: 4.9
Release: 1%{?dist}
Summary: A C daemon that turns your webcam into a light sensor. It will adjust screen backlight based on ambient brightness.
License: GPL-3.0
URL: https://github.com/FedeDP/clight
Source0: https://github.com/FedeDP/Clight/archive/refs/tags/4.9.tar.gz
BuildRequires: cmake
@jcrd
jcrd / clight.spec
Last active February 3, 2023 21:06
clight and deps rpm specs
Name: Clight
Version: 4.9
Release: 1%{?dist}
Summary: A C daemon that turns your webcam into a light sensor. It will adjust screen backlight based on ambient brightness.
License: GPL-3.0
URL: https://github.com/FedeDP/clight
Source0: https://github.com/FedeDP/Clight/archive/refs/tags/4.9.tar.gz
BuildRequires: cmake
@jcrd
jcrd / cheatsheet.spec
Last active October 17, 2022 16:09
cheatsheet rpm spec
Name: cheatsheet
Version: 0.1.0
Release: 1%{?dist}
Summary: A command-line cheatsheet for the command-line
License: MIT
URL: https://github.com/atlasamerican/cheatsheet
Source0: https://github.com/atlasamerican/cheatsheet/archive/refs/tags/v0.1.0.tar.gz
Requires: git
@jcrd
jcrd / i3lock.service
Created August 19, 2022 00:14
sessiond session services
[Unit]
Description=Lock X session with i3lock
Documentation=man:i3lock(1)
PartOf=graphical-session.target
[Service]
ExecStart=/usr/bin/i3lock -n
ExecStopPost=/usr/bin/sessionctl unlock
[Install]
@jcrd
jcrd / python3-hid.spec
Created August 8, 2022 20:07
python hid package spec
%global pypi_name hid
%global pypi_version 1.0.5
Name: python-%{pypi_name}
Version: %{pypi_version}
Release: 1%{?dist}
Summary: ctypes bindings for hidapi
License: MIT
URL: https://pypi.org/project/hid/
@jcrd
jcrd / godot-3.4.3.spec
Last active March 15, 2022 23:23
godot rpm spec
# Headless is editor binary to run without X11, e.g. for exporting games from CLI
%bcond_without headless
# Server is template (optimized, no tools) binary to run multiplayer servers
%bcond_without server
# Undefine for stable
#define prerel 1
%define status stable
%define uversion %{version}-%{status}