Wes Turner avatar Wes Turner committed 2279bf3

Renamed ./src/scripts/ to ./scripts

Comments (0)

Files changed (9)

scripts/bashmarks_to_nerdtree.sh

+#!/bin/bash
+# print bashmarks in nerdtree format
+export | grep 'DIR_' | pyline "line[15:].replace('\"','').split('=',1)"
+#!/bin/bash -x
+
+export PULSE_SERVER=10.1.4.1
+SOUNDCHECK="/usr/share/sounds/alsa/Front_Center.wav"
+
+
+install_client() {
+    apt-get install -y pulseaudio pulseaudio-utils paman paprefs pavucontrol
+}
+
+install_server() {
+    apt-get install -y pulseaudio
+    CONF="/etc/pulse/default.pa"
+    DEFAULT="/etc/default/pulseaudio"
+    sed -i 's/PULSEAUDIO_SYSTEM_START=0/PULSEAUDIO_SYSTEM_START=1/g' "$DEFAULT"
+    sed -i 's/DISALLOW_MODULE_LOADING=0/DISALLOW_MODULE_LOADING=1/g' "$DEFAULT"
+    sed -i 's/#load-module module-native-protocol-tcp/load-module module-native-protocol-tcp/g' "$CONF"
+    sed -i 's/#load-module module-rtp-recv/load-module module-rtp-recv/g' "$CONF"
+    /etc/init.d/pulseaudio restart
+}
+
+
+start() {
+    pax11publish -e -r
+    pulseaudio --start --log-target=syslog
+    pacmd load-module module-native-protocol-tcp
+    pacmd load-module module-device-manager
+    pax11publish -e -S $PULSE_SERVER
+    status
+    pacat "$SOUNDCHECK"
+    pavucontrol 2>&1 &
+}
+
+stop() {
+    pax11publish -e -r
+    sleep 1
+    pulseaudio -k
+    sleep 2
+    status
+}
+
+status(){
+    ps aufx | grep pulse
+}
+
+case "$1" in
+    install_server) install_server ;;
+    install) install_deb ;;
+    start) start ;;
+    status) status ;;
+    stop) stop ;;
+    *) echo "usage: $0 <install_server|install_client|start|status|stop>" ;;
+esac
+

scripts/setup_pandas_notebook.sh

+#!/bin/sh
+
+setup_brew () {
+    if ![-f "/usr/local/bin/brew"]; then
+        /usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
+    fi
+}
+
+setup_ipython () {
+    brew install readline
+    brew install zeromq
+    pip install ipython pyzmq tornado pygments
+
+    python -c 'from IPython.external import mathjax; mathjax.install_mathjax()'
+}
+
+setup_pandas () {
+    brew install gfortran
+    brew install pkg-config
+    brew tap homebrew/dupes
+    brew install homebrew/dupes/freetype
+
+    pip install numpy python-dateutil pytz scipy matplotlib statsmodels
+    pip install pandas
+}
+
+setup_brew && setup_ipython && setup_pandas && ipython notebook --pylab=inline

scripts/setup_pandas_notebook_deb.sh

+#!/bin/sh -x
+# Setup IPython Notebook and Pandas for Ubuntu
+
+IPYTHONDIR="${VIRTUAL_ENV}/src/.ipython"
+IPYTHON_NOTEBOOK_DIR="${VIRTUAL_ENV}/src/notebooks"
+IPYTHON_NOTEBOOK_SH="${VIRTUAL_ENV}/bin/ipython_notebook.sh"
+
+setup_python_dev () {
+  sudo apt-get install -y build-essential python-dev python-setuptools \
+    python-pip python-virtualenv virtualenvwrapper
+}
+
+setup_virtualenvwrapper () {
+  #sudo apt-get install -y virtualenvwrapper
+
+  _VENVW='/usr/local/bin/virtualenvwrapper.sh'
+  if [ -f "${_VENVW}" ]; then
+    grep "${_VENVW}" ~/.bashrc || \ 
+      echo "source ${_VENVW}" >> ~/.bashrc && \
+      export _VENVW &&
+      source ${_VENVW}
+  fi
+}
+
+create_virtual_env () {
+  echo "VIRTUAL_ENV: ${VIRTUAL_ENV}"
+  if [ -d "${VIRTUAL_ENV}" ]; then
+    echo "already in a VIRTUAL_ENV: ${VIRTUAL_ENV}"
+  else
+    #sudo apt-get install -y python-virtualenv
+    NAME="${1:-'ipynb'}"
+    if [ "${_VENVW}" -ne "" ]; then
+      mkvirtualenv ${NAME}
+      workon ${NAME}
+    else
+      export VIRTUAL_ENV="${HOME}/${NAME}"
+      virtualenv --no-site-packages "${VIRTUAL_ENV}"
+      source "${VIRTUAL_ENV}/bin/activate"
+    fi
+  fi
+  echo "VIRTUAL_ENV: ${VIRTUAL_ENV}"
+  IPYTHONDIR="${VIRTUAL_ENV}/src/.ipython"
+  IPYTHON_NOTEBOOK_DIR="${VIRTUAL_ENV}/src/notebooks"
+  IPYTHON_NOTEBOOK_SH="${VIRTUAL_ENV}/bin/ipython_notebook.sh"
+}
+
+setup_ipython_profile () {
+  export IPYTHONDIR
+  ipython profile create #<default>
+  # ipython profile list
+  # ipython --profile <default>
+}
+
+setup_ipython_sh_script () {
+  scriptname=${1:-"${IPYTHON_NOTEBOOK_SH}"}
+  echo "Wrting startup script to: $scriptname"
+
+  cat > "${scriptname}" << EOF
+#!/bin/sh
+IPYTHONDIR="${IPYTHONDIR}"
+IPYTHON_NOTEBOOK_DIR="${IPYTHON_NOTEBOOK_DIR}"
+mkdir -p "${IPYTHON_NOTEBOOK_DIR}"
+ipython notebook \
+   --pylab=inline \
+   --ipython-dir="\${IPYTHONDIR}" \
+   --notebook-dir="\${IPYTHON_NOTEBOOK_DIR}" \
+   --secure 
+EOF
+  chmod -v +x ${scriptname}
+}
+
+setup_ipython () {
+  #apt-get readline
+  sudo apt-get install libzmq1 libzmq-dev
+  pip install ipython pyzmq tornado pygments
+
+  python -c 'map(__import__,"IPython zmq tornado pygments".split())'
+  python -c 'from IPython.external import mathjax; mathjax.install_mathjax()'
+  mkdir -v -p "${IPYTHONDIR}" "${IPYTHON_NOTEBOOK_DIR}"
+  setup_ipython_profile
+  setup_ipython_sh_script
+}
+
+setup_pandas () {
+  # apt-cache show pandas
+  sudo apt-get install -y \
+    python-numpy \
+    python-scipy \
+    python-matplotlib \
+    python-dateutil \
+    gfortran \
+    cython \
+    libfreetype6-dev \
+    libpng12-dev
+
+  sys_shared="/usr/share/pyshared"
+  sys_pkgs="/usr/lib/python2.7/dist-packages"
+  site_pkgs="$VIRTUAL_ENV/lib/python2.7/site-packages"
+  for pkg in numpy scipy dateutil; do
+    from="${sys_pkgs}/${pkg}"
+    to="${site_pkgs}/${pkg}"
+    rm -fv "${to}"
+    ln -s -v "${from}" "${to}"
+  done
+
+  pip install matplotlib
+  pip install pytz
+  pip install statsmodels
+  pip install --no-deps pandas
+  python -c 'map(__import__,"numpy scipy matplotlib pylab pandas".split())'
+}
+
+setup_python_dev && \
+  create_virtual_env && \
+  setup_ipython && \
+  setup_pandas && \
+  $IPYTHON_NOTEBOOK_SH

src/scripts/bashmarks_to_nerdtree.sh

-#!/bin/bash
-# print bashmarks in nerdtree format
-export | grep 'DIR_' | pyline "line[15:].replace('\"','').split('=',1)"

src/scripts/gittagstohgtags.sh

-#!/bin/bash 
-
-# hg-git workaround
-# lookup corresponding .hg rev ids for hg-git mapped revs
-# output suitable for .hgtags or .hg/localtags
-
-# usage:
-usage() {
-    echo "$0: hg-git tags"
-    echo ""
-    echo "usage: $0 <path>"
-    echo "ex: $0 . >> ./.hg/localtags"
-}
-
-if [ "$1" == "-h" ]; then
-    usage
-    exit 0
-fi
-
-repo=$1
-
-if [ -d "${repo}/.hg/git" ]; then
-    repodir="${repo}/.hg/git"
-elif [ -d "${repo}/.git" ]; then
-    repodir="${repo}/.git"
-else
-    echo "Repository "${repo}" not specified or not found"
-    exit -1
-fi
-
-gittags="${repodir}/refs/tags"
-
-for f in `ls "${gittags}"`; do
-    githsh=`cat ${gittags}/${f}`;
-    hghsh=`grep ${githsh} ${repo}/.hg/git-mapfile | cut -f2 -d' '`;
-    echo ${hghsh} ${f};
-done

src/scripts/pulse.sh

-#!/bin/bash -x
-
-export PULSE_SERVER=10.1.4.1
-SOUNDCHECK="/usr/share/sounds/alsa/Front_Center.wav"
-
-
-install_client() {
-    apt-get install -y pulseaudio pulseaudio-utils paman paprefs pavucontrol
-}
-
-install_server() {
-    apt-get install -y pulseaudio
-    CONF="/etc/pulse/default.pa"
-    DEFAULT="/etc/default/pulseaudio"
-    sed -i 's/PULSEAUDIO_SYSTEM_START=0/PULSEAUDIO_SYSTEM_START=1/g' "$DEFAULT"
-    sed -i 's/DISALLOW_MODULE_LOADING=0/DISALLOW_MODULE_LOADING=1/g' "$DEFAULT"
-    sed -i 's/#load-module module-native-protocol-tcp/load-module module-native-protocol-tcp/g' "$CONF"
-    sed -i 's/#load-module module-rtp-recv/load-module module-rtp-recv/g' "$CONF"
-    /etc/init.d/pulseaudio restart
-}
-
-
-start() {
-    pax11publish -e -r
-    pulseaudio --start --log-target=syslog
-    pacmd load-module module-native-protocol-tcp
-    pacmd load-module module-device-manager
-    pax11publish -e -S $PULSE_SERVER
-    status
-    pacat "$SOUNDCHECK"
-    pavucontrol 2>&1 &
-}
-
-stop() {
-    pax11publish -e -r
-    sleep 1
-    pulseaudio -k
-    sleep 2
-    status
-}
-
-status(){
-    ps aufx | grep pulse
-}
-
-case "$1" in
-    install_server) install_server ;;
-    install) install_deb ;;
-    start) start ;;
-    status) status ;;
-    stop) stop ;;
-    *) echo "usage: $0 <install_server|install_client|start|status|stop>" ;;
-esac
-

src/scripts/setup_pandas_notebook.sh

-#!/bin/sh
-
-setup_brew () {
-    if ![-f "/usr/local/bin/brew"]; then
-        /usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
-    fi
-}
-
-setup_ipython () {
-    brew install readline
-    brew install zeromq
-    pip install ipython pyzmq tornado pygments
-
-    python -c 'from IPython.external import mathjax; mathjax.install_mathjax()'
-}
-
-setup_pandas () {
-    brew install gfortran
-    brew install pkg-config
-    brew tap homebrew/dupes
-    brew install homebrew/dupes/freetype
-
-    pip install numpy python-dateutil pytz scipy matplotlib statsmodels
-    pip install pandas
-}
-
-setup_brew && setup_ipython && setup_pandas && ipython notebook --pylab=inline

src/scripts/setup_pandas_notebook_deb.sh

-#!/bin/sh -x
-# Setup IPython Notebook and Pandas for Ubuntu
-
-IPYTHONDIR="${VIRTUAL_ENV}/src/.ipython"
-IPYTHON_NOTEBOOK_DIR="${VIRTUAL_ENV}/src/notebooks"
-IPYTHON_NOTEBOOK_SH="${VIRTUAL_ENV}/bin/ipython_notebook.sh"
-
-setup_python_dev () {
-  sudo apt-get install -y build-essential python-dev python-setuptools \
-    python-pip python-virtualenv virtualenvwrapper
-}
-
-setup_virtualenvwrapper () {
-  #sudo apt-get install -y virtualenvwrapper
-
-  _VENVW='/usr/local/bin/virtualenvwrapper.sh'
-  if [ -f "${_VENVW}" ]; then
-    grep "${_VENVW}" ~/.bashrc || \ 
-      echo "source ${_VENVW}" >> ~/.bashrc && \
-      export _VENVW &&
-      source ${_VENVW}
-  fi
-}
-
-create_virtual_env () {
-  echo "VIRTUAL_ENV: ${VIRTUAL_ENV}"
-  if [ -d "${VIRTUAL_ENV}" ]; then
-    echo "already in a VIRTUAL_ENV: ${VIRTUAL_ENV}"
-  else
-    #sudo apt-get install -y python-virtualenv
-    NAME="${1:-'ipynb'}"
-    if [ "${_VENVW}" -ne "" ]; then
-      mkvirtualenv ${NAME}
-      workon ${NAME}
-    else
-      export VIRTUAL_ENV="${HOME}/${NAME}"
-      virtualenv --no-site-packages "${VIRTUAL_ENV}"
-      source "${VIRTUAL_ENV}/bin/activate"
-    fi
-  fi
-  echo "VIRTUAL_ENV: ${VIRTUAL_ENV}"
-  IPYTHONDIR="${VIRTUAL_ENV}/src/.ipython"
-  IPYTHON_NOTEBOOK_DIR="${VIRTUAL_ENV}/src/notebooks"
-  IPYTHON_NOTEBOOK_SH="${VIRTUAL_ENV}/bin/ipython_notebook.sh"
-}
-
-setup_ipython_profile () {
-  export IPYTHONDIR
-  ipython profile create #<default>
-  # ipython profile list
-  # ipython --profile <default>
-}
-
-setup_ipython_sh_script () {
-  scriptname=${1:-"${IPYTHON_NOTEBOOK_SH}"}
-  echo "Wrting startup script to: $scriptname"
-
-  cat > "${scriptname}" << EOF
-#!/bin/sh
-IPYTHONDIR="${IPYTHONDIR}"
-IPYTHON_NOTEBOOK_DIR="${IPYTHON_NOTEBOOK_DIR}"
-mkdir -p "${IPYTHON_NOTEBOOK_DIR}"
-ipython notebook \
-   --pylab=inline \
-   --ipython-dir="\${IPYTHONDIR}" \
-   --notebook-dir="\${IPYTHON_NOTEBOOK_DIR}" \
-   --secure 
-EOF
-  chmod -v +x ${scriptname}
-}
-
-setup_ipython () {
-  #apt-get readline
-  sudo apt-get install libzmq1 libzmq-dev
-  pip install ipython pyzmq tornado pygments
-
-  python -c 'map(__import__,"IPython zmq tornado pygments".split())'
-  python -c 'from IPython.external import mathjax; mathjax.install_mathjax()'
-  mkdir -v -p "${IPYTHONDIR}" "${IPYTHON_NOTEBOOK_DIR}"
-  setup_ipython_profile
-  setup_ipython_sh_script
-}
-
-setup_pandas () {
-  # apt-cache show pandas
-  sudo apt-get install -y \
-    python-numpy \
-    python-scipy \
-    python-matplotlib \
-    python-dateutil \
-    gfortran \
-    cython \
-    libfreetype6-dev \
-    libpng12-dev
-
-  sys_shared="/usr/share/pyshared"
-  sys_pkgs="/usr/lib/python2.7/dist-packages"
-  site_pkgs="$VIRTUAL_ENV/lib/python2.7/site-packages"
-  for pkg in numpy scipy dateutil; do
-    from="${sys_pkgs}/${pkg}"
-    to="${site_pkgs}/${pkg}"
-    rm -fv "${to}"
-    ln -s -v "${from}" "${to}"
-  done
-
-  pip install matplotlib
-  pip install pytz
-  pip install statsmodels
-  pip install --no-deps pandas
-  python -c 'map(__import__,"numpy scipy matplotlib pylab pandas".split())'
-}
-
-setup_python_dev && \
-  create_virtual_env && \
-  setup_ipython && \
-  setup_pandas && \
-  $IPYTHON_NOTEBOOK_SH
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.