Skip to content

Instantly share code, notes, and snippets.

View Zitrax's full-sized avatar
👽

Daniel Bengtsson Zitrax

👽
View GitHub Profile
@Zitrax
Zitrax / ubuntu-deps.py
Last active July 18, 2023 18:30
Download all dependencies for a ubuntu package.
import argparse
import hashlib
import os
from collections import defaultdict
import sys
from bs4 import BeautifulSoup as bs
import re
import requests
@Zitrax
Zitrax / stringformat_constexpr_if.cpp
Last active November 7, 2023 23:06
stringformat with constexpr if
#include <string>
#include <iostream>
#include <memory>
/**
* Convert all std::strings to const char* using constexpr if (C++17)
*/
template<typename T>
auto convert(T&& t) {