Added installation of system monitoring tools.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/Ensembl/ensembl-vcloud.git/'


fixed alias path

fixed alias path

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/WebAppNut/dotfiles.git/'


add run_job_array script

add run_job_array script

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/at7/work.git/'


doc: add test for bridge setup and teardown

Signed-off-by: Rubens Figueiredo <22177f75c46bd149db738f8a1dfeab4c8cbd2d82@bisdn.de>

#!/bin/bash

# This is a testing script for bridge setup and teardown

BRIDGE=${BRIDGE:-swbridge}
PORTA=${PORTA:-port7}
PORTB=${PORTB:-port8}

function bridge_setup {
  ip link add name ${BRIDGE} type bridge vlan_filtering 1 vlan_protocol $1
  ip link set ${BRIDGE} up
}

function enslave {
  # port 1
  ip link set ${PORTA} master ${BRIDGE}
  ip link set ${PORTA} up

  # port 2
  ip link set ${PORTB} master ${BRIDGE}
  ip link set ${PORTB} up
}

function vlans {
  bridge vlan add vid 100 dev ${PORTA}
  bridge vlan add vid 100 dev ${PORTB}
}

function teardown {
  ip link del ${BRIDGE}
}

teardown

# Initial bridge setup, interface enslavement and VLAN configuration
bridge_setup 802.1ad
enslave
vlans

read -p "First setup: Press enter to continue"

# Delete the bridge
teardown

read -p "Second setup: Press enter to continue"

# Reconfiguration of the bridge, state in OFDPA must be the same as before
bridge_setup 802.1q
enslave
vlans

error: pathspec 'examples/tests/bridge_teardown.sh' did not match any file(s) known to git


Add raspberry pi backup script

Add raspberry pi backup script

# Script for raspberry pi backups purpoise. Can be used for image backup on almost any Linux machine
# Script created by Jaac user on https://www.raspberrypi.org/forums/viewtopic.php?p=136912
#
# Setting up directories
#
SUBDIR=raspberrypi_backups
DIR=/media/networkshare/$SUBDIR

echo "Starting RaspberryPI backup process!"

# First check if pv package is installed, if not, install it first
PACKAGESTATUS=`dpkg -s pv | grep Status`;

if [[ $PACKAGESTATUS == S* ]]
   then
      echo "Package 'pv' is installed."
   else
      echo "Package 'pv' is NOT installed."
      echo "Installing package 'pv'. Please wait..."
      apt-get -y install pv
fi

# Check if backup directory exists
if [ ! -d "$DIR" ];
   then
      echo "Backup directory $DIR doesn't exist, creating it now!"
      mkdir $DIR
fi

# Create a filename with datestamp for our current backup (without .img suffix)
OFILE="$DIR/backup_$(date +%Y%m%d_%H%M%S)"

# Create final filename, with suffix
OFILEFINAL=$OFILE.img

# First sync disks
sync; sync

# Shut down some services before starting backup process
echo "Stopping some services before backup."
service apache2 stop
service mysql stop
service cron stop

# Begin the backup process, should take about 1 hour from 8Gb SD card to HDD
echo "Backing up SD card to USB HDD."
echo "This will take some time depending on your SD card size and read performance. Please wait..."
SDSIZE=`blockdev --getsize64 /dev/mmcblk0`;
pv -tpreb /dev/mmcblk0 -s $SDSIZE | dd of=$OFILE bs=1M conv=sync,noerror iflag=fullblock

# Wait for DD to finish and catch result
RESULT=$?

# Start services again that where shutdown before backup process
echo "Start the stopped services again."
service apache2 start
service mysql start
service cron start

# If command has completed successfully, delete previous backups and exit
if [ $RESULT = 0 ];
   then
      echo "Successful backup, previous backup files will be deleted."
      rm -f $DIR/backup_*.tar.gz
      mv $OFILE $OFILEFINAL
      echo "Backup is being tarred. Please wait..."
      tar zcf $OFILEFINAL.tar.gz $OFILEFINAL
      rm -rf $OFILEFINAL
      echo "RaspberryPI backup process completed! FILE: $OFILEFINAL.tar.gz"
      exit 0
# Else remove attempted backup file
   else
      echo "Backup failed! Previous backup files untouched."
      echo "Please check there is sufficient space on the HDD."
      rm -f $OFILE
      echo "RaspberryPI backup process failed!"
      exit 1
fi

error: pathspec 'backup-raspberry-pi.sh' did not match any file(s) known to git


Added docker toolbox aliases.

Added docker toolbox aliases.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/lucasdamiani/my-dev-environment.git/'


Add tools image_upload

Add tools image_upload

#!/usr/bin/env bash

source ~/admin-openrc.sh
glance image-create --name "ubuntu1404" --is-public true --disk-format qcow2 \
          --container-format bare \
          --file $1

error: pathspec 'tools/image_upload.sh' did not match any file(s) known to git


Create aws_jq_example.sh

Create aws_jq_example.sh

./inv/dev/ec2.py |jq '.["tag_Name_teamcity-server"]' | grep "[0-9]" | sed -e 's/"//g' -e 's/ //g'

error: pathspec 'aws_jq_example.sh' did not match any file(s) known to git


Add simple script to remove users. (#2083)

See: https://discourse.mozilla.org/t/forgot-password-for-webthings/43463

#!/bin/bash

MOZIOT_HOME="${MOZIOT_HOME:=${HOME}/.mozilla-iot}"
sqlite3 "${MOZIOT_HOME}/config/db.sqlite3" "DELETE FROM users"

error: pathspec 'tools/remove-users.sh' did not match any file(s) known to git


Script to help cycle skia-autogen
Review URL: https://codereview.appspot.com/6481066

git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@5291 2bbb7eff-a529-9590-31e7-b0007b416f81

#/bin/bash
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# roll_autogen.sh: Helper script for removing old revisions from an svn
# repository.  Unfortunately, the only way to discard old revisions is to clone
# the repository locally, use svnadmin to dump a range of commits from the local
# copy, re-import them into a brand-new repository, "reset" the original repo,
# and then import the commits from the new repository into the original.  This
# script automates all of that except for resetting the original repository.

REPO=${REPO:-"https://skia-autogen.googlecode.com"}
REVS_TO_KEEP=${REVS_TO_KEEP:-50}
REPO_SVN="${REPO}/svn"
CLONE_DIR="local_clone_dir"
LOCAL_CLONE="$(pwd)/${CLONE_DIR}"

echo "Creating local repository in ${LOCAL_CLONE}"
svnadmin create ${LOCAL_CLONE}
pushd ${LOCAL_CLONE}/hooks > /dev/null
echo "#!/bin/sh" > pre-revprop-change
chmod 755 pre-revprop-change
popd > /dev/null

# Determine the latest revision.  Note that any revisions committed while we
# were syncing will be lost forever!
END=`svn info ${REPO_SVN} | grep Revision | cut -c11-`
START=$((END-REVS_TO_KEEP))
DUMPFILE="skia-autogen_r${START}-${END}.dump"

echo "Cloning ${REPO_SVN} into ${LOCAL_CLONE}..."
svnsync init file://${LOCAL_CLONE} ${REPO_SVN}
svnsync --non-interactive sync file://${LOCAL_CLONE}

echo "Dumping revisions ${START} to ${END} to ${DUMPFILE}."
svnadmin dump --revision ${START}:${END} ${LOCAL_CLONE} > ${DUMPFILE}

echo "Removing temporary local clone."
rm -rf ${LOCAL_CLONE}

echo "Re-creating local clone from ${DUMPFILE}."
svnadmin create ${LOCAL_CLONE}
svnadmin load ${LOCAL_CLONE} < ${DUMPFILE}

echo "Deleting ${DUMPFILE}"
rm ${DUMPFILE}

echo "Now you need to reset the remote repository. Typically, a link to do this"
echo "can be found at (${REPO}/adminSource).
echo "Please do so and press any key to continue."
read -n 1 -s

echo "Syncing ${LOCAL_CLONE} to ${REPO_SVN}."
svnsync init ${REPO_SVN} file://${LOCAL_CLONE}
svnsync sync ${REPO_SVN}

echo "Removing temporary local clone."
rm -rf ${LOCAL_CLONE}

echo "Removing local checkout."
rm -rf ${CHECKOUT_DIR}

echo "Finished!"

error: pathspec 'tools/roll_autogen.sh' did not match any file(s) known to git


new script to wrap r scripts in the correct environment.

#
# Wrap a R script for execution in the development runtime environment.
#

if [ $# -ne 2 ] ; then
    echo "Usage: $0 source dest" 1>&2
    exit 1
fi

src=$1
dst=$2

cat > $dst <<EOF
#!/bin/sh
export KB_TOP=$KB_TOP
export KB_RUNTIME=$KB_RUNTIME
export PATH=$KB_RUNTIME/bin:$KB_TOP/bin:\$PATH
export R_LIBS=$KB_R_PATH
Rscript --vanilla $src "\$@"
EOF

chmod +x $dst

error: pathspec 'tools/wrap_rscript.sh' did not match any file(s) known to git


Replace alias with setting in vimrc.

Replace alias with setting in vimrc.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/rubasov/dotfiles.git/'


deleted

deleted

error: pathspec 'diego.sh' did not match any file(s) known to git


added battery script and future commits will be signed

#!/bin/bash
battery='/sys/class/power_supply/BAT0';
battery_status=`cat $battery/status`
battery_level=`cat $battery/capacity`
if (( $battery_status=="Discharging")); then
  if (( $battery_level <= 50 )); then
    /usr/bin/notify-send "50% battery left"
  elif (( $battery_level <= 15 )); then
    /usr/bin/notify-send "15% battery left"
  elif (( $battery_level <= 10 )); then
    /usr/bin/notify-send "10% battery left"
  elif (( $battery_level <= 5 )); then
    /usr/bin/notify-send "5% battery left"
    systemctl suspend
  fi
else
  /usr/bin/notify-send $battery_level
fi
#echo $battery_status
#echo $battery_level

error: pathspec '.batterystatus.sh' did not match any file(s) known to git


Add turbolift_backup wrapper helper script

#!/bin/bash
# turbolift_backup.sh: Wrapper around turbolift to simplify Cron calls.
#
# Copyright 2014 Rackspace Hosting, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# usage: Print usage to stdout
# Arguments: NONE
function usage {
    echo "turbolift_backup.sh: Wrapper around turbolift to simplify Cron calls"
    echo "USAGE: turbolift_backup.sh -u [API Username] -k [API Key] -d [Datacenter]"
    echo -e "\t-u: Rackspace API username"
    echo -e "\t-k: Rackspace API key"
    echo -e "\t-d: Rackspace datacenter to back up to (DFW, IAD, ORD, etc...)"
    echo -e "\t-c: Rackspace CloudFiles container to back up to"
    echo -e "\t-l: Location (path) to backup"
    echo -e "\t-D: Disable the backup"
    echo -e "\t-s: Log to syslog"
    echo -e "\t-v: Be verbose"
}

# print_helper: Helper function for printing output
# ARGUMENTS:
# $1: String to print
# $2: Location:
#       0: stdout
#       1: syslog
#       Default: stderr
function print_helper {
    case $2 in
	0)
	    echo "${1}"
	    ;;
	1)
	    logger "turbolift_backup.sh: ${1}"
	    ;;
	*)
	    echo "${1}" >&2
	    ;;
    esac
}

loglocation=0
verbose=0
disabled=0

while getopts "k:u:d:c:l:Dsv" opt; do
    case "${opt}" in
	k)
	    apikey=${OPTARG}
	    ;;
	u)
	    apiuser=${OPTARG}
	    ;;
	d)
	    datacenter=${OPTARG}
	    ;;
	c)
	    container=${OPTARG}
	    ;;
	l)
	    location=${OPTARG}
	    ;;
	D)
	    disabled=1
	    ;;
	s)
	    loglocation=1
	    ;;
	v)
	    verbose=1
	    ;;

	*)
	    usage
	    exit 1
	    ;;
    esac
done

if [ $verbose -eq 1 ]; then
    print_helper "Settings:" $loglocation
    print_helper "   API Key:    ${apikey}"  $loglocation
    print_helper "   API User:   ${apiuser}"  $loglocation
    print_helper "   Datacenter: ${datacenter}"  $loglocation
    print_helper "   Container:  ${container}"  $loglocation
    print_helper "   Location:   ${location}"  $loglocation
    print_helper "   Disabled:   ${disabled}"  $loglocation
    print_helper "   Log location: ${loglocation}"  $loglocation
fi

# Verify mandatory options are set
if [ -z "${apikey}" ]; then
    print_helper "ERROR: API Key not set" $loglocation
    exit 1
fi

if [ -z "${apiuser}" ]; then
    print_helper "ERROR: API Username not set" $loglocation
    exit 1
fi

if [ -z "${datacenter}" ]; then
    print_helper "ERROR: Datacenter not set" $loglocation
    exit 1
fi

if [ -z "${container}" ]; then
    print_helper "ERROR: Container not set" $loglocation
    exit 1
fi

if [ -z "${location}" ]; then
    print_helper "ERROR: Location not set" $loglocation
    exit 1
fi

if [ $disabled -eq 1 ]; then
    print_helper "Notice: Backup for ${location} disabled" $loglocation
    exit 0
fi

tarlocation=$(echo "$location" | sed -e 's|/|___|g')
time=$(date +%Y-%m-%d_%H:%M:%S)
turbolift --os-rax-auth $datacenter -u $username -a $apikey archive -s $location -c $container --verify --tar-name "${time} - ${tarlocation}"
retval=$?

if [ $retval -ne 0 ]; then
    print_helper "WARNING: Turbolift returned code ${retval} for location #{location}" $loglocation
    exit 1
else
    if [ $verbose -eq 1 ]; then
	print_helper "NOTICE: Turbolift returned code ${retval} for location #{location}" $loglocation
    fi
    exit 0
fi

error: pathspec 'files/default/turbolift_backup.sh' did not match any file(s) known to git


Update

Update

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/Mihip/Wct.git/'


Add script to download dataset

Add script to download dataset

#!/bin/sh

wget http://lwneal.com/hja_data.tar.gz
tar xzvf hja_data.tar.gz

error: pathspec 'download_data.sh' did not match any file(s) known to git


SH: Add make_iso script

SH: Add make_iso script

#!/bin/bash
# Create an ISO from a disk

function usage() {
    echo "USAGE"
    echo "    $(basename $0) device [output.iso]"
    echo
    echo "DEVICES"
    df | grep '^/dev/disk' | sed 's/^/    /'
}

[[ -z $1 ]] && { usage; exit 1; }
DISKDEV="$1"
OUTPUT="$2"

if [[ -z $2 ]]; then
    # Create iso name from device mount path
    VOLUME_LABEL=$(diskutil info "$DISKDEV" | grep 'Volume Name' | sed 's/.*Volume Name: *//')
    OUTPUT="$VOLUME_LABEL.iso"
fi

echo "Creating ISO from $DISKDEV to $OUTPUT"
sudo diskutil unmount $DISKDEV
hdiutil makehybrid -iso -joliet -o "$OUTPUT" $DISKDEV
#diskutil eject $DISKDEV

error: pathspec 'bin/make_iso.sh' did not match any file(s) known to git


- added script to push to all repos

- added script to push to all repos

#!/bin/bash

git push -u origin master
git push -u github master
git push -u google master

error: pathspec 'bin/push-all.sh' did not match any file(s) known to git


Add push-tag script

Add push-tag script

#!/usr/bin/env bash

set -e

# Insist repository is clean
git diff-index --quiet HEAD

git checkout $1
git pull origin $1
git push origin $1

version=$(grep "__version__ = " preshed/about.py)
version=${version/__version__ = }
version=${version/\'/}
version=${version/\'/}
version=${version/\"/}
version=${version/\"/}
git tag "v$version"
git push origin "v$version"

error: pathspec 'bin/push-tag.sh' did not match any file(s) known to git


DSpace 4 - update solr not needed

DSpace 4 - update solr not needed

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/Georgetown-University-Libraries/batch-tools.git/'


add rm2State.sh to git.  should clean up soon

#!/bin/bash

cat $1 | sed -e "s/non-LTR\|DNAt\|LINE\|SINE\|LTR\|DNA\|RC\|Unknown\|Other/TE/g"

error: pathspec 'bin/rm2State.sh' did not match any file(s) known to git


Introduce install-dependencies.sh

Introduce install-dependencies.sh

Introduce install-dependencies.sh which installs all dependency packages to building Seastar.

Signed-off-by: Takuya ASADA <4ebfb6f510af412d6e89fefa3ab96d9c8b5e3fff@scylladb.com>
Message-Id: <1469149918-7980-1-git-send-email-4ebfb6f510af412d6e89fefa3ab96d9c8b5e3fff@scylladb.com>

#!/bin/bash
#
# This file is open source software, licensed to you under the terms
# of the Apache License, Version 2.0 (the "License").  See the NOTICE file
# distributed with this work for additional information regarding copyright
# ownership.  You may not use this file except in compliance with the License.
#
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#

. /etc/os-release

if [ "$ID" = "ubuntu" ] || [ "$ID" = "debian" ]; then
    if [ "$VERSION_ID" = "14.04" ]; then
        sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
        sudo apt-get -y update
    fi
    apt-get install -y libaio-dev ninja-build ragel libhwloc-dev libnuma-dev libpciaccess-dev libcrypto++-dev libboost-all-dev libxen-dev libxml2-dev xfslibs-dev libgnutls28-dev liblz4-dev libsctp-dev gcc make
    if [ "$ID" = "ubuntu" ]; then
        apt-get install -y g++-5
        echo "g++-5 is installed for Seastar. To build Seastar with g++-5, specify '--compiler=g++-5' on configure.py"
    else # debian
        apt-get install -y g++
    fi
elif [ "$ID" = "centos" ] || [ "$ID" = "fedora" ]; then
    if [ "$ID" = "centos" ]; then
        yum install -y epel-release
        curl -o /etc/yum.repos.d/scylla-1.2.repo http://downloads.scylladb.com/rpm/centos/scylla-1.2.repo
    fi
    yum install -y libaio-devel hwloc-devel numactl-devel libpciaccess-devel cryptopp-devel libxml2-devel xfsprogs-devel gnutls-devel lksctp-tools-devel lz4-devel gcc make
    if [ "$ID" = "fedora" ]; then
        dnf install -y gcc-c++ ninja-build ragel boost-devel xen-devel libubsan libasan
    else # centos
        yum install -y scylla-binutils scylla-gcc-c++ scylla-ninja-build scylla-ragel scylla-boost-devel scylla-libubsan scylla-libasan scylla-libstdc++-static python34
        echo "g++-5 is installed for Seastar. To build Seastar with g++-5, specify '--compiler=/opt/scylladb/bin/g++ --static-stdc++' on configure.py"
        echo "Before running ninja-build, execute following command: . /etc/profile.d/scylla.sh"
    fi
fi

error: pathspec 'install-dependencies.sh' did not match any file(s) known to git


Convenience script to enable DVD playback.

#!/usr/bin/env bash

# https://itsfoss.com/play-dvd-ubuntu-1310/

sudo apt install libdvd-pkg
sudo dpkg-reconfigure libdvd-pkg
sudo apt-get install vlc

curl --output /tmp/libdvdcss2.deb http://download.videolan.org/pub/debian/stable/libdvdcss2_1.2.13-0_amd64.deb
sudo dpkg -i /tmp/libdvdcss2.deb
sudo apt-get install -f

sudo apt-get install libdvdread4 libdvdnav4

error: pathspec 'install-dvd-playback.sh' did not match any file(s) known to git