Skip to content

Instantly share code, notes, and snippets.

View egouldo's full-sized avatar

Elliot Gould egouldo

View GitHub Profile
@QWxleA
QWxleA / Readme.md
Last active May 13, 2025 13:48
Obsidian zotero template for use with "obsidian-zotero-integration" plugin

QWxlea's over-engineered zotero template

Faq

What are these %% begin id-pn2xitti%% and %% end id-pn2xitti %% and ^pn2xitti? These are the persistance-markers of the indivual highlights, and the reference-id to that highlight.

The markers are meant for the importer. It will skip all text within those markers, so they stay when updating a zotero-import. Removing a marked block does not work well, it will not be reimported. Don't know how to fix that. If you want to reimport a highlight-block, best is to change the highlight in zotero (for example change the color). This will update the id, and on the next import the new highlight will be imported.

The reference-id is used like this: [[@name-of-the-note#^pn2xitti]]

@MichaTarlton
MichaTarlton / Beginner's set up for AidenLXs Zotero Integration Plugin.md
Last active April 4, 2025 02:16
Beginner's set up for AidenLX’s Zotero Integration Plugin

Beginner's set up for AidenLX’s Zotero Integration Plugin

The current official documentation is incomplete, and inaccessible for most users, however I believe it is the best zotero integration so far, if only it can eventually match the features of Bibnotes Formatter. I want to make a simple guide for users who want to quickly set up the plugin with simple use cases.

In this guide I will distill what I gathered from a day of going through the Obsidian forum thread, the github discussions and issues pages, the API guide from the documentation, and brute-force trial and error. Much of the api stuff will require knowledge of eta and javascript, which unfortunately I have limited experience with. Perhaps others can chime in and

@TheSherlockHomie
TheSherlockHomie / RenewExpiredGPGkey.md
Created January 3, 2021 16:36
Updating expired GPG keys and backing them up 🔑🔐💻

Updating expired GPG keys and their backup 🔑🔐💻

I use a GPG key to sign my git commits.

An error like this one might be a sign of an expired GPG key.

error: gpg failed to sign the data fatal: failed to write commit object
tell application "Bookends"
set theIDs to «event ToySRUID» "Selection"
repeat with theID in paragraphs of theIDs
tell front library window
try
set myRefs to (publication items whose id is theID)
set myItem to first item of myRefs
set thePath to path of attachment items of myItem
tell application "Bookends"
tell front library window
set theIDs to get id of publication items of group item "Unlinked Attachments"
repeat with theID in theIDs
try
set myRefs to (publication items whose id is theID)
set myItem to first item of myRefs
set {theKey, thePath, theAuthor, theEditor, theTitle} to {citekey, path of attachment items, authors, editors, title} of myItem
if theAuthor = "" then set theAuthor to theEditor
set theRIS to format myItem using "RIS.fmt"
@egouldo
egouldo / countsToCases.R
Last active July 24, 2017 11:14
Convert contingency table (counts) to cases
# Source: http://www.cookbook-r.com/Manipulating_data/Converting_between_data_frames_and_contingency_tables/#countstocases-function
# Convert from data frame of counts to data frame of cases.
# `countcol` is the name of the column containing the counts
countsToCases <- function(x, countcol = "Freq") {
# Get the row indices to pull from x
idx <- rep.int(seq_len(nrow(x)), x[[countcol]])
# Drop count column
x[[countcol]] <- NULL
@jennybc
jennybc / photo-gallery-README.R
Last active April 3, 2022 19:21
Generate a photo-gallery README for a directory of figs
@stla
stla / global.R
Created November 6, 2013 10:51
Shiny: dynamic number of tabs and tab-dependent UI in the sidebar
## generates two datasets for illustration
I <- 3 # nb tests
J <- 4 # nb timepoints
dat1 <- data.frame(
Test=gl(I,J,labels=LETTERS[1:I]),
timepoint=rep(1:J,I)
)
dat1 <- transform(dat1, y=round(rnorm(I*J,2*timepoint),1))
I <- 5 # nb tests
J <- 3 # nb timepoints
@Thell
Thell / Exmple.Rmd
Created June 20, 2013 23:59
R markdown to illustrate creation of in-document referencing for chunks, sections, pages, and such.
```{r setup, echo=FALSE, results='hide'}
chunkref <- local({
function(chunklabel) {
sprintf('[%s](#%s)', chunklabel, chunklabel )
}
})
secref <- local({
function(seclabel) {
sprintf('[%s](#%s)', seclabel, seclabel )