Skip to content

Instantly share code, notes, and snippets.

View corusm's full-sized avatar
:octocat:
computerei

Niklas Leinz corusm

:octocat:
computerei
View GitHub Profile
@FeralFlora
FeralFlora / 01 Zotero Integration import template and more!.md
Last active October 3, 2024 10:23
Zotero import template for the Zotero integration plugin for Obsidian. Screenshots and usage guide over in the Obsidian forum here: https://forum.obsidian.md/t/zotero-integration-import-templates/36310/105?u=feralflora
  • ZI-main.md
    • The main Zotero Integration template
  • runImport.md
    • Template that enables updating literature notes at the click of a button, and much more.
  • Meta bind button template
    • Template for in-note button that executes runImport.md
@QWxleA
QWxleA / Readme.md
Last active October 7, 2024 21:15
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]]

@tae-jun
tae-jun / Dockerfile
Last active October 3, 2024 11:02
Deploy NVIDIA+PyTorch container using Dockerfile & docker-compose
ARG UBUNTU_VERSION=18.04
ARG CUDA_VERSION=10.2
FROM nvidia/cuda:${CUDA_VERSION}-base-ubuntu${UBUNTU_VERSION}
# An ARG declared before a FROM is outside of a build stage,
# so it can’t be used in any instruction after a FROM
ARG USER=reasearch_monster
ARG PASSWORD=${USER}123$
ARG PYTHON_VERSION=3.8
# To use the default value of an ARG declared before the first FROM,
# use an ARG instruction without a value inside of a build stage:
@peterhurford
peterhurford / install_xelatex_on_mac.txt
Last active October 4, 2024 12:08
How to install latex and xelatex on Mac so that Jupyter "Download as PDF" will work
brew install pandoc
brew tap homebrew/cask
brew install --cask basictex
eval "$(/usr/libexec/path_helper)"
# Update $PATH to include `/usr/local/texlive/2022basic/bin/universal-darwin`
sudo tlmgr update --self
sudo tlmgr install texliveonfly
sudo tlmgr install xelatex
sudo tlmgr install adjustbox
sudo tlmgr install tcolorbox
version: '3'
services:
webapp:
image: containous/whoami
# Move this directive under the "deploy:" if you are deploying to swarm instead of standalone Docker Engine
labels:
# Traefik v1
- "traefik.frontend.rule=Host:whoami.localhost"
# Traefik v2
# Install these packages (use your favorite AUR tool here)
yay -S minikube kubectl docker-machine-driver-kvm2 libvirt qemu-headless ebtables
# Get libvirt going
sudo systemctl enable libvirtd.service
sudo usermod -a -G libvirt $(whoami)
# This fix thanks to http://blog.programmableproduction.com/2018/03/08/Archlinux-Setup-Minikube-using-KVM/
sudo virsh net-autostart default
@ScriptingSquirrel
ScriptingSquirrel / export-node-stats.md
Last active April 4, 2023 02:18
Setup prometheus-node-exporter and push stats to Pushgateway with cron job

(Assuming a Debian 8-like system)

  • Install prometheus-node-exporter

    $ sudo apt update && sudo apt install prometheus-node-exporter
  • Configure prometheus-node-exporter to expose metrics only to localhost, not on to all networks. Modify file /etc/default/prometheus-node-exporter:

    # Set the command-line arguments to pass to the server.
@yangxuan8282
yangxuan8282 / Dockerfile.dnsmasq
Last active September 27, 2022 10:52
pi netboot with docker
FROM arm32v6/alpine
RUN apk add --no-cache dnsmasq
EXPOSE 53/tcp \
53/udp \
67/udp
ENTRYPOINT ["dnsmasq", "--no-daemon", "--user=dnsmasq", "--group=dnsmasq"]
@jaytaylor
jaytaylor / delete-from-v2-docker-registry.md
Last active October 20, 2024 09:29
One liner for deleting images from a v2 docker registry

One liner for deleting images from a v2 docker registry

Just plug in your own values for registry and repo/image name.

registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
    curl -sSL -I \
        -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
@ForgottenUmbrella
ForgottenUmbrella / publish_python.md
Last active September 24, 2024 10:14
How to publish Python apps for human beings

How to publish Python apps for human beings

So, you've created a Python app (be it a graphical user interface with Qt or the like, or a simple command line interface). Great! But how are others going to use it? Python applications often have dependencies (e.g. from third-party modules), and they also need a Python interpreter to run them. For a developer, installing all the necessary bits and bobs to make things work is okay, but that's unacceptable for a normal user - they just want to download the thing and run it.

Below are simple instructions to publish your app on the three main operating systems: Windows, macOS and Linux.