This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Luc Hermitte <[email protected]> | |
# Purpose: Script that runs a tsocks in a conf where the passowrd isn't hardcoded | |
# Licence: GPLv3 | |
# Version: 1.0.0 | |
# Copyright 2020-2022 | |
# | |
# Policy | |
# 1. Check in $http_proxy if the password is present -- TDB | |
# 2. Check in a gpg encrypted file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# ****************************************************************************** | |
# | |
# Name: copy-projection.py (forked from gdalcopyproj.py) | |
# Project: GDAL Python Interface | |
# Purpose: Duplicate the geotransform and projection metadata from | |
# one raster dataset to another, which can be useful after | |
# performing image manipulations with other software that | |
# ignores or discards georeferencing metadata. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// (c) Luc Hermitte, 2008 | |
// Distributed under Boost Software Licence | |
#include <algorithm> | |
#include <list> | |
#include <iostream> | |
template <class Super> | |
class ObservationLayer : public Super | |
{ | |
protected: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python function that generates a shortened name for a serie managed by Calibre | |
# (c) Luc Hermitte 2017 | |
# GPLv3 | |
# | |
# The following has been inspired by https://manual.calibre-ebook.com/template_lang.html#using-general-program-mode | |
# but defined as a Python function as I found nowhere where GPM programs go. | |
# Copy-paste this function in the Function template (advanced options), name: "initials", number of parameters: 1 | |
# and then add a custom colunm named "initials" defined as "{series:initials()}" | |
# | |
# The function strips French and English leading articles, and then keep the stripped serie name if it is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "domain.h" | |
#include <limits> | |
#include <iostream> | |
using namespace literals; | |
double g(decltype(3.5_c) v) | |
{ | |
return literals::value(v); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Distributed under the Boost Software License, Version 1.0. | |
// See accompanying file LICENSE_1_0.txt or copy at | |
// http://www.boost.org/LICENSE_1_0.txt | |
// (c) 2015 Luc Hermitte | |
#include <vector> | |
#include <iostream> | |
#include <algorithm> | |
#include <list> | |
#define DELEGATE_TO(fname, attribute) \ | |
auto fname() const noexcept(noexcept(attribute.fname())) { \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Copy-Assignment operator */ | |
template< typename TValue > | |
VariableLengthVector< TValue > & | |
VariableLengthVector< TValue > | |
::operator=(const Self & v) | |
{ | |
// No self assignment test is done. Indeed: | |
// - the operator already resists self assignment through a strong exception | |
// guarantee | |
// - the test becomes a pessimization as we never write "v = v;". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A little attempt at defining a way to define opaque typedefs | |
// Yeah, it has already been done | |
// - https://www.youtube.com/watch?v=jLdSjh8oqmE | |
// - http://sourceforge.net/projects/opaque_typedef/ | |
// (c) 2015 Luc Hermitte | |
// Distributed under the Boost Software License, Version 1.0. | |
// See accompanying file LICENSE_1_0.txt or copy at | |
// http://www.boost.org/LICENSE_1_0.txt | |
// TODO | |
// - add some missing noexcept specs |