Skip to content

Instantly share code, notes, and snippets.

View ax3l's full-sized avatar
🍼
On Parental Leave until June 16th

Axel Huebl ax3l

🍼
On Parental Leave until June 16th
View GitHub Profile
@IanColdwater
IanColdwater / twittermute.txt
Last active April 14, 2025 16:31
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 <[email protected]>
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.
@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.
@McMartin
McMartin / .travis.yml
Created February 10, 2019 22:10
xcrun on Travis CI
language: cpp
install:
- which xcrun
script:
- xcrun --help
- xcrun --show-sdk-path || true
- xcrun --show-sdk-version || true
@jsomers
jsomers / websockets.md
Created September 27, 2018 12:50
Using websockets to easily build GUIs for Python programs

Using websockets to easily build GUIs for Python programs

I recently built a small agent-based model using Python and wanted to visualize the model in action. But as much as Python is an ideal tool for scientific computation (numpy, scipy, matplotlib), it's not as good for dynamic visualization (pygame?).

You know what's a very mature and flexible tool for drawing graphics? The DOM! For simple graphics you can use HTML and CSS; for more complicated stuff you can use Canvas, SVG, or WebGL. There are countless frameworks, libraries, and tutorials to help you draw exactly what you need. In my case, this was the animation I wanted:

high-priority

(Each row represents a "worker" in my model, and each rectangle represents a "task.")

@SimeonEhrig
SimeonEhrig / clingArgs.md
Last active November 13, 2019 08:39
Get arguments of a cling interpreter instance with reflection

To get the arguments of cling, which are passed on start, you can use the reflection feature of cling.

#include "cling/Interpreter/Interpreter.h"
#include "cling/Interpreter/InvocationOptions.h"

// gCling is an object of type cling::Interpreter
std::vector<const char*> remaining = gCling->getOptions().CompilerOpts.Remaining;
remaining