Skip to content

Instantly share code, notes, and snippets.

View icaoberg's full-sized avatar
:bowtie:
Coding…

icaoberg icaoberg

:bowtie:
Coding…
View GitHub Profile
@icaoberg
icaoberg / gist:3434461
Created August 23, 2012 09:03
Git - Setup author and email address
git config --global user.name "Ivan E. Cao-Berg"
git config --global user.email "[email protected]"
@icaoberg
icaoberg / script.sh
Created August 27, 2012 18:42
Find and replace string across multiple files
#!/bin/bash
find . -name "*.m" -exec sed -i 's/\/home\/icaoberg\/cellorganizer-matlab-master/\/home\/icaoberg\/projects\/cellorganizer\/matlab/g' {} \;
@icaoberg
icaoberg / script.sh
Created August 27, 2012 18:58
Comment out email notification on all PBS scripts in the current path
#!/bin/bash
find . -name "*.sh" -exec sed -i 's/#PBS -M [email protected]/##PBS -M [email protected]/g' {} \;
@icaoberg
icaoberg / git.sh
Created September 28, 2012 17:45
Remove git tag both locally and remotely
TAG="v1.7.2"
git tag -d $TAG
git push origin :refs/tags/$TAG
@icaoberg
icaoberg / pyslid.prerequesites.sh
Created October 23, 2012 19:14
[OMERO.searcher] Prerequisite helper script for PySLID
#!/bin/bash
sudo apt-get update
sudo apt-get install setup-tools python-matplotlib
sudo easy_install pip
sudo pip install pyslic
@icaoberg
icaoberg / profile2web.sh
Created October 24, 2012 21:03
Change the results from profiler to web
cp /opt/matlab/amd64_f7/7.10/lib/matlab7/toolbox/matlab/codetools/private/*.gif .
sed -i 's/file:\/\/\/\/opt\/matlab\/amd64_f7\/7.10\/lib\/matlab7\/toolbox\/matlab\/codetools\/private\///g' *.html
sed -i 's/file:\/\/\/\/opt\/matlab\/7.13\/toolbox\/matlab\/codetools\/private\///g' *.html
sed -i 's/file0.html/index.html/g' *.html
mv file0.html index.html
@icaoberg
icaoberg / getnodenames.sh
Last active December 12, 2015 03:38
[PBS] Get the names of the nodes that belong to a specific queue
#!/bin/bash
QUEUE_NAME=model1
pbsnodes | grep -B 3 "properties = $QUEUE_NAME" | grep "compute"
@icaoberg
icaoberg / getnodesthataredown.sh
Created February 4, 2013 17:40
[PBS] Retrieve the list of node names that are currently down
#!/bin/bash
pbsnodes | grep -B 1 "state = down" | grep "compute"
@icaoberg
icaoberg / getlistofrunning jobs
Created February 4, 2013 17:49
[PBS] Get a list of jobs for a specific user given a job state
#!/bin/bash
#Restricts job selection to those in the specified states
#E(xiting state)
#H(eld state)
#Q(ueued state)
#R(unning state)
#T(ransiting state)
#W(aiting state)
@icaoberg
icaoberg / scipy_install.sh
Created February 27, 2013 04:02
[MacOSX][Mountain Lion] Install scipy in MacOSX
#!/bin/bash
#http://stackoverflow.com/questions/12574604/scipy-install-on-mountain-lion-failing
mkdir -p build
cd build
git clone https://github.com/numpy/numpy.git
python build setup.py
python install setup.py
pip install scipy