Skip to content

Instantly share code, notes, and snippets.

View AndreaRigoni's full-sized avatar
👻
= ☕ + 💻

Andrea Rigoni AndreaRigoni

👻
= ☕ + 💻
View GitHub Profile
@didenko
didenko / CLA.md
Last active December 13, 2017 14:10
CLA

Preamble

This Contributor License Agreement is a derivative from the GitHub, Inc's version 298f3afd updated August 9, 2017, copied and modified under the individually granted CC-BY-4.0 terms on November 14, 2017.

Contributor License Agreement

The following terms are used throughout this agreement:

  • You - the person or legal entity including its affiliates asked to accept this agreement. An affiliate is any entity that controls or is controlled by the legal entity, or is under common control with it.
@asroy
asroy / Debugging Mixed Python C++ code in Visual Studio Code
Last active August 25, 2022 17:43
Debugging Mixed Python/C++ code in Visual Studio Code
I've tested it on Fedora 23 and Ubuntu 16.04. I'm using gcc-5.3.1, python-3.4, VS Code-1.14.0
You can debug mixed Python/C++ in the same GUI. It also works for MPI applications. You can switch between the debuggers and corresponding call stacks.
1. Packages needed
1) Visual Studio Code
2) Extensions for VS Code:
"Python" from Don Jayamanne (I'm using 0.6.7)
This allows VS Code act as the front end to debug python.
This gives VS Code ability to attach to a python script that uses module "ptvsd".
@simonw
simonw / export-google-docs-to-restructured-text.js
Last active September 19, 2025 04:18
Google Apps script to convert a Google Docs document into reStructuredText
function onOpen() {
var ui = DocumentApp.getUi();
ui.createMenu('Convert to .RST')
.addItem('Convert to .RST and email me the result', 'ConvertToRestructuredText')
.addToUi();
}
// Adopted from https://github.com/mangini/gdocs2md by Renato Mangini
// License: Apache License Version 2.0
String.prototype.repeat = String.prototype.repeat || function(num) {
@tudorcoman
tudorcoman / signatureTemplate.tex
Created September 2, 2016 22:39
LaTex signature template (useful for contracts between companies)
\documentclass[a4paper,twoside,11pt]{article}
\usepackage{delarray}
\usepackage{fancyhdr}
\usepackage[cp1250]{inputenc}
\usepackage[T1]{fontenc}
\pagestyle{fancyplain} \fancyfoot[LE,RO]{\thepage} \cfoot{}
\renewcommand{\headrulewidth}{0pt}
\headheight=14pt
@gesquive
gesquive / print-program-options.cc
Last active June 12, 2022 11:55
Methods to print out boost::program_options objects
#include <string.h>
#include <iostream>
#include "boost/program_options.hpp"
#include "boost/filesystem.hpp"
#include "boost/any.hpp"
namespace po = boost::program_options;
inline void PrintUsage(const boost::program_options::options_description desc) {
std::cout << "Usage: " << app_name << " [options]" << std::endl;
@prwhite
prwhite / Makefile
Last active October 1, 2025 20:57
Add a help target to a Makefile that will allow all targets to be self documenting
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
# Everything below is an example
target00: ## This message will show up when typing 'make help'
@echo does nothing