Skip to content

Instantly share code, notes, and snippets.

View hmaarrfk's full-sized avatar

Mark Harfouche hmaarrfk

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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
@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 / 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 / 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 <[email protected]>
% 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;