Skip to content

Instantly share code, notes, and snippets.

@aarumug
aarumug / cpp_join
Created July 29, 2024 14:53
Howto: create a comma separate string from a vector of strings?
```c++
#include <iostream>
#include <numeric>
#include <string>
#include <vector>
int main()
{
std::vector<std::string> v{"one", "two", "three"};
std::string s = std::transform_reduce(v.begin(), v.end(), std::string{},
@aarumug
aarumug / gitcleanbranches.py
Last active September 28, 2021 07:06
Script to clean local git branches
# For clearing remote branches from local repo which are already deleted: `git remote prune origin`
# To clean local branches, use the following python script:
# Usage:
# python gitcleanbranches.py -c branchnamepart1,branchnamepart2 | -x branchnamepart1,branchnamepart2 [-n]
# python gitcleanbranches.py --contains branchnamepart1,branchnamepart2 | -excludes branchnamepart1,branchnamepart2 [--dryrun]
#
# Version 0.1
import argparse
import pprint
@aarumug
aarumug / about.md
Created August 10, 2011 18:33 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer