Skip to content

Instantly share code, notes, and snippets.

{
"app": "page-markdown-extractor",
"type": "extract-rules",
"version": 1,
"exportedAt": "2026-08-20T10:58:56.567Z",
"rules": [
{
"id": "jike",
"name": "jike",
"enabled": true,
@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
@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 / 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
payload:
- '+.openai.com'
- '+.sentry.io'
- '+.oaistatic.com'
- '+.livekit.cloud'
- '+.oaiusercontent.com'
- '+.ai.com'
- '+.openai.com.cdn.cloudflare.net'
- 'openaiapi-site.azureedge.net'
- 'openaicom-api-bdcpf8c6d2e9atf6.z01.azurefd.net'
#!/bin/bash
if ! command -v ffmpeg &> /dev/null
then
echo "ffmpeg could not be found"
echo "installing ffmpeg"
apt install ffmpeg -y
fi
if ! command -v whisper &> /dev/null
@6david9
6david9 / v2ex_cell.js
Last active April 14, 2023 05:40
simplify timeline cell.
// ==UserScript==
// @name v2ex_cell
// @namespace http://tampermonkey.net/
// @version 0.1
// @description simplify timeline cell.
// @author 6david9
// @match https://*.v2ex.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=v2ex.com
// @require https://code.jquery.com/jquery-3.6.3.min.js
// @run-at document-idle
@6david9
6david9 / v2ex.js
Last active January 20, 2023 04:17
remove background image.
// ==UserScript==
// @name v2ex
// @namespace http://tampermonkey.net/
// @version 0.1
// @description remove background image.
// @author 6david9
// @match https://*.v2ex.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=v2ex.com
// @grant none
// @run-at document-idle
// ==UserScript==
// @name v2ex_comment
// @namespace http://tampermonkey.net/
// @version 0.1
// @description simplify comment cell.
// @author 6david9
// @match https://*.v2ex.com/t/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=v2ex.com
// @require https://code.jquery.com/jquery-3.6.3.min.js
// @grant none
@6david9
6david9 / keybinding.json
Created February 8, 2022 10:20
custom shortcut for karabiner
{
"title": "Custom shortcut",
"maintainer": "ly",
"rules": [
{
"description": "format code in xcode",
"manipulators": [
{
"type": "basic",
"from": {