Commit 76ba8915 authored by Jesse Heckman's avatar Jesse Heckman
Browse files

update

parent 3b17f6bd
......@@ -4,7 +4,7 @@
%% HEADER
ITI 0 0
Blocks 3
Blocks 2
Trials 20
Repeats 1
Random 0 % 0=no, 1=per set, 2=all trials
......@@ -21,7 +21,7 @@ Lab 5
~~~
% Block: 1
==>
HOR 2 0 60 .1
HOR 2 20 60 .1
VER 1 35 60 .1
% Trial: 1
......@@ -87,7 +87,7 @@ LED -25 0 5 0 2200 0 2500
~~~
% Block: 2
==>
HOR 2 0 60 .1
HOR 2 20 60 .1
VER 1 35 60 .1
% Trial: 11
......@@ -150,9 +150,4 @@ TRG0 1 2 0 0 1
LED 0 0 5 0 200 0 2000
LED -25 0 5 0 2200 0 2500
~~~
% Block: 3
==>
HOR 2 0 60 .1
VER 1 35 60 .1
function pb_mountserver(varargin)
% PB_MOUNTSERVER()
%
% PB_MOUNTSERVER() ...
%
% See also ...
% PBToolbox (2018): JJH: j.heckman@donders.ru.nl
srv = pb_keyval('server',varargin,'mbaudit5');
[s,c] = system(['mount -t smbfs //' getcredentials(srv) '@' srv '-srv.science.ru.nl/' srv ' ~/sharename/']);
if s == 64; system('umount ~/sharename/'); end
end
function auth = getcredentials(srv)
% obtains authentication credentials for server
doi = [userpath '.credentials'];
if ~isfolder(doi); mkdir(doi); end
fn = [doi filesep srv '.crd'];
if ~exist(fn,'file')
fid = fopen(fn,'wt');
[str1,str2] = dlg(srv);
fprintf(fid, '%s:%s', str1, str2);
fclose(fid);
end
fid = fopen(fn);
auth = textscan(fid,'%s'); auth = auth{1,1}; auth = auth{1,1};
fclose(fid);
end
function [str1,str2] = dlg(srv)
prompt = {'Enter your username:','Enter password:'};
title = ['Connecting to ' srv];
definput = {'jheckman','s'};
dims = [1 75];
answer = inputdlg(prompt,title,dims,definput);
str1 = answer{1}; str2 = answer{2};
end
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% %
% Part of Programmeer Beer Toolbox (PBToolbox) %
% Written by: Jesse J. Heckman (2018) %
% %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment