Skip to content

Instantly share code, notes, and snippets.

@ms3056
ms3056 / Proeprties.css
Created October 29, 2024 06:54
Fold/Unfold Properties for Obsidian
/* ========== */
/* Properties */
/* ========== */
.metadata-content .text-button-icon {
transform: translateY(-0.5em) translateX(-0.2em);
color: hsla(
calc(var(--accent-h) + 0),
calc(var(--accent-s) + 0%),
calc(var(--accent-l) + 10%),
@ms3056
ms3056 / gist:a488886883bf13cd6fdcefe226b0201d
Last active August 26, 2024 04:28
Outlook Calendar Macro → Markdown
#If VBA7 Then
Private Declare PtrSafe Function OpenClipboard Lib "user32" (ByVal hWnd As LongPtr) As Long
Private Declare PtrSafe Function EmptyClipboard Lib "user32" () As Long
Private Declare PtrSafe Function CloseClipboard Lib "user32" () As Long
Private Declare PtrSafe Function SetClipboardData Lib "user32" (ByVal wFormat As Long, ByVal hMem As LongPtr) As LongPtr
Private Declare PtrSafe Function GlobalAlloc Lib "kernel32" (ByVal wFlags As Long, ByVal dwBytes As LongPtr) As LongPtr
Private Declare PtrSafe Function GlobalLock Lib "kernel32" (ByVal hMem As LongPtr) As LongPtr
Private Declare PtrSafe Function GlobalUnlock Lib "kernel32" (ByVal hMem As LongPtr) As Long
Private Declare PtrSafe Function lstrcpy Lib "kernel32" (ByVal lpString1 As Any, ByVal lpString2 As Any) As LongPtr
#Else
@ms3056
ms3056 / README.md
Last active September 8, 2024 09:02
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 September 22, 2024 03:55
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!*`;
}