Skip to content

Instantly share code, notes, and snippets.

View VernonGrant's full-sized avatar
🤓
Working @twothreebird

Vernon Grant VernonGrant

🤓
Working @twothreebird
View GitHub Profile
@VernonGrant
VernonGrant / clojure-windows-cider.md
Last active November 29, 2022 05:02
Clojure via Cider and Emacs on Windows

Clojure/Cider on Windows

I spent the past 2 days trying to get this working and have tried almost everything I can think of, but I just can't get Cider functioning on Windows. I guess I'll need to use VSCode for now and this is truly painful :-(. Here's some of the guides I followed that didn't work. BTW I'm new to Clojure so I might have been doing something stupid.

Attempt One

Went to the official website's install Clojure section. Followed the Windows guide [clj

@VernonGrant
VernonGrant / .emacs
Created March 24, 2023 15:14
Zap up to char, but without the mini buffer prompt.
;; Zap up to char quickly.
(defun vg-quick-zap-up-to-char (p c)
"The same as zap up to char, but without the mini buffer prompt.
P: The prefix argument or the count.
C: The character to zap up to."
(interactive "P\nc")
(let ((cnt (cond ((null p) 1)
((symbolp p) -1)
(t p))))
(zap-up-to-char cnt c)))
@VernonGrant
VernonGrant / init.el
Created March 30, 2023 08:15
Setup of Emacs's modus vivendi theme
;;;;;;;;;;;;;;;;;;;
;; Vivendi Theme ;;
;;;;;;;;;;;;;;;;;;;
(progn
(setq-default
modus-themes-mode-line '(accented borderless padded)
modus-themes-region '(accented bg-only)
modus-themes-paren-match '(bold intense)
modus-themes-bold-constructs nil
@VernonGrant
VernonGrant / example.js
Last active August 18, 2023 11:24
Root issue example, updating multiple block states.
const fetch = require("node-fetch");
const url =
"https://sandbox.uk.rootplatform.com/v1/insurance/claims/claim-id-here/blocks";
// This is incorrect:
let options = {
method: "PATCH",
headers: { accept: "application/json", "content-type": "application/json" },
body: JSON.stringify({
@VernonGrant
VernonGrant / pint.sh
Created April 24, 2024 12:22 — forked from gabrielbidula/pint.sh
fake laravel pint formatter mode
#!/bin/bash
# Check if an argument was provided
if [ $# -eq 0 ]; then
echo "No file path provided."
exit 1
fi
# Use the provided argument (file path)
file="$1"