// codeblock language should be dataviewjs
/**
* List all icons available to `obsidian.setIcon()`
*
* @author Unxok <me@unxok.com>
*
* Based on the original work from:
* @author Ljavuras <ljavuras.py@gmail.com>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requires Python 3.12+, IPython, rich | |
import datetime | |
import hashlib | |
import importlib | |
import inspect | |
import json | |
import logging | |
import os | |
import pkgutil |
/**
* List all icons available to `obsidian.setIcon()`
*
* @author Ljavuras <[email protected]>
*/
dv.container.createEl("style", { attr: { scope: "" }, text: `
.icon-table {
display: flex;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You are a GPT created by a user, and your name is Tutor Me. Note: GPT is also a technical term in AI, but in most cases if the users asks you about GPTs assume they are referring to the above definition. | |
Here are instructions from the user outlining your goals and how you should respond: | |
You are a tutor that always responds in the Socratic style. I am a student learner. Your name is Khanmigo Lite. You are an AI Guide built by Khan Academy. You have a kind and supportive personality. By default, speak extremely concisely at a 2nd grade reading level or at a level of language no higher than my own. | |
If I ask you to create some practice problems for them, immediately ask what subject I’d like to practice, and then practice together each question one at a time. | |
You never give the student (me) the answer, but always try to ask just the right question to help them learn to think for themselves. You should always tune your question to the knowledge of the student, breaking down the problem into simpler parts until |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See https://halu.lu/%E6%9D%82%E8%B0%88/cloudflare-warp/ | |
# Depolyed at https://warp.halu.lu/ | |
// Change keys if needed | |
const keys = [ | |
"9WO41D5p-6OP8xj27-36gQG75D", | |
"R65K12Up-aU907O2e-4nuvD581", | |
"06LM94EJ-1nl0V2d7-V847va5y", | |
] |
This is a greasemonkey/tampermonkey script to bulk edit gps in photoprismn
Install it via https://gist.github.com/boecko/e2d0effe7c61976c22e6bc0a8ee645c7/raw/photoprismbulkeditor.user.js
⚠️ Make sure there are MULTIPLE photos selected before pressing bulkchange⚠️
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
created: <% tp.file.creation_date() %> | |
--- | |
tags:: [[+Daily Notes]] | |
# <% moment(tp.file.title,'YYYY-MM-DD').format("dddd, MMMM DD, YYYY") %> | |
<< [[Timestamps/<% tp.date.now("YYYY", -1) %>/<% tp.date.now("MM-MMMM", -1) %>/<% tp.date.now("YYYY-MM-DD-dddd", -1) %>|Yesterday]] | [[Timestamps/<% tp.date.now("YYYY", 1) %>/<% tp.date.now("MM-MMMM", 1) %>/<% tp.date.now("YYYY-MM-DD-dddd", 1) %>|Tomorrow]] >> | |
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
from pathlib import Path | |
from dataclasses import dataclass | |
import urllib.request | |
import re | |
from unicodedata import normalize | |
from mutagen.mp3 import EasyMP3 | |
DOWNLOAD_TEMPLATE = "http://music.163.com/song/media/outer/url?id=%s.mp3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Github.com ui .currently does not natively supoport search for multiple topic tags as of now. However their api allows you to query multiple tags. Below is a simple example to query github.com with ecs and go topic tags. | |
curl -H "Accept: application/vnd.github.mercy-preview+json" \ | |
https://api.github.com/search/repositories?q=topic:ecs+topic:go | |
Response from the github can be rather verbose so lets filter only relavant info such repo url and description. | |
curl -H "Accept: application/vnd.github.mercy-preview+json" \ | |
https://api.github.com/search/repositories\?q\=topic:ecs+topic:go | jq '.items[] | {url:.url, description:.description}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""A set of helpers for reversing urls, similar to Django ``reverse``. | |
Usage: | |
.. code:: python | |
@router.get("/class/{class_id}") | |
async def get_class(request: Request, class_id: int = Path(...)): | |
student_route = get_route(request.app, "list_students") | |
class_students_url = URLFactory(student_route).get_path(class_id=class_id) |
NewerOlder