Skip to content

Instantly share code, notes, and snippets.

View arnaudbenard's full-sized avatar

Arnaud Benard arnaudbenard

View GitHub Profile
@http.post('/api', params)
 .then (result) =>
  @doSomething()
.catch ( err ) =>
  @reportError(err)
  this.http.post('/api/', params).then((function(_this) {
 return function(result) {
@arnaudbenard
arnaudbenard / list.md
Last active November 18, 2015 19:01
ML resources
Burnett: So what I'm asking is that we compensate you for a few hours of your time that will help change people's lives.
John J. Rambo: Are you bringing any weapons?
Burnett: Of course not.
John J. Rambo: You're not changing anything.
Burnett: Well, it's thinking like that that keeps the world the way it is.
John J. Rambo: [walking away] Fuck the world.
http://www.imdb.com/title/tt0462499/quotes
@arnaudbenard
arnaudbenard / gist:8556747
Last active January 4, 2016 02:39
Angular.js + frontend
- http://www.cheatography.com/proloser/cheat-sheets/angularjs/#!
- https://github.com/angular/angular.js/wiki/JsFiddle-Examples
- http://nathanleclaire.com/blog/2013/12/13/how-to-unit-test-controllers-in-angularjs-without-setting-your-hair-on-fire/
- https://docs.google.com/presentation/d/1IRHyU7_crIiCjl0Gvue0WY3eY_eYvFQvSfwQouW9368/edit
- https://coderwall.com/p/1u9khw
- https://coderwall.com/p/y0zkiw
- https://gist.github.com/fnakstad/6033015/
- http://stackoverflow.com/questions/11972026/delaying-angularjs-route-change-until-model-loaded-to-prevent-flicker
{
// 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,
@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",
@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: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: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)