Skip to content

Instantly share code, notes, and snippets.

View arnaudbenard's full-sized avatar

Arnaud Benard arnaudbenard

View GitHub Profile
@arnaudbenard
arnaudbenard / gist:4004786
Created November 2, 2012 22:36
Copy paste for ffmpeg
#!/usr/bin/ruby
require "fileutils"
#infos about the images
prefix= "X10s100l5m_MOV4_topo_";
beginning= 5;
ending=114;
produce_name = "img";
@arnaudbenard
arnaudbenard / gist:4040745
Created November 8, 2012 18:54
matlab mex
#
# mexopts.sh Shell script for configuring MEX-file creation script,
# mex. These options were tested with the specified compiler.
#
# usage: Do not call this file directly; it is sourced by the
# mex shell script. Modify only if you don't like the
# defaults after running mex. No spaces are allowed
# around the '=' in the variable assignment.
#
# Note: For the version of system compiler supported with this release,
@arnaudbenard
arnaudbenard / gist:4322928
Created December 17, 2012 22:23
Curvefit in Igor Pro
#pragma rtGlobals=1 // Use modern global access method.
function tiltcompensation(spiralxsen,spiralysen,spiralzfast)
wave spiralxsen,spiralysen,spiralzfast
wave xfit,zfit,yfit
wave W_StatsLinearCorrelationTest,spiraltilt
wave spiraldiv,lineRatio
variable x_corr,y_corr
@arnaudbenard
arnaudbenard / gist:4383890
Created December 26, 2012 23:19
Simplest Makefile
#Simple makefile
PROGRAMS = main
all:
g++ main.cpp -o $(PROGRAMS)
clean:
rm -f *.o $(PROGRAMS)
@arnaudbenard
arnaudbenard / gist:4540559
Last active December 11, 2015 03:48
Example XOP
#pragma pack(2) // All Igor structures are two-byte-aligned.
struct NameToWaveParams {
Handle nameH; // Name of wave in the current data folder.
waveHndl result;
};
typedef struct NameToWaveParams NameToWaveParams;
#pragma pack() // Reset structure alignment.
extern "C" int
NameToWave(NameToWaveParams* p)
@arnaudbenard
arnaudbenard / gist:4630233
Last active December 11, 2015 16:48
Multithread data acquisition
#pragma rtGlobals=1 // Use modern global access method.
function AttoTask(s)
STRUCT WMBackgroundStruct &s
attocubegetdata(100,20000)
end
function StartTestTask()
CtrlNamedBackground Atto,proc=AttoTask
@arnaudbenard
arnaudbenard / gist:4638502
Created January 25, 2013 22:26
Pulse Igor Pro
#pragma rtGlobals=1 // Use modern global access method.
Function UserOutAndTrigger()
//UserOutAndTrigger function is automatically called right before an image is started
Variable pulseWidth = 10/50000 //in seconds min is 1/50000, max is slightly over 1.7 secs
Variable pulseHeight = 5 //in Voltage min -10 max 10
@arnaudbenard
arnaudbenard / gist:5278616
Last active December 15, 2015 14:59
sublimetext
{
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"fade_fold_buttons": false,
"highlight_line": true,
"ignored_packages":
[
"Vintage",
"AAAPackageDev",
{
// Colors
"theme": "Spacegray.sublime-theme",
"color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme",
// Font
"font_face": "Menlo",
"font_size": 13.0,
"font_options": ["subpixel_antialias", "no_bold"],
"line_padding_bottom": 0,