Skip to content

Instantly share code, notes, and snippets.

View trappitsch's full-sized avatar

Reto Trappitsch trappitsch

View GitHub Profile
@trappitsch
trappitsch / README.md
Created April 26, 2023 12:01
Automatic labeling of an Inkscape map

Automatic Inkscape labels

This gist describes how to automatically features in an images with labels. It is intended in the case where you have a an image, i.e., an SEM map of a sample mount and SEM stage coordinates with features that you wnat to label.

What you will need:

  • An image / map with features to map
  • A table with labels for the features and stage coordinates
@trappitsch
trappitsch / README.md
Created September 6, 2023 12:08
The day the Earth stood still

The day the Earth stood still

The source code in this gist go together with this mind bytes post.

The two additional files are

  • suncrash.py: Ultimate implementation of the problem in python
  • main.rs: Same implementation as suncrash.py in Rust
@trappitsch
trappitsch / README.md
Last active April 8, 2024 14:48
Bash script to copy binary into place

Bash script to copy binary into place from shell

This is a simple bash script that does the following:

  • Define an installation name and a path
  • Check if the user likes the default path or not
  • Check if installation / copy folder requires root access
  • Check if installation file already exists and if it does, ask if it should be overwritten
  • If all checks pass, the binary content below the line #__PROGRAM_BINARY__ are copied into the file at the given location and it is made executable
@trappitsch
trappitsch / README.md
Last active January 14, 2025 11:51
PyApp packaging for air-gapped computers

Package PyApp app with batteries included

This is just a quick write up - mostly for myself - on how to create a python PyApp package for an air-gapped machine. This means that all dependencies, etc., will be included.

@trappitsch
trappitsch / ar_sputter_clean.md
Last active June 24, 2024 13:53
Ar sputter cleaning of gold foils

Ar sputter cleaning of gold mounts

Here are some calculations that I used to determine how long to sputter clean gold foils with an Ar ion beam, depending on current and beam size. These gold foils were subsequently used to mount presolar SiC grains.

Used equipment:

  • Hiden Analytical gas gun, loaded with Ar

Some constants for gold