Skip to content

Instantly share code, notes, and snippets.

View hmaarrfk's full-sized avatar

Mark Harfouche hmaarrfk

View GitHub Profile
@hmaarrfk
hmaarrfk / matlab_remove_trailing_whitespace
Last active April 1, 2021 19:48
To remove a Matlab trailing whitespace in the editorOriginal Author: Sam Roberts http://stackoverflow.com/questions/19770347/how-to-auto-remove-trailing-whitespaces-on-save-in-matlabModified by Mark Harfouche to remember cursor location
% To remove a Matlab trailing whitespace in the editor
% Original Author: Sam Roberts
% Improved by: Simone Gaiarin <simgunz@gmail.com>
% http://stackoverflow.com/questions/19770347/how-to-auto-remove-trailing-whitespaces-on-save-in-matlab
% Modified by Mark Harfouche to remember cursor location
%
%
% Temp variable for shortcut. Give it an unusual name so it's unlikely to
% conflict with anything in the workspace.
shtcutwh__ = struct;
@hmaarrfk
hmaarrfk / latex_Makefile
Last active March 3, 2016 11:49
Latex makefile
doc=your_document_name
name=$(doc)
BUILD=build
FIGS_DIR=figs
TARGET=$(doc).pdf
TOPSOURCE=$(doc).tex
@hmaarrfk
hmaarrfk / pwdcopy.m
Created May 18, 2016 21:08
Copy working directory to clipboard for Matlab
% Mark Harfouche
% Copyright 2016
% New BSD License
function d = pwdcopy()
d = pwd();
clipboard('copy', d);
end
@hmaarrfk
hmaarrfk / template.m
Created May 19, 2016 17:54
Matlab template for measurements
clear all;
close all;
do_save = true;
time_start = datestr(now, 'yymmdd_HHMMSS');
if do_save == false; disp('-----------------------------------'); disp('----- Warning not saving data -----'); disp('-----------------------------------'); end
%% Start measurements
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
## Contact: http://www.qt-project.org/legal
##
## This file is part of the documentation of the Qt Toolkit.
# - Find an ITK installation or build tree.
# When ITK is found, the ITKConfig.cmake file is sourced to setup the
# location and configuration of ITK. Please read this file, or
# ITKConfig.cmake.in from the ITK source tree for the full list of
# definitions. Of particular interest is ITK_USE_FILE, a CMake source file
# that can be included to set the include directories, library directories,
# and preprocessor macros. In addition to the variables read from
# ITKConfig.cmake, this find module also defines
# ITK_DIR - The directory containing ITKConfig.cmake.
# - Find an elastix installation or build tree.
# When elastix is found, the ElastixConfig.cmake file is sourced to setup the
# location and configuration of elastix. Please read this file, or
# ElastixConfig.cmake.in from the elastix source tree for the full list of
# definitions. Of particular interest is ELASTIX_USE_FILE, a CMake source file
# that can be included to set the include directories, library directories,
# and preprocessor macros. In addition to the variables read from
# ElastixConfig.cmake, this find module also defines
# Elastix_DIR - The directory containing ElastixConfig.cmake.