Skip to content

Instantly share code, notes, and snippets.

View acsr's full-sized avatar

Armin Stross-Radschinski acsr

View GitHub Profile
@acsr
acsr / CopyMailOutFoldername2Clipboard.applescript
Last active January 12, 2017 20:42
Generate a normalised MacOSX foldername from a selected outgoing item in apple mail
(*
CopyMailOutFoldername2Clipboard.applescript
https://gist.github.com/acsr/59d047367d04564c09b3d7ab517bcf48
V 1.03 Copyright © 2009-2017 ACSR Industrialdesign – Armin Stross-Radschinski, developer@acsr.de
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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.
@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;
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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
@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 / 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 / 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 / Zotero-BetterBibTeX-QuickCopy-eta-template.eta
Last active May 24, 2024 19:02
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)
}