Skip to content

Instantly share code, notes, and snippets.

@shindig7
shindig7 / monokai4roam.css
Created September 25, 2020 13:27
roam/css script for (an approximation of) a monokai theme in Roam Research Python code blocks
.cm-s-default .cm-meta {
color: #66D9EF;
}
.cm-s-default .cm-variable {
color: #FD971F;
}
.cm-s-default .cm-variable-2 {
color: #FD971F;
@shindig7
shindig7 / roam_spaced_repetition.py
Created June 6, 2020 15:21
Creates spaced repetition reminders for Roam Research (https://roamresearch.com/) at 1 day, 1 week, 1 month, 4 month, and 1 year intervals
from datetime import datetime, timedelta
def get_reps(subject):
check = r"{{[[TODO]]}}"
suffix = (
lambda d: "th" if 10 < d < 14 else {1: "st", 2: "nd", 3: "rd"}.get(d % 10, "th")
)
today = datetime.now()
rep1 = today + timedelta(days=1)
rep2 = today + timedelta(weeks=1)
@shindig7
shindig7 / search_python_project.py
Created June 6, 2020 15:17
Finds all Python files in a directory and prints the filename if it contains the search string
from pathlib import Path
def search(term):
pys = Path(".").rglob("*.py")
for fp in pys:
with open(fp, "r") as F:
if term in F.read():
print(str(fp).split("\\")[-1])
@shindig7
shindig7 / F# Test.fs
Created March 28, 2018 12:29
F# Test created by shindig_ - https://repl.it/@shindig_/F-Test
printf "Guess the number!: "
let mutable input = System.Console.ReadLine() |> System.Int32.Parse
let secret = System.Random().Next(1,101)
while input <> secret do
let diff = input - secret
if diff > 0 then
printfn "Try again! The secret number is LOWER than %d" input
printf "Next guess?: "
input <- System.Console.ReadLine() |> System.Int32.Parse
@shindig7
shindig7 / keybase.md
Created June 7, 2017 22:07
Keybase.io Verification

Keybase proof

I hereby claim:

  • I am shindig7 on github.
  • I am shindig_ (https://keybase.io/shindig_) on keybase.
  • I have a public key ASCOT0QvC-YP5cRZlsmcsIdyZxlfS8HCvwggXG4LaxyB7Qo

To claim this, I am signing this object: