Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# noCommentWordCount
# ------------------
# This script searches your vault for a filename and
# returns the wordcount, not including text that is
# commented out
# ------------------
# Usage : ./wordCount "First Year Exam Draft"
/*
Simple snap turn controller for anyone using the @react-three/xr
library on a Quest.
*/
import { useXR, useController } from "@react-three/xr";
import { useFrame } from "@react-three/fiber";
import { useState, useEffect } from "react";
function degToRad(degrees) {
@laffan
laffan / mdToWordNoComments.sh
Created October 23, 2022 23:22
Export markdown to word via pandoc with citations
#!/usr/bin/env bash
# MarkdownToWord
# --------------
# Searches for markdown file in parent directory, then uses pandoc to export it
# along with with bibtex citations to a word document on your desktop.
# Intended to be used with a Zotero --> Obsidian --> Word workflow
#
# TO USE
# Insert your own username on line 43, make sure md and csl files are within parent
@laffan
laffan / kindle.py
Last active February 24, 2021 21:37
Kindle Note Regex (Python)
# Kindle Highlights/Notes Regex
# June 4 2017
# Credit to https://stackoverflow.com/q/16947390 for a solid start
import re
def parse_file(in_file):
read_file = open(in_file, 'r')
file_lines = read_file.readlines()