This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Run with sudo | |
# Allow tcp forwarding through lightDM, username must be login name | |
username=$USER | |
if [[ $username == 'root' ]] && [[ -n $SUDO_USER ]]; then | |
username=$SUDO_USER | |
fi | |
confdir=/etc/lightdm/lightdm.conf.d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update && sudo apt-get install -y openssh-server | |
## --- | |
# Change daemon settings such as default port, X11 forwarding (ensure is on), and root login: | |
# | OPTION | default | recommended | |
# ------------------------------------------------------------- | |
# Port 22 Something > 2000 | |
# PermitRootLogin without-password no | |
# X11Forwarding yes yes | |
sudo vim /etc/ssh/sshd.config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
stime=$((30*60)) # 30 min | |
app_path=$HOME/eth-net-intelligence-api | |
app_file=$app_path/app.json | |
cd $app_path | |
pm2 start $app_file | |
while true; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://bbs.archlinux.org/viewtopic.php?id=151044 | |
http://ubuntuforums.org/showthread.php?t=2102522 | |
sudo apt-get install libgl1-mesa-dri:i386 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# https://software.intel.com/en-us/articles/performance-tools-for-software-developers-building-hdf5-with-intel-compilers | |
## PREREQS | |
# 1) szip 2.1 | |
export CC=icc | |
export CXX=icpc | |
export FC=ifort | |
export CFLAGS='-O3 -xHost -ip' | |
export CXXFLAGS='-O3 -xHost -ip' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ompi=/usr/local/openmpi | |
export PATH=$ompi/bin:$PATH | |
export LD_LIBRARY_PATH=$ompi/lib:$LD_LIBRARY_PATH | |
export CPATH=$ompi/include:$CPATH | |
export INCLUDE=$ompi/include:$INCLUDE | |
export MANPATH=$ompi/share/man:$MANPATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make sure to source intel compilers vars | |
wget 'http://www.open-mpi.org/software/ompi/v1.8/downloads/openmpi-1.8.4.tar.bz2' | |
tar xjf openmpi-1.8.4.tar.bz2 | |
./configure CC=/opt/intel/path/to/icc FC=/opt/intel/path/to/ifort CXX=/opt/intel/path/to/icpc --prefix=/opt | |
make -j $(nproc) | |
make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# NOTE ASSUMPTION OF LINUX | |
# NOTE ENVIRONMENT VARIABLES THAT MUST BE SET IN ADVANCE (OR REPLACED): | |
# export EMAIL='[email protected]' | |
# export JOB='python path/to/src.py' | |
# export JOBNAME='python post processing' | |
# RUN THIS SCRIPT WITH NOHUP OR SCREEN OR TMUX | |
loadavg() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Assumes that script is run from directory with ./*eps | |
# and NO EXISTING PDF | |
wc="--will-cite" | |
parallel $wc --progress epstopdf ::: *eps | |
parallel $wc mv {} {/.}-eps-converted-to.pdf ::: *pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# TODO: | |
# http://www.itdojo.com/osx-airport-cli-tool-not-just-for-airport-aps/ | |
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport | |