Skip to content

Instantly share code, notes, and snippets.

@flegfleg
flegfleg / Logseq+Hookmark.scpt
Last active October 30, 2024 09:39
Logseq Hookmark integration Applescript
-- Logseq Hookmark integration via Applescript
-- Copies Links to pages only, not blocks.
-- Paste this into Hook -> Preferences -> Scripts -> Logseq -> Get Address
tell application "System Events"
set the clipboard to ""
delay 0.5
-- You need to set a keyboard shortcut for "Copy page Url" in Logseq
-- Here: CMD + CTRL + SHIFT + U
@chrisgrieser
chrisgrieser / metadata-refactor.sh
Last active May 11, 2024 05:54
Change Wikilinks in YAML Frontmatter from the Breadcrumbs style to the new Obsidian Metadata Style
# macOS
cd "path/to/your/vault"
awk 'FNR <= 1 && /^---$/{print FILENAME}' **/*.md |
xargs -I {} sed -i '' -E '1,/^---$/ s/(\[\[.*]])/"\1"/g' "{}"
# Linux (or macOS users with GNU sed)
cd "path/to/your/vault"
awk 'FNR <= 1 && /^---$/{print FILENAME}' **/*.md |
xargs -I {} sed -i -E '1,/^---$/ s/(\[\[.*]])/"\1"/g' "{}"
## Tab Manager In Side Panel Privacy Disclaimer
This extension only collect some personal or sensitive data from your browser activity, such as the URLs or domains you visit.
We collect this data to provide you with the functionality of our extension: a simple but powerful tab manager in side panel for chrome.
We do not sell, share or disclose your data to any third parties.
We only use your data locally and only for as long as necessary to provide our service.
@extratone
extratone / ddstuff.json
Created March 14, 2023 21:13
A gray-er light theme (for Drafts) inspired by Things 3's light appearance with certain taken liberties.
{
"isDark" : false,
"author" : "David Blue",
"colors" : {
"editor" : {
"codeBackground" : "#f2f3f4",
"headingMarkup" : "#a2a3a6",
"accent02" : "#cdc080",
"link" : "#5281b1",
"code" : "#5f6165",
@Quorafind
Quorafind / AskChatGPT-With-Surfing.js
Created February 19, 2023 11:20
Using Quickadd to ask current selection In ChatGPT
// Version 0.0.1
module.exports = askChatWithPrompt;
function askChat(str, app) {
const prompt = encodeURI(str);
const chatViewEl = app.workspace.getLeavesOfType("surfing-view").find((item)=>{ return /chat\.openai\.com/.test(item?.view?.currentUrl)}).view.webviewEl;
chatViewEl.executeJavaScript(`
var htmlElement = document.querySelector("textarea");
htmlElement.value = decodeURI("${ prompt }");
@vitorgalvao
vitorgalvao / Open New Tab In Specific Browser.js
Created February 11, 2023 19:01
JavaScript for Automation (JXA) for opening a new tab in different browsers
// JavaScript for Automation (JXA) for opening a new tab in different browsers.
// Doing an "open 'https://example.com/'" and letting macOS handle it is usually preferable,
// but sometimes you want to specifically open a tab in a browser which is not the default.
// Chromium-based browsers
// Other examples include "Brave Browser", "Vivaldi"
const browser = Application("Google Chrome")
const newTab = browser.Tab({ url: "https://example.com/" })
@Sherman5A
Sherman5A / grub.cfg
Last active December 6, 2022 23:06
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
@Sherman5A
Sherman5A / .config
Last active December 6, 2022 23:06
.config
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 6.0.11 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 12.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=120200
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=23900
@extratone
extratone / DevtoShortcutsCaptureExample.md
Created October 24, 2022 21:17
Example results from my "Dev Community Article ⇨ Drafts" Siri Shortcut.
@parterburn
parterburn / custom_warp_script.applescript
Created September 27, 2022 16:51
An easy way to use the Warp terminal (https://www.warp.dev/) with Alfred.
-- For the latest version:
-- https://gist.github.com/parterburn/e832b9090ee35eb830529de8bd978b82
-- Set this property to true to always open in a new window
property open_in_new_window : false
-- Set this property to false to reuse the current tab
property open_in_new_tab : true
-- Handlers