Skip to content

Instantly share code, notes, and snippets.

@ms3056
ms3056 / README.md
Last active March 13, 2024 14:31
Timeline template

image

Version History

  • V1 - initial release
  • V2: cleaned up the code a little, removed the black background behind the current day text as it wasn't precise. I left the code in there - just uncomment it. Removed an indent at the end to prevent breaking the SVG - thanks q on Discord!

Note

  • Reading View is BROKEN - wait for the plugin (assuming no surprises await me there). TBD - (when it gets done)™
  • Live Preview works as it should
  • Adjustments can be made at the top of the file
@ms3056
ms3056 / main.js
Last active June 20, 2023 06:19
Clock plugin for Obsidian
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
@ms3056
ms3056 / !Collection of Obsidian Snippets
Last active February 4, 2024 23:54
Collection of Obsidian Snippets
- ActiveLine.css
- Callouts.css
@ms3056
ms3056 / crypto.js
Created March 6, 2023 00:04
Obsidian Crypto Snippet
function roundToTwo(num) {
return +(Math.round(num + "e+2") + "e-2");
}
async function start(symbol) {
const headers = { 'X-Api-Key': 'YOUR_API_KEY' };
// const symbol = 'ETHUSD';
const url = `https://api.api-ninjas.com/v1/cryptoprice?symbol=${symbol}`;
const quoteData = await requestUrl({ url: url, headers });
console.log(quoteData);
@ms3056
ms3056 / openWeather.js
Last active March 7, 2023 00:28
Obsidian Weather Snippet
async function start(city) {
const apiKey = 'your_api_key';
const url = `https://api.openweathermap.org/data/2.5/weather?q=${city}&appid=${apiKey}&units=metric`;
const quoteData = await requestUrl({ url });
console.log(quoteData);
if (quoteData.status >= 400 && request.throw) {
console.log(quoteData);
return `*Something went wrong!*`;
}