Skip to content

Instantly share code, notes, and snippets.

View jahkeup's full-sized avatar

Jacob Vallejo jahkeup

View GitHub Profile
((nil .
((buffer-read-only . t)
(view-read-only . t)
(kill-read-only-ok . t)
(archive-read-only . t))))
@jahkeup
jahkeup / index.html
Created November 4, 2022 19:35
poKbxGe
<svg viewBox="0,0,500,1000">
<defs>
<pattern id="dots" x="0" y="0" width="1.5" height="1.5" patternUnits="userSpaceOnUse">
<circle r="0.4" cx=1 cy=1 fill="black">
</pattern>
<g id="base-triangle">
<polygon points="0,0 0,100 100,100" fill="none" stroke="black" stroke-linejoin="bevel" />
<polygon points="0,0 0,100 100,100" transform="scale(0.94) translate(1.85,4.5)" fill="url(#dots)" stroke="none" />
</g>
<g id="up-left-triangle" transform="rotate(90)">
@jahkeup
jahkeup / set-up-jdtls.el
Created May 23, 2022 19:36
Snippet to configure JDT-LS for use with tools like Lombok
(after! lsp-java
(setq! lsp-java-vmargs
;; Provide access to internals for compiler related tooling (such as
;; LSP introspective servers or annotation preprocessors - like
;; Lombok).
(apply #'append lsp-java-vmargs (mapcar (lambda (pkg) (list "--add-exports"
(format "%s=ALL-UNNAMED" pkg)))
'("jdk.compiler/com.sun.tools.javac.code"
"jdk.compiler/com.sun.tools.javac.util"
"jdk.compiler/com.sun.tools.javac.api"
@jahkeup
jahkeup / xinput-device-props.txt
Created May 19, 2022 00:33
xinput list-props for Kensington Expert Wireless (BT5.0 here)
Device 'ExpertBT5.0 Mouse':
Device Enabled (180): 1
Coordinate Transformation Matrix (182): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Natural Scrolling Enabled (326): 0
libinput Natural Scrolling Enabled Default (327): 0
libinput Scroll Methods Available (330): 0, 0, 1
libinput Scroll Method Enabled (331): 0, 0, 0
libinput Scroll Method Enabled Default (332): 0, 0, 0
libinput Button Scrolling Button (347): 2
libinput Button Scrolling Button Default (348): 2
// ==UserScript==
// @name Fabric.com - Item styling
// @namespace http://tampermonkey.net/
// @version 0.1.2
// @description Style items when browsing so that its simple to see what's available and unavailable while shopping.
// @author Jacob Vallejo <jake@vcastle.net>
// @match https://fabric.com/*
// @match https://www.fabric.com/*
// @homepageURL https://gist.github.com/jahkeup/95565e8874ae3e48dc94d63bf8a955cd
// @updateURL https://gist.github.com/jahkeup/95565e8874ae3e48dc94d63bf8a955cd/raw/fabric-stock-styles.user.js
#!/usr/bin/env bash
set -euo pipefail
hash loginctl awk
log() { echo "[$(date --iso-8601=s)] $*" >&2; }
if ! loginctl show-session &>/dev/null; then
log "ERROR: no logind session found"
exit 1
fi
@jahkeup
jahkeup / collect-go-test-results.sh
Created June 30, 2021 17:55
go-test2json helper
#!/usr/bin/env bash
#
# collect-go-test-results.sh - build summary JSON from go test output
#
# usage:
#
# ./collect-go-test-results.sh # no flags, reads from STDIN
#
# example:
#

Literally what my dog has brought me to.

Everything leads to a bark and distrubance of focus.

go run /home/jake/src/github.com/jahkeup/hey/cmd/heyd
panic: ARE YOU FUCKING KIDDING ME. I MUST MEET THAT DOG.
@jahkeup
jahkeup / logbash.sh
Last active May 26, 2023 22:17
Run bash and log its STDOUT/STDERR to systemd journal
#!/usr/bin/env bash
# jakeev@
if [[ "${LOGBASH_ENABLE:-1}" -ne 0 ]]; then
declare -r PROGNAME="${0##*/}"
declare -r logid="${PROGNAME:-logbash}"
# retain actual stdout/stderr descriptors
exec {stderr}>&2
exec {stdout}>&1
# use systemd-cat to capture output
exec {journal}> >(systemd-cat -t "$logid" --level-prefix=false)
@jahkeup
jahkeup / libvirtd-esxi-base.xml
Created December 15, 2020 20:03
libvirtd ESXi 7 domain configuration
<!-- WARNING: this is an example, don't use it :) I guarantee nothing. I claim nothing. -->
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
virsh edit esxi
or other application using the libvirt API.
-->
<domain type='kvm'>