Skip to content

Instantly share code, notes, and snippets.

View acsr's full-sized avatar

Armin Stross-Radschinski acsr

View GitHub Profile
@acsr
acsr / Get_IMAP_account_subfolder_path.scpt
Created January 8, 2024 16:40
get the full IMAP path of an selected email in Apple Mail.app with the accountname as prefix. Display result as dialog with option to copy the text to the clipboard
(*
Applescript:
Get_IMAP_account_subfolder_path.scpt
V 1.0.0 Copyright © 2009-2024 ACSR Industrialdesign. 20240108 17:21:17 acsr Armin Carl Stroß-Radschinski
You may incorporate this code into your program(s) without
restriction. This ACSR sample code has been provided "AS IS" and the
responsibility for its operation is yours. You are not permitted to
redistribute this ACSR sample code as "ACSR sample code" after having
@acsr
acsr / Remove macOS Screenshot DE Timestamp.py
Created November 9, 2023 15:51
Filter out the [[datetime]] default String for MacOS DE from a [[Screenshot]] (code for insertion in Automator Workflow as Service)
#!/usr/bin/env python3
"""Remove macOS Screenshot DE Timestamp.py
Filter out the [[datetime]] default String for MacOS DE from a [[Screenshot]]
@Copyright 2023 by Armin Stross-Radschinski, ACSR industrialdesign developer@acsr.de
Licence: MIT, do what you like
Have fun
@acsr
acsr / Zotero-BetterBibTeX-QuickCopy-eta-template.eta
Last active April 3, 2024 12:31
Enhanced eta-template to export multiple Zotero items for pasting into Logseq including title, url, creators, tags, select link, abstractNote, multiple notes, multiple relations and the rights. Code completely rewritten after support by Emiliano Heyns and his update of the code of his Zotero AddOn BetterBibTeX
<%- for (const item of it.items) {
const [ , kind, lib, key ] = item.uri.match(/^https?:\/\/zotero\.org\/(users|groups)\/((?:local\/)?[^/]+)\/items\/(.+)/)
const select = (kind === 'users') ? `zotero://select/library/items/${key}` : `zotero://select/groups/${lib}/items/${key}`
const relations = []
if (item.relations) {
for (const [kind, rels] of Object.entries(item.relations)) {
for (const rel of rels) {
relations.push(rel)
}
@acsr
acsr / TextWrapper.py
Created August 1, 2023 19:25
Textwrapper Pythonista Script to add surrounding Brackets etc. to selected text
#!python3
'''
This is one of the simplest examples for the Pythonista Keyboard.
It puts a wrapper around the selection or adds the pair to the cursor position,
e.g. some brackets.
You need to add exactly two arguments to the calling shortcut button seperated by a space.
The script takes the first and puts it in fromnt of the selection, and the seacond after the selection.
@acsr
acsr / Logseq_tags_to_Zotero.workflow.py
Last active June 22, 2023 08:25
Two Python based Automator Workflows to convert selected text containing tags between different tag listing formats (Zotero newline seperated clipboard from Zutilo to Logseq tag & pagelink properties list). Tries to recognize all simple tags in single line starting with "tags:: " or in bunch of Logseq Blocks (fails on some).
#!/usr/bin/env python3
"""Logseq_tags_to_Zotero.workflow.py
Functions to convert a selected text containing Logseq tags to a different tag listing format (Zotero).
Currently aiming at bidirectional converting between Zotero and Logseq.
This is Work-in-Progress and may contain traces of nuts!
@Copyright 2023 by Armin Stross-Radschinski, ACSR industrialdesign developer@acsr.de
Licence: MIT, do what you like
@acsr
acsr / logseq-custom.css
Last active April 18, 2023 15:02
acsr [[Logseq]] custom.css
/* Public Logseq custom.css file by acsr, Armin Stroß-Radschinski
Licence MIT, do what you want, but quote me
20230418_165949-Rev.2
*/
/* removed for helium plugin
iframe[id^='youtube-player'] {
height: 700px !important;
}*/
@acsr
acsr / SimulateP4DDesktopMouseFunctionKeys.ahk
Last active August 12, 2021 11:28
CycleSpaces P4D Desktop Joystick Mouse Simulation via F1-F4 + F6 for Navigation
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;
;;;;; CycleSpaces P4D Desktop Joystick Mouse Simulation via F1-F4
;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
/*
SimulateP4DDesktopMouseFunctionKeys.ahk script based on:
Windows Scripting Environment: https://www.autohotkey.com
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@acsr
acsr / algolia-sphinx-snippets.css
Created October 26, 2019 08:47
CSS Snippets to fix the Algolia dropdown overlay for the sphinx rtd theme
#bottom-searchbox{
width: 300px;
position: fixed;
top: 0;
left: 0;
padding: 16px 12px 12px 12px;
background-color: #005a8c;
z-index: 1000;
}
@acsr
acsr / inspect_objects.py
Last active January 5, 2021 01:00
patch sphinx.ext.intersphinx output tweaking the main function to using almost csv compatible tab separators instead of columns adjusted by spaces
#!./bin/python
# -*- coding: utf-8 -*-
"""
inspect_objects
based on and requiring sphinx.ext.intersphinx
~~~~~~~~~~~~~~~~~~~~~~
List links to objects documented in as build Sphinx documentation.