My first patch to libc++
I listened to an older cppcast episode and it mentioned that the C++17 mathematical special functions are not yet included in llvm’s standard library libc++....
libc++
I listened to an older cppcast episode and it mentioned that the C++17 mathematical special functions are not yet included in llvm’s standard library libc++....
This blog post will discuss enabling a dual build configuration for C++20 modules: Either use old-school header includes (x)or import modules instead.
The output of git calls, e.g. git diff, can be improved. Instead of only showing changed lines it can highlight the parts of a line that actually changed. Se...
VSCode might freeze on a freshly installed Manjaro running XFCE whenever one opens a folder containing a git repository.
Talk: What is Low Latency C++? - Timur Doumler - CppNow 2023
Talk: The Basics of Profiling - Mathieu Ropert - CppCon 2021
C++ code can contain attributes (e.g. [[deprecated]]). These serve different purposes, ranging from silencing compiler warnings to changing optimization stra...
CRTP is infamous for its complexity. You can use C++20 concepts to reimplement the feature.
Talk: CppCon 2014: Walter E. Brown “Modern Template Metaprogramming: A Compendium
C++ is infamous for its overly complex initialization processes. It is even worse than one would anticipate (with basic knowledge of the language). There is ...
Starting to work on a large code base usually involves reading lots of code and building up a mental structure of the code base. There are tools that can aid...
Talk: Expression Templates for Efficient, Generic Finance Code - Bowie Owens - CppCon 2019
Talk: Using std::chrono Calendar Dates for Finance in Cpp - Daniel Hanson - CppCon 2022
Talk: CppCon23: Back to Basics: Forwarding References - How to Forward Parameters in Modern C++ - Mateusz Pusz 2023
Manjaro’s pamac (gui alternative to pacman) does not adhere to the global theme set via the “Appearance” menu. You additionally need to set the GTK_THEME var...
Talk: CppNow23: From Templates to Concepts, slides
One can add custom entries to the program list in graphical desktop environments such as XFCE. You can either right-click on the menu or add a “.desktop” fil...
C++ is infamous for its extremely complex initialization. Since C++11 one can initialize class members directly at point of declaration. The official name is...
_
C++ is on its way to get a placeholder variable _ similar to other languages, e.g., Python, rust.
consteval
vs constexpr
vs runtime functions
There is this in-depth blog post going over consteval, constexpr, and runtime functions.
Were you always intrigued by inline, static, extern keywords in C++? Then look no further. This stackoverflow answer is as short and precise as it can be.
cppiceberg
https://youtu.be/9fRnSQkpNGg Summary: cppcon23 talk about performance impact of mdspan Refresher on mdspanstd::mdspan is a non-owning (!) view of mu...
Assume you have the following error: $ sudo apt upgrade ... 9 packages can be upgraded. Run 'apt list --upgradable' to see them. W: An error occurred duri...
https://youtu.be/VqCkCDFLSsc Tutorial video about using libclang. ~30min from 2013. LibclangLibrary to access clang's AST for source code. Contains ...
Tldr; See recommendations at end. Talk: https://youtu.be/_enXuIxuNV4 Covered topics: </p> 101 of linkers+loaders Detailed comparison of linkin...
Usecase: You want to make use of some system-wide installed library. Install the library using your linux package manager. Most installed libraries can be...
Problem: You installed a new kernel in Manjaro either via GUI tool or via the commandline tool mhwd-kernel. After a restart it usually is selected by defaul...
Use-case: You have a library as source code, want to install it on your system (user-/system-wide), and then make use of it from another place/folder/repo. ...
Old school libraries use splitting into hpp/cpp files. Mayor drawbacks: leaking of macros (hpp can be different at library's consumer side than at library p...
In-depth tutorial: https://www.thegeekstuff.com/2012/08/gprof-tutorial/ Summary: Compile with -pg compiler flag (gcc/clang). Executing binary gives gmon.o...
one can set terminator up to start with pre-defined layout and terminals. important distinction: layout defines where and how a window should be setup and a...
Install mold on your linux box. Enable mold for gcc/clang by supplying -fuse-ld=mold, e.g. clang -fuse-ld=mold a.cpp Enable in CMake by supplying argu...
QuantLib has unit tests built in which are based on Boost Test. How to build: $ cmake --build build --preset=MyPreset$ cmake --build build/MyPreset --targ...
CMake can group settings together via presets. Usage: $ cmake --presets=<PRESET>autocomplete with <tab> key See $<ROOT>/CMakePresets.j...
How to use MS extension store in unbranded VSCode edition (e.g. Manjaro code OSS) $ sudo vim /usr/lib/code/product.json "extensionsGallery": {"serviceUr...
Use case: you have checked out a repo. then forked it and now want to checkout the fork without downloading everything again.Solution: $ git remote renam...
Use case: local commits contain personalized information, i.e. your personal email address, and you want to get rid of them.
Problem The Epson printer is stuck while booting up and shows the message "Set Jig". This can happen for a variety of reasons, mostly because a firmwar...
Problem Inkjet printers, such as Epson ET-2750, dry out quite regular. This results in a clogged printer head which shows as artificats in print outs, e.g...
Problem: You want to switch the repo from a server where you don't have root access to another where you do. Copying from local machine to the new server ...
Setup: You have a local machine which can access a server via ssh (user: git). git is installed on the server. Problem: You setup a git repo locally, star...
Ink-jet printers might dry out if they don't print in regular intervals. The intervals depend on multiple factors, e.g. room temperature, ink quality. Some ...
When using i3: Applications can be moved automatically to specific workspaces at start of the app. Do the following: Start the app Run in a terminal xpro...
Using borg to backup is convenient and nice. I installed it on my debian 10, ran it manually via a script multiple times without errors. Once I ran it via cr...
use case: you need to connect to multiple hosts at once and leave the connections active even as you log out from the entry node. network layout: remote m...
zuerst schaue ob das programm pdfunite installiert ist oeffne terminal fuehre folgenden befehl aus $ pdfunite -v wenn das programm nicht installiert ist k...
enabling time synchronization via systemd the following is needed check time before $ timedatectl status enabling ntp $ timedatectl set-ntp true check syste...
A default encrypted installation of standard distributions (manjaro, fedora, etc.) create LVM-LUKS volumes. The process of resizing is easy. start live-cd s...
raspbian OS can enable ssh by default. this is handy for a headless install. mount boot partition: $ sudo mount /dev/mmcblk0p1 /mnt create ssh file: $ sudo...
to run programs with restricted internet access do the following $ unshare -r -n ping 127.0.0.1 source: link
When you have a local clone of a remote repository and want to update it: pulling will not get all the new tags... run the following [code language="bash" co...
updating your synology to DSM6.2.2 will lead to a certificate error. it cannot renew the letsencrypt certificate anymore. current workaround: pre: ports 80,...
The problem is: How do you find the package for a given command? Two solutions are presented. Use the program pkgfile. Use pacman. Update database: $ sudo...
it is useful to split up the ssh config file. do as follows create config folder $ mkdir ~/.ssh/config.d create multiple config files in that folder (I grou...
this beep comes up in terminals and for each error in matlab. just annoying.... fix this by disabling the right kernel module. append to /etc/modprobe.d/b...
hardware accelerated rendering needs enabling. check out the arch-wiki page. i needed to install the intel graphics driver. explained here. to set the openg...
one can export/import/backup the message filters but it's more involved than it should be. the message filters are in single files within your home directory...
you can include notes into your slides. just use \note{txt} inside of your frame environment. you can also make use of overlays and align all notes in itemiz...
ff nightly will not work with the current ecosia extension. the opensearch form is also not loaded(?) automatically, and searching through the use of keyword...
put this in your preamble [code language="latex"] % figures/tables should be labeled: 1,2,3,4,... \renewcommand{\thefigure}{\arabic{figure}} \renewcommand{\t...
put this in your preamble [code language="latex"] \usepackage{chngcntr} \counterwithout{figure}{chapter} \counterwithout{table}{chapter} [/code] https://tex....
Installation process is similar to the one for Thunderbird Daily (see this blog post). differences: binary download link: # wget "https://download.mozilla.o...
Thunderbird Daily can be installed in most distros directly from their repos but more often than not it is outdated (they usually disable automatic updates)....
i had a very large global ignore list (tex/vim/linux/python specific stuff) and in this one repo git didnt add one specific folder. as it turned out the glob...
a centralized backup server can easily be set up with rsnapshot. This program can pull specified remote folders with rsync. install rsnapshot edit the confi...
for mounting external usb drives one can use fstab. each column has its specific meaning (see here for definitions). for external usb drives it is important ...
one can include the ppa from opensuse for the most current texstudio version: add the ppa's key to your keychain: $ wget -nv http://download.opensuse.org/re...
for the nightly builds of firefox do the following: just include the following ppa:$ sudo add-apt-repository ppa:ubuntu-mozilla-daily/ppa update and install...
the version in mint's repos is out-dated and to install the new one, just add opensuse's repo for owncloud. check out this entry for ubuntu 16.04: https://so...
installation process as in this link. just change one step: download the newest owncloud client from their website. to reset the admin password: sudo -u www-...
to get dyndns on raspi install: ddclient setup config file: /etc/ddclient.conf example for strato server: link setup second config file (/etc/default/ddclien...
installation: installation download matlab iso files mount first cd run the installer (install.sh or similar) from within $HOME: $ cd $HOME; /path/to/cd1/i...
do the following: sudo vim /etc/hosts change last line: 127.0.1.1 XYZ where XYZ should be the new name you want sudo vim /etc/hostname replace the name ...
to auto mount usb drives on bootup one can simply add some lines to the /etc/fstab file: UUID=e0a4c8da-67d1-423d-939c-4dc8249079f0 /mnt/small btrfs rw,defaul...
there is a vast repo for packages not (officially?) maintainted by redhat. to enable this repo (called EPEL) the following steps are needed: get and install...
to enable the automatic checking for fastest mirrors within yum install the following plugin: $ sudo yum install yum-plugin-fastestmirror check that plugins ...
the install process for owncloud-client within scientific linux 7.x is quite easy (do as root): [code language="bash"] $ cd /etc/yum.repos.d/ $ wget http://d...
for password attacks one needs good password lists. the following are quite nice: in kali: /usr/share/wordlists lots of different lists, mostly aquired from...
the ssh daemon is a entry point to many servers. it should be secured!! the following /etc/ssh/sshd_config is secure and very restrivtive: [code language="ba...
the synology's nas boxes have their own will concerning ssh. enable ssh service: at first one needs to enable the ssh service within the web-gui (link: syno...
the most current virtualbox version is available from the official virtualbox repository. to activate it follow this guide: virtualbox.com
it is kinda nice to have a rsync job running while the bandwidth is not needed otherwise. start a main script each night (using cron) the main script uses t...
everyone needs a rsync backup script at some point in their life ;) this is the one i wrote in the last couple minutes/hours/days/years ... it syncs a loca...
rename pictures according to their exifdata time stemp: [code] exiftool "-FileName<CreateDate" -d "%Y%m%d_%H%M%S_%%c.%%e" . [/code] ...
change the user agent string: open: about:config add the following: right click -> new -> string: general.useragent.override input string (e.g., mos...
to monitor the network traffic one can use the tool vnstat install vnstat setup database for interface: vnstat -u -i eth0 start/enable service usage: update...
you need to edit the file: /etc/motd as well as the sshd config: /etc/ssh/sshd_config: Change the setting PrintLastLog to "no", this will disable the "Last l...
the raspberry pi cannot spin external hard drives down. the program hdparm worked perfectly for me. i followed this guide (htpcguides.com). just some slight ...
the raspberry pi is a perfect device for a 24/7 torrent server. one can install the torrent server: deluge. i followed this guide (howtogeek.com) to install ...
one can create gitignore files for specific repos and also globally. github offers gitignore templates for lots of different things: frameworks, languages, e...
edit the file: $HOME/.gitconfig [code language="bash"] [alias] co = checkout ci = commit st = status br = branch hist = log --pretty=format:\"%h %ad | %...
there is a handy tool to extract archives of almost any kind. it goes by the name of .... dtrx!!! checkout the links: dtrx homepage tecmint.com
I recently installed a unix system with virtualbox and after reboot it woudnt start at all - no output.. I started a live cd and reinstalled grub. worked lik...
the ntpserver is just a waist of memory for a raspi and its enough to synchro the time every couple hours. follow this: right time zone: [code]$ sudo dpkg-r...
most common vulnerabilities: memory corruption: same data copied into memmory parts not assigned for it. often comes with these functions: strcat, strcpy, ...
types (int,long,..) often vary in size and therfore one uses standard types: qtypes_t where q is a qualifier, type is the base type, s is the width in bits a...
eip: address in memory of next instruction registers: some hold important addresses other used for temporary data on 32-bit architecture 8 registers are us...
a compiler translates source code into machine level code preprocessor: inlcudes and macros are expanded compiler: generates assembly code compiler: generat...
super easy explanation given in this link the usual workflow for changing is as follows: local changes add: local index commit: local head push: reposito...
openssl can work well with ssl certs. the following links explains the following points in detail: create private keys (domain.key) create certificate reque...
I use an UMTS modem with my raspberry pi 1. the package mmcli is quite useful for handling the modem (e.g., sending SMS,..) list modems:[code language="bas...
this is a little vimrc that is just about right for small purposes.. (edit the file ~/.vimrc for user specific changes and /etc/vimrc?? for systemwide config...
This little post explains how to enable download for packages of pacman. It uses a systemd service. Create the download service (note the option -w for just ...
append to .zshrc in home folder to import file: $ vim ~/.zshrc ... source .zshrc-prompt create .zshrc-prompt in home dir: [code language="bash" collapse="t...
Install the 10-finger practice-typing program "Tipp10". It features addaptive lessons concerning indiviual typing errors, and much more.. install 32-bit lib...
Add mozilla ppa: $ sudo add-apt-repository ppa:mozillateam/firefox-next get the ppa's origin name (bold): $ apt-cache policy ... 500 http://ppa.launchpad....
to mount a shared folder, I had to mount it by cmdline: sudo mount -t vboxsf share ~/host
I tried to install a smaller version of texlive on a linux mint system. the following packages are sufficient for my needs (math+science orientied): texlive ...
to enable automatic updates install: [code language="bash"] $ apt install unattended-upgrades [/code] check and uncomment in the config file as needed, well ...
mounting already encrypted folders: sudo mount -t ecryptfs <folder> <folder> -o key=passphrase,ecryptfs_cipher=aes,ecryptfs_key_bytes=32,ecryptf...
install numlockx and edit config: vim /etc/mdm/Init/Default if [ -x /usr/bin/numlockx ]; then /usr/bin/numlockx on fi source: http://unix.stackexchange.com/...
follow instructions from: http://grahamwideman.wikispaces.com/Python-+Installation+on+Linux note the following: use (latest) python version that you want us...
it's convenient to define this function in your bashrc, s.t. you dont have to think of all the different file formats while extracting. source: https://coder...
for editing pictures with python from PIL import Image im = Image.open("foo.png") pix = im.load() pix[x,y] = value im.show() im.save("new.jpg") source: http...
install the following program: pdftk simple cutting: pdftk myDocument.pdf cat 1-9 26-end output removedPages.pdf cutting multiple files: pdftk A=one.pdf B=t...
$ pwgen pwgen is another utility that is just a quick installation away with the command sudo apt-get install pwgen. Simply running the command pwgen will fl...