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
#!/usr/bin/env python3 | |
# SBDiff v25.02 | |
# See https://gist.github.com/Tobiaqs/3b37a3ce35d81237b597c6a2f9ce8e3b for the current version | |
import os | |
import shlex | |
import subprocess | |
import sys |
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
Show hidden characters
// OS Standardized VSCode Extensions v24.10.5 | |
// https://gist.github.com/Tobiaqs/f46c992d3fb7db3aefb98efc6124464a | |
// | |
// These recommended extensions are essential for proper formatting of your code. | |
// Please install them. | |
{ | |
"recommendations": [ | |
"dbaeumer.vscode-eslint", | |
"charliermarsh.ruff", | |
"Vue.volar", |
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
{ | |
// OS Standardized VSCode Settings v25.02 | |
// https://gist.github.com/Tobiaqs/2514a9eba87f9e30dbb50439da67d3ca | |
// | |
// For necessary extensions, see https://gist.github.com/Tobiaqs/f46c992d3fb7db3aefb98efc6124464a | |
"python.autoComplete.extraPaths": [ | |
"backend/apps", | |
"backend/modules" | |
], | |
"python.analysis.packageIndexDepths": [{ "name": "django", "depth": 4 }], |
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
// ==UserScript== | |
// @name Notion Alt+C print published page | |
// @namespace https://leanslate.nl/ | |
// @version 2024-05-29 | |
// @description Use Alt+C to properly print a PDF from a published Notion page | |
// @author Tobias | |
// @match https://*.notion.site/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=notion.so | |
// @grant none | |
// ==/UserScript== |
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
# Based on https://gist.github.com/cjies/cc014d55976db80f610cd94ccb2ab21e | |
import base64 | |
import ecdsa | |
def generate_vapid_keypair(): | |
""" | |
Generate a new set of encoded key-pair for VAPID | |
""" | |
pk = ecdsa.SigningKey.generate(curve=ecdsa.NIST256p) |
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
import puppeteer from 'puppeteer' | |
;(async () => { | |
// Launch the browser and open a new blank page | |
const browser = await puppeteer.launch() | |
const page = await browser.newPage() | |
// Navigate the page to a URL | |
await page.goto('https://mijn.kpn.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
// Needs "@heroicons/vue": "2.x" | |
import * as heroiconsSolid16 from '@heroicons/vue/16/solid' | |
import * as heroiconsSolid20 from '@heroicons/vue/20/solid' | |
import * as heroiconsOutline24 from '@heroicons/vue/24/outline' | |
import * as heroiconsSolid24 from '@heroicons/vue/24/solid' | |
function getHeroicon<T extends keyof typeof heroiconsSolid16>(size: 'solid16', name: keyof typeof heroiconsSolid16): (typeof heroiconsSolid16)[T] | |
function getHeroicon<T extends keyof typeof heroiconsSolid20>(size: 'solid20', name: keyof typeof heroiconsSolid20): (typeof heroiconsSolid20)[T] | |
function getHeroicon<T extends keyof typeof heroiconsSolid24>(size: 'solid24', name: keyof typeof heroiconsSolid24): (typeof heroiconsSolid24)[T] |
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
/// store.ts | |
import { InjectionKey } from 'vue' | |
import { createStore, mapState as baseMapState, Store, useStore as baseUseStore } from 'vuex' | |
const modules = { | |
appDataModule, | |
} | |
const state = { | |
settings: <Settings | null>null, |
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
#!/bin/bash | |
r=255 | |
g=255 | |
b=255 | |
function apply () { | |
echo -n "Enter brightness [0, 1]: " | |
read brightness | |
while read display; do |
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
#!/usr/bin/env python3 | |
import json | |
import os | |
import subprocess | |
import sys | |
import yaml | |
if len(sys.argv) <= 1: |
NewerOlder