Skip to content

Instantly share code, notes, and snippets.

View somidad's full-sized avatar

Seokseong Jeon somidad

View GitHub Profile
@somidad
somidad / file-saver.jsx
Last active November 6, 2023 12:47
Simple FileSaver.js (https://www.npmjs.com/package/file-saver) example
import { saveAs } from "file-saver";
function DownloadContent() {
const download = () => {
const blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"});
saveAs(blob, "hello, world.txt");
}
return (
<button onClick={download}>Download</button>
)
@somidad
somidad / README.md
Last active March 20, 2024 15:05
GitHub adds `user-content-` prefix to custom ID
@somidad
somidad / README.md
Last active March 21, 2024 13:13
Enable a link to a block in a note using Obsidian GitHub Publisher

Same article on dev.to

TL;DR

Here's my configuraiton (in data.json):

    "censorText": [
      {
 "entry": "/ (\\^\\w+)$/gm",
@somidad
somidad / obsidian-code-block-scroll.css
Last active March 21, 2024 23:30
Stop Obsidian wrapping code and enable scrolling
/* same article on [dev.to](https://dev.to/somidad/stop-obsidian-wrapping-code-and-enable-scrolling-47oo) */
/* it only works on Reading view */
/* https://forum.obsidian.md/t/horizontal-scrolling-in-the-code-block/55789/2 */
.markdown-rendered code {
white-space: pre;
}
@somidad
somidad / 00-how-to.md
Last active July 20, 2024 13:04
CSS snippets for folder and file icons on Obsidian file explorer

How to:

  1. Visit https://lucide.dev/icons/
  2. Pick and click an icon you like
  3. Click 'Copy SVG' button
  4. Replace <svg ...></svg> with copied code
  5. Adjust size (width="24" height="24")
  6. Adjust stroke color (stroke="currentColor")
  7. Adjust margin-inline-start. It determines indentation level of file entry
  8. Adjust margin-right. It is space between icon and text
@somidad
somidad / hide-amplenote-subscription-banner.tampermonkey.js
Created April 22, 2025 00:10
Tampermoneky script to hide Amplenote subscription banner
// ==UserScript==
// @name Hide Amplenote Subscription banner
// @namespace http://tampermonkey.net/
// @version 2024-12-18
// @description try to take over the world!
// @author You
// @match https://www.amplenote.com/notes*
// @icon https://www.google.com/s2/favicons?sz=64&domain=amplenote.com
// @grant none
// ==/UserScript==