Skip to content

Instantly share code, notes, and snippets.

View soyfrien's full-sized avatar

Louis Waweru soyfrien

View GitHub Profile
@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
#SETUP AFNI and SUMA
export PATH=$PATH:/opt/afni
if [ ! -f ~/.afnirc ]; then
cp /opt/afni/AFNI.afnirc ~/.afnirc
fi
#END AFNI/SUMA SETUP
#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
@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
@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
#/bin/bash
systemctl stop smbd.service winbind.service nmbd.service
net cache flush
rm -rf /var/lib/samba/*.tdb
rm -rf /var/lib/samba/group_mapping.ldb
systemctl start smbd.service winbind.service nmbd.service

Gist of How Domain Was Joined

Install software

I installed Samba during the initital server installtion's tasksel-like dialog.

apt install ntp ntpdate winbind libnss-winbind libpam-winbind krb5-config krb5-locales krb5-user

Sync Time with DCs

vim /etc/ntp.conf

Set pool = ada.example.com

choco feature enable -n=allowGlobalConfirmation
cinst googlechrome 7zip sublimetext3 libreoffice authy-desktop
cinst putty cgwyn curl wget cyberduck filezilla winscp
cinst steam origin utorrent mpc-hc
cinst sysinternals procexp gpu-z cpu-z coretemp partitionmaster
cinst wireshark fiddler postman
cinst virtualmachineconverter vmwarevsphereclient
@soyfrien
soyfrien / vimrc
Last active October 21, 2018 14:54
filetype plugin indent on
set tabstop=8 softtabstop=4 expandtab shiftwidth=4 smarttab
@soyfrien
soyfrien / rcheck.sh
Last active January 2, 2022 18:52
rcheck.sh: Answers question: restart required?
#!/bin/bash
if [ -f /var/run/reboot-required ]; then
echo '*** System restart required ***'
else echo 'Reboot not necessary.'
fi