Skip to content

Instantly share code, notes, and snippets.

View ax3l's full-sized avatar

Axel Huebl ax3l

View GitHub Profile
@cosmicexplorer
cosmicexplorer / licenses-as-partial-orders.md
Last active August 18, 2022 16:14
A formalization of real-life license compatibility as a directed graph.

An elaboration of concepts proposed in this issue.

Discussion: Licenses as partial orders

Many(/most?) licenses do not adhere to a strict total compatibility ordering; for example, one license may be more strict than another in one regard but less strict in another. This imposes some design constraints on our mechanism for checking compatibility between a package checkout and its dependency:

  1. There is a shared, static set of licenses corresponding to valid SPDX identifiers.
  2. There will be a shared set of requirements that all licenses impose.
  3. Each license declares a set of or "compatibility" relationships to other licenses along the relevant "requirement" axes.
    • This is to say: each or corresponds to exactly one requirement.
  4. Each package checkout declares at most one license.
  5. Each package checkout consumes each of its dependencies in a particular manner, which activates some subset of the license
@tgamblin
tgamblin / fix-emails
Last active March 27, 2022 21:17
fix-emails: change emails in the macOS clipboard to/from Apple Mail/Outlook
#!/usr/bin/python
#
# Run `fix-emails` to change the format of emails in the macOS
# clipboard from Apple Mail to Outlook or vice versa.
#
# You can't copy/paste emails between them by default because their
# formats are different.
#
# Apple mail emails are comma-separated and always use quotes:
# "Last, First" <name@gmail.com>, ...

Makeself generated self-executable installer (see https://makeself.io/), also known by their .run extension, are a common and popular way of packaging.

Put simply, they embed in a single file both the extracting script together with the tar archive with the package. After extracting it, a custom command can be executed (e.g. the actual custom installer).

Use-case

It may be needed in some cases to just get access to a file in the archive embedded in the .run, without having to fully install/extract the package. Makeself gives the ability to pass options to the tar command executed internally, so that it is possible to control the extraction process.

Reference

@nathanieltarshish
nathanieltarshish / network_topology.sh
Last active November 7, 2021 17:24
network topology profiler
#!/bin/sh
Help()
{
# Display Help
echo "Probes the network topology of a SLURM cluster."
echo
echo "Syntax: network_topology.sh [-h -p partition]"
echo "options:"
echo "p only profile specific partition."
@matthewfeickert
matthewfeickert / README.md
Last active March 4, 2024 06:24
Motivation for using Python virtual environments for easy sharing
@bmcbm
bmcbm / setup-nvdia-suspend.sh
Last active April 24, 2024 22:18
NVIDIA Suspend fix
# Use systemd for managing NVIDIA driver suspend in drivers ====>>> PRIOR to version 470 <<<=====
# https://download.nvidia.com/XFree86/Linux-x86_64/450.66/README/powermanagement.html
# https://forums.developer.nvidia.com/t/unable-to-set-nvidia-kernel-module-parameters/161306
# Please note: In Fedora Linux you may need to just install the xorg-x11-drv-nvidia-power pakage
# as sugested by @goombah88 in the comments below.
TMP_PATH=/var/tmp
TMPL_PATH=/usr/share/doc/nvidia-driver-460/
echo "options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=${TMP_PATH}" | sudo tee /etc/modprobe.d/nvidia-power-management.conf
@bencbartlett
bencbartlett / hydrogen_orbitals.nb
Last active November 27, 2021 03:10
Mathematica code for this animation of transitions in hydrogen wavefunctions: https://twitter.com/bencbartlett/status/1287802625602117632
<< MaTeX`
SetOptions[MaTeX, "Preamble" -> {"\\usepackage{color,txfonts}"}];
SetDirectory[NotebookDirectory[]];
Clear[drawLadder];
drawLadder[n_, l_, m_, imsize_: 500] := Module[{maxrungs = 5, mag = 4},
Graphics[{
White, Opacity[1], Thickness[.02], Dashing[None],
Table[Line[{{0, k}, {1, k}}], {k, maxrungs}], (*draw n lines*)
@jglaser
jglaser / blazingsql_on_summit.txt
Last active January 11, 2021 16:29
Build RAPIDS + BlazingSQL on Summit
# Build BlazingSQL + RAPIDS on Summit
# Jens Glaser <glaserj@ornl.gov> July 28 2020
# wherever bif128 occurs below, this refers to the project ID
# replace with yours, e.g. abc123
# est. "pure compile time" 3-4h
$ module list
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet