Skip to content

Instantly share code, notes, and snippets.

View ax3l's full-sized avatar

Axel Huebl ax3l

View GitHub Profile
@bmcbm
bmcbm / setup-nvdia-suspend.sh
Last active August 8, 2026 21:50
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 August 13, 2026 20:21
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
@khaeru
khaeru / inline.py
Last active October 14, 2019 18:36
Copy inline documentation to Sphinx source tree
"""Crude Sphinx extension for inline documentation.
© 2019 Paul Natsuo Kishimoto <mail@paul.kishimoto.name>
Licensed under the GNU GPLv3: https://www.gnu.org/licenses/gpl-3.0.html
Star: https://gist.github.com/khaeru/3185679f4dd83b16a0648f6036fb000e
Enable by adding to conf.py::
sys.path.append('path/to/this/file')
extensions.append('inline')
// This is how we run libc++ tests on the GPU without modification.
// We force include this header into each test with `-include`.
__host__ __device__
int fake_main(int, char**);
__global__
void fake_main_kernel(int * ret)
{
*ret = fake_main(0, NULL);
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jrhemstad
jrhemstad / ninja_instructions.md
Last active December 8, 2025 20:55
How to build with Ninja

How to Use Ninja

  1. Install Ninja
sudo apt install ninja-build
  1. Configure CMake to create Ninja build files
mkdir build &amp;&amp; cd build
@jarmitage
jarmitage / cling_bela.md
Created April 11, 2019 17:42
Using the Cling C++ Interpreter on the Bela Platform
@zealot128
zealot128 / README.md
Last active April 5, 2025 19:35
Gitlab runner with docker by cloud init on Hetzner Cloud

Quick Terraform script to deploy Gitlab runner with docker onto Hetzner Cloud (Hcloud)

  1. Create other terraform stuff
  • tf-backend,
  • creds.auto.tfvars with hcloud_token
  • ssh key: mkdir keys; ssh-keygen -f id_rsa
  1. modify cloudinit.yml:
  • change gitlab url
  • ADD_YOUR_REGISTRY_TOKEN -> Set to the Gitlab Runner Registration Token
  • Add more allowed images/services, if using gitlab registry, like that: registry.myinstance.com/administrators/docker-images/*, change base image etc.