Skip to content

Instantly share code, notes, and snippets.

View itavero's full-sized avatar
🤓

Arno Moonen itavero

🤓
View GitHub Profile
@itavero
itavero / CMakeLists.txt
Created September 14, 2022 16:57
CppUTest (from apt-get) not found by CMake on Ubuntu
cmake_minimum_required(VERSION 3.14)
project(cpputest-via-apt-get
VERSION 1
LANGUAGES CXX)
find_package(CppUTest 4 REQUIRED)
@itavero
itavero / JAXBCollection.java
Last active March 14, 2023 10:03
Generic serializer / marshaller / unserializer / unmarshaller class to convert objects into strings and vice versa. Uses the JAXB lib. Personally used this class for converting messages received/sent to a queue (JMS).
/*
* Copyright (c) 2013, Arno Moonen <info@arnom.nl>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@itavero
itavero / MvcOptionsExtensions.cs
Last active July 25, 2023 21:05
Global route prefix in ASP.NET Core 2.0
using System.Linq;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ApplicationModels;
using Microsoft.AspNetCore.Mvc.Routing;
namespace MyWebApi.Extensions
{
public static class MvcOptionsExtensions
{
public static void UseGeneralRoutePrefix(this MvcOptions opts, IRouteTemplateProvider routeAttribute)
@itavero
itavero / pip.sh
Created October 5, 2014 15:39
One liner to install Python PIP
python < <(curl -s https://bootstrap.pypa.io/get-pip.py)