Skip to content

Instantly share code, notes, and snippets.

@6david9
6david9 / python_doc.js
Last active April 28, 2024 05:40
add table of contents to python library reference page.
// ==UserScript==
// @name Python doc toc
// @namespace http://tampermonkey.net/
// @version 2024-04-27
// @description Add table of contents to python doc.
// @author You
// @match https://docs.python.org/3/library/*.html
// @icon https://www.google.com/s2/favicons?sz=64&domain=python.org
// @grant none
// @run-at document-idle
@6david9
6david9 / resize-png.rb
Last active November 13, 2024 09:31
Down scale png image from @3x to @2x, @1x
#! /usr/bin/env ruby
require 'mini_magick'
# gem install mini_magick
def resize_image(image_name, output_name)
current_scale = 3
if image_name.include?("@3x")
current_scale = 3
@6david9
6david9 / gist:83bfc499494c3a1bf6742d93d9cb652e
Created November 20, 2024 10:55
open obsidian vault using raycast command
#!/bin/bash
# Raycast Script Command Template
#
# Duplicate this file and remove ".template." from the filename to get started.
# See full documentation here: https://github.com/raycast/script-commands
#
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title obsidian wiki