Skip to content

Instantly share code, notes, and snippets.

View ragavsathish's full-sized avatar

Sathish Kumar Narayanan ragavsathish

View GitHub Profile

Experimenting APB with minishift

Before starting, Its better to clean up the existing minishift

Cleanup minishift

minishift delete --force

rm $HOME/.minishift/certs/* -rf

@ragavsathish
ragavsathish / jenkins_job_sa_labs_analysis_core.sh
Created August 28, 2017 10:37
Auto generated jenkins job script for sa-labs-analysis-core
Jenkins shell script:
#!/bin/sh
## Begin script generated by mjsWriteDockerRunScript.m
# embed the Matlab job as JSON
JOB_JSON="{\"cleanupCommand\": \"\",\"diskGB\": null,\"jobCommand\": [\"cd(fullfile(tbLocateToolbox(''sa-labs-analysis-core''), ''src\/test\/matlab''));\",\"tbAssertTestsPass()\"],\"memoryGB\": null,\"name\": \"testSALabsAnalysisCore\",\"setupCommand\": \"\",\"toolboxCommand\": \"tbUse(''sa-labs-analysis-core'')\"}"
# find where Matlab is installed, dynamically
MATLAB_LINK="$(which matlab)"
MATLAB_EXECUTABLE="$(readlink -f "$MATLAB_LINK")"
@ragavsathish
ragavsathish / reference.md
Last active February 8, 2019 07:47
Git specific commands

GIT

Move files from one git repo to another (not a clone), preserving history

git log --pretty=email --patch-with-stat --reverse -- path/to/file_or_folder | (cd /path/to/new_repository && git am)

StackOverflow

CI

@ragavsathish
ragavsathish / tbSystem.m
Created April 6, 2017 18:15
Quick fix for few windows which are not accepting `system(['which ' executable])`;
function [status, result, fullCommand] = tbSystem(command, varargin)
% Run a comand with system() and a clean environment.
%
% [status, result] = tbSystem(command) locates the given command on
% the system PATH, then invokes the command. Clears the shell environment
% beforehand, so unusual environment variables set by Matlab can be
% ignored.
%
% tbSystem( ... 'echo', echo) specifies whether to echo system command
% output to the Matlab Command Window (true) or hide it (false). The
@ragavsathish
ragavsathish / startup.m
Last active March 19, 2017 21:53
Matlab startup file
%% Startup script for use with the Toolbox Toolbox.
%
% Here is a sample startup.m for works with the ToolboxToolbox. You
% should copy this file to your system outside of the ToolboxToolbox
% folder. You should rename this file to "startup.m". You should edit
% Your startup.m with the correct toolboxToolboxDir, and any Matlab
% preferences you wish to change for your local machine.
%
% This sample is focused on the ToolboxToolbox. You can include additional
% startup actions, if you wish.
@ragavsathish
ragavsathish / ipnc-schedule-2017.html
Last active January 3, 2017 11:16
Course schedule
<table style="height: 389px; font-family: verdana; float: left;font-size:12px" border="1" width="453" cellspacing="10" cellpadding="2">
<tbody>
<tr>
<td><strong>Date</strong></td>
<td><strong>Time</strong></td>
<td><strong>Session</strong></td>
</tr>
<!-- Start Of January -->
<tr>
<td valign="top"><strong>04 January</strong><strong></strong></td>
function out = cell2gobjects(c)
out = gobjects(size(c));
if numel(c) == 1
return
end
for i = 1 : numel(c)
out(i) = c{i};
@ragavsathish
ragavsathish / simulate.m
Last active June 27, 2016 09:22
Rod_rod_bipolar_nonlinearity_simulation
% Nonlinear Signal Transfer from Mouse Rods to Bipolar Cells and Implications for Visual Sensitivity
% Neuron, Vol. 34, 773–785, May 30, 2002, Copyright 2002 by Cell Press
function simulate()
% delcare all constants for function handles
sigma_d = 0.27;
sigma_a = 0.33;
mean_amlpitude_rod_response = 1;