Skip to content

Instantly share code, notes, and snippets.

@probablykasper
probablykasper / __layout.svelte
Created September 25, 2021 22:40
Svelte/SvelteKit instantly applied theme
<script lang="ts">
import { onMount } from 'svelte'
import { writable } from 'svelte/store'
import type { Writable } from 'svelte/store'
const theme: Writable<string | null> = writable(null)
$: if ($theme) {
document.documentElement.setAttribute('data-theme', $theme)
}
onMount(() => {
@probablykasper
probablykasper / user_md_parser.py
Last active November 1, 2018 22:37
My user_md_parser.py
def user_md_parser(smart_md, md, video_info, url_info):
# smart_md:
# Metadata object created by vidl. Metadata objects can have these properties:
# - title
# - artist
# - album
# - album_artist
# - track_number
# - track_count
# - year
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@probablykasper
probablykasper / config.cson
Last active August 10, 2020 15:54
Atom settings (not sync-settings)
"*":
"advanced-open-file":
createDirectories: true
createFileInstantly: true
"atom-beautify":
general:
_analyticsUserId: "3691ee8b-e10b-4911-993f-41226bb7c8c9"
"atom-material-ui":
colors:
abaseColor: "#2196f3"