Skip to content

Instantly share code, notes, and snippets.

require 'json'
require 'nokogiri'
require 'curb'
Pry.config.editor = "vim"
if `uname` =~ /Darwin/
['pbcopy', 'pbpaste']
else
@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;
}
@ll14m4n
ll14m4n / default.conf
Created May 31, 2019 17:11 — forked from flox1an/default.conf
nginx config that uses the oauth2-proxy (via auth_request) to authenticate against gitlab and then proxies all requests to a backend service while setting the auth headers X-User and X-Email
server {
listen 80;
server_name localhost;
location /oauth2/ {
proxy_pass http://oauth-proxy:4180;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Auth-Request-Redirect $request_uri;
s.youtube.com
@ll14m4n
ll14m4n / yt_video_url.md.txt
Last active October 19, 2024 11:05
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 / 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(