Skip to content

Instantly share code, notes, and snippets.

View soyfrien's full-sized avatar

Louis Waweru soyfrien

View GitHub Profile
@soyfrien
soyfrien / FSL Setup
Last active October 21, 2018 06:55
Adds FSL and autoPtx to path
# FSL Setup
FSLDIR=/usr/local/fsl
PATH=${FSLDIR}/bin:/opt/autoPtx:${PATH}
export FSLDIR PATH
. ${FSLDIR}/etc/fslconf/fsl.sh
@soyfrien
soyfrien / Setup Anaconda.sh
Created October 17, 2018 21:53
Set this up if you need Python 3.7
# added by Anaconda3 5.3.0 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/opt/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
\eval "$__conda_setup"
else
if [ -f "/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/opt/anaconda3/etc/profile.d/conda.sh"
CONDA_CHANGEPS1=false conda activate base
#FREESURFER SETUP
export FREESURFER_HOME=/usr/local/freesurfer
source $FREESURFER_HOME/SetUpFreeSurfer.sh
export R_LIBS=$HOME/R/x86_64-pc-linux-gnu-library/3.5
#END FREESURFER SETUP
#SETUP AFNI and SUMA
export PATH=$PATH:/opt/afni
if [ ! -f ~/.afnirc ]; then
cp /opt/afni/AFNI.afnirc ~/.afnirc
fi
#END AFNI/SUMA SETUP
@soyfrien
soyfrien / UpdateDNS.bat
Created November 6, 2018 13:47
Update Dynamic DNS on afraid.org
rem example.com
cd %~DP0
wget -q --read-timeout=0.0 --waitretry=15 --tries=0 --background http://freedns.afraid.org/dynamic/update.php?KEY_GOES_HERE
@soyfrien
soyfrien / .bashrc
Created November 7, 2018 21:01
hpc sample .bashrc
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
@soyfrien
soyfrien / .bash_profile
Created November 7, 2018 21:02
hpc sample .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
@soyfrien
soyfrien / ls-tsv.sh
Last active November 30, 2018 21:45
list groups and permissions, no dates. spreadsheet pastable. Example: ls-tsv.sh /data
#!/bin/bash
ls -la $1 | awk '{print $1, $3, $4, $9}'
@soyfrien
soyfrien / gist:0159d8bf1daa905cee2c3b01f5cf80c7
Created January 2, 2019 19:01
554 5.7.1 Service unavailable; Client host [IP] blocked using example.com
When seeing these types of messages, it may be helpful to remove the failed service using zmprov. See below.
----- The following addresses had permanent fatal errors -----
<email address>
(reason: 554 5.7.1 Service unavailable; Client host [IP] blocked using dnsbl.njabl.org)
----- Transcript of session follows -----
... while talking to MAIL.SERVER.HOSTNAME:
>>> DATA
<<< 554 5.7.1 Service unavailable; Client host [IP] blocked using dnsbl.njabl.org
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/opt/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/opt/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/opt/anaconda3/bin:$PATH"