Skip to content

Instantly share code, notes, and snippets.

Avatar

Axel Huebl ax3l

View GitHub Profile
View CUDA_Compilers.md
@ax3l
ax3l / CXXdefaults.md
Last active Jul 21, 2021
Compiler C++ Version Defaults
View CXXdefaults.md

C++ -std=... default of various commonly used C++ compilers

Compiler Version __cplusplus
g++ 4.7.4 199711L
5.5.0 199711L
6.1.0 201402L
10.2 201402L
11.1.0 201703L
clang++ 3.4.2 199711L
@ax3l
ax3l / CMakeLists.txt
Last active May 14, 2021
openPMD-api usage example: CMake
View CMakeLists.txt
cmake_minimum_required(VERSION 3.11)
project(openPMD_test)
add_executable(mytest main.cpp)
target_compile_features(mytest PRIVATE cxx_std_14)
find_package(openPMD REQUIRED CONFIG)
target_link_libraries(mytest PRIVATE openPMD::openPMD)
@ax3l
ax3l / PythonTiff.md
Last active Feb 15, 2021
Python: Write tif
View PythonTiff.md
@ax3l
ax3l / compound_complex_fortran2003.f90
Created Feb 4, 2021
HDF5: Complex Types (Fortran 2003)
View compound_complex_fortran2003.f90
! This is the F2003 version of the h5_compound.c example source code.
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
! Copyright by the Board of Trustees of the University of Illinois. *
! All rights reserved. *
! *
! This file is part of HDF5. The full HDF5 copyright notice, including *
! terms governing use, modification, and redistribution, is contained in *
! the files COPYING and Copyright.html. COPYING can be found at the root *
! of the source code distribution tree; Copyright.html can be found at the *
! root level of an installed copy of the electronic HDF5 document set and *
@ax3l
ax3l / symbols_cpp.md
Last active Dec 28, 2020
Symbol Visibility 101 by Boris Staletic @bstaletic
View symbols_cpp.md

Visible Symbols in C++ Projects

Intro

This is a spontaneous and verbatime log of a conversion with Boris Staletic @bstaletic from March, 24th 2018 on the pybind11 gitter. Thank you so much, Boris!

To confuse future readers, we decided to write down the discussion and I added typos and unnecessarily long sentences.

The issue came up with linking a CMake (library) target into a pybind11 module (in openPMD-api).

@ax3l
ax3l / latexGitHub
Last active Dec 12, 2020
Latex in GitHub Markdown
View latexGitHub
**URLEncode** Latex Formula -> [http://meyerweb.com/eric/tools/dencoder/]
Create Link:
```markdown
![My Formula](http://latex.codecogs.com/gif.latex?<URLEncodedLaTeX>)
or
![My Formula](https://chart.googleapis.com/chart?cht=tx&chl=<URLEncodedLaTeX>)
```
@ax3l
ax3l / noglobal.py
Last active Dec 11, 2020
Useful Noglobal in Python
View noglobal.py
# License:
# I hereby state this snippet is below "threshold of originality" where applicable (public domain).
#
# Otherwise, since initially posted on Stackoverflow, use as:
# CC-BY-SA 3.0 skyking, Glenn Maynard, Axel Huebl
# http://stackoverflow.com/a/31047259/2719194
# http://stackoverflow.com/a/4858123/2719194
import types
@ax3l
ax3l / streaming.md
Last active Sep 1, 2020
Streaming Magic
View streaming.md

Streaming Magic

This gist contains cmd line streaming magic.

Create a virtual cam with the desktop as the input

For a 1280x1024 desktop:

sudo modprobe v4l2loopback devices=1
@ax3l
ax3l / bashrc
Last active Jun 30, 2020
multiple_pkg_managers
View bashrc
# snippet for file: $HOME/.bashrc
#
# License: CC0
#
# register a bash function that calls the script above
activate-env () {
. $HOME/bin/impl-activate-env $@
}