Instantly share code, notes, and snippets.

View test_sync.cpp
#include <iostream>
#include <string>
#include <stdexcept>
#include <stdexcept>
#include <sstream>
#include <cstring>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
View test_memfd_create.cpp
//#include <sys/memfd.h>
#include <sys/syscall.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
View module
#!/bin/bash
if [[ $# != 2 ]]; then
cat <<EOD
usage: ./module action target
where:
- action is one of: install update remove
View README.md

This script guesses the numbers for the merged pull requests from the last tag, then fetches the corresponding information from GitHub and formats it into markdown format suitable for use in e.g. Discourse.

To use, please add create a 'fetch_changelog_settings' file in the toplevel of your repo folder, with the correct information:

repo = 'MRtrix3/mrtrix3'
user = 'jdtournier'
View install_from_source
#!/bin/bash
# to be used for installation on older systems when all else fails...
#
# Notes:
#
# - to prevent unnecessary downloads, dependencies are only fetched if the
# 'source_install_files' folder does not already exist. Delete it if you want to
# fetch them again.
#
View read_deps.sh
#!/bin/bash
readelf -d "$1" 2>/dev/null | sed -n -e 's/^.*NEEDED.*\[\(\S*\)\]/\1/p'
View README.md

A short demo for C++11 extern templates.