Skip to content

Instantly share code, notes, and snippets.

@ll14m4n
ll14m4n / json_match.rb
Created April 10, 2024 15:14
RSpec match nested JSON
# May be used to match JSON strings in nested array/hashes
# Example:
# RSpec.describe(
# { a: 1,
# whatever: 'else',
# nested_json: '[{"c":3},{"whatever":"else"}]'
# }
# ) do
# it { is_expected.to match(
# a_hash_including(
@ll14m4n
ll14m4n / yt_video_url.md.txt
Last active March 22, 2026 12:18
obsidian youtube templater
<%*
/*
You need to install yt-dlp and jq to use this template:
$ brew install yt-dlp jq # on macOS
You need to define user function in Templater plugin settings named "ytmeta" with the following command:
/opt/homebrew/yt-dlp -j "https://www.youtube.com/watch?v=${id}" | /opt/homebrew/jq "${query}"
replace /opt/homebrew with your path to yt-dlp and jq
@ll14m4n
ll14m4n / custom.css
Created June 5, 2018 23:13
Jupiter Theme
/* for Stylebot chrome extension */
div.cell.text_cell.rendered.selected .prompt {
border-left: 5px solid #e22978;
border-right: 2px dotted #e22978;
}
div.cell.text_cell.selected .prompt {
border-right: 2px dotted #e22978;
}
require 'json'
require 'nokogiri'
require 'curb'
Pry.config.editor = "vim"
if `uname` =~ /Darwin/
['pbcopy', 'pbpaste']
else