Original version

Original version

#!/bin/bash

# name of the backup snapshot
backup_snapshot_name="backup-snap"

# date
datetime=$(date +"%Y%m%dT%H%M%S")

# getting a list of all zpools

zpools=($(sudo zpool list -H -o name))

for act_zpool in ${zpools[*]}
do
    # create an recursive snapshot
    sudo zfs snapshot -r ${act_zpool}@${backup_snapshot_name}

    # iteratate through all filesystems

    fs2backup=($(sudo zfs list -r -H -o name -t filesystem))
    for act_fs2backup in ${fs2backup[*]}
    do
	fs_mounted=$(sudo zfs get mounted -o value -H ${act_fs2backup})
	fs_mountpoint=$(sudo zfs get mountpoint -o value -H ${act_fs2backup})

	if [ ${fs_mounted} = "yes" ]
	then
	    #echo "Filesystem ${act_fs2backup} is mounted at ${fs_mountpoint}"
	    backup_path=${fs_mountpoint}"/.zfs/snapshot/"${backup_snapshot_name}"/"
	    if [ -e ${backup_path} ]
	    then
		echo ${backup_path}
	    #else
		#echo "Missing the path ${backup_path}">&2
	    fi
	    #echo "Path for backup is ${backup_path}">&2
	#else
	    #echo "Filesystem ${act_fs2backup} is not mounted">&2
	fi

    done
done

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


add aliases for mysql commands

add aliases for mysql commands

mostly pointless

alias my-up='mysql.server start'
alias my-down='mysql.server stop'
alias my-restart='mysql.server restart'
alias my-status='mysql.server status'

error: pathspec 'mysql/aliases.zsh' did not match any file(s) known to git


modmine scripts: new script to check deprecated subs (we don't want to add their substitutes in a incremental release, where the old ones will still be present)

Former-commit-id: 91b2002b10ab65fd272656ceb4eb0c306f6a5883

#!/bin/bash
#
# default usage: check_deprecated.sh rel
#
# note: for the moment pass in the release
#
# sc 07/09
#
# TODO:- use webservice to get automatically the list of current subs
#        no need to pass the release then
#      - then: add to automine (?)

DATADIR=/shared/data/modmine/subs/chado
VALDIR=$DATADIR/new/validated
CHECKDIR=$VALDIR/deprecationCheck
NEXTDIR=$VALDIR/load_in_next_full_release

if [ -z "$1" ]
then
echo
echo "You need to specify the current modMine release number"
echo "Note that you also need to have built the file $CHECKDIR/sub.r{relNr}, "
echo "for example exporting it from modMine."
echo

exit

else
if [ ! -s "$CHECKDIR/sub.r$1" ]
then
echo
echo "File $CHECKDIR/sub.r$1 is missing."
echo "You need to build it with the list of submission currently in modMine, for example exporting a query result from modMine."
echo

exit
else
echo
echo "Running check of deprecated submissions from release $1 (we will not add their replacement submissions to an incremental release, where the old ones will be still present."
echo "...."
echo
fi

fi

cd $VALDIR
ls -1 *.chadoxml | sed 's/.chadoxml.*//g' | sort -n > $CHECKDIR/rel_candidates

cd $CHECKDIR
awk '{print $3}' $DATADIR/deprecated.dccid | sort -n > updated
awk '{print $1}' $DATADIR/deprecated.dccid | sort -n > deprecated

comm -12 deprecated sub.r$1 > depr.inrel
comm -12 updated sub.r$1 > up.inrel

grep -wf depr.inrel $DATADIR/deprecated.dccid | awk '{print $3}' | sort -n > dont_load.list

cat up.inrel >> dont_load.list

LOOPVAR=`sed 's/$/.chadoxml/g' dont_load.list | cat`
echo "********"
echo $LOOPVAR

cd $VALDIR

for sub in $LOOPVAR
do
mv $sub $NEXTDIR
done

exit;

# TODO, these don't work

elinks http://intermine.modencode.org/query/service/template/results?name=getSubmissions&constraint1=Submission.title&op1=eq&value1=*&size=1000&format=tab

wget "http://intermine.modencode.org/query/service/template/results?name=getSubmissions&constraint1=Submission.title&op1=eq&value1=*&size=1000&format=tab"

error: pathspec 'flymine-private/scripts/modmine/check_deprecated.sh' did not match any file(s) known to git


adding fastlane install on new project

adding fastlane install on new project

#!/bin/bash -e

echo "Creating Gemfile"
printf "source \"https://rubygems.org\"\n \ngem \'fastlane\'" > Gemfile

echo "Installing Fastlane using bundler"
bundle install
echo "Fastlane installed!!! "

echo "Creating fastlane folder"
mkdir fastlane

echo "Create empty Fastfile"
cd fastlane

printf "fastlane_version \"2.85.0\"\r\n\r\ndefault_platform :ios\r\n\r\nplatform :ios do\r\n\r\n  \r\n after_all do |lane|\r\n   notification(message:\"Finished lane: #{lane}\")\r\n end\r\n\r\n error do |lane, exception|\r\n   notification(subtitle: \"Erro in lane: #{lane}\", message:\"Erro in lane: #{exception}\")\r\n end\r\n\r\nend\r\n" > Fastfileprintf "fastlane_version \"2.85.0\"\r\n\r\ndefault_platform :ios\r\n\r\nplatform :ios do\r\n\r\n  \r\n after_all do |lane|\r\n   notification(message:\"Finished lane: #{lane}\")\r\n end\r\n\r\n error do |lane, exception|\r\n   notification(subtitle: \"Erro in lane: #{lane}\", message:\"Erro in lane: #{exception}\")\r\n end\r\n\r\nend\r\n" > Fastfile

echo "###########"
echo "Installation completed: now just run: 'bundle exec fastlane' "
echo "###########"

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


set composer install dir

set composer install dir

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/Tactics/cf-docker-base-php.git/'


added simple deployment script

added simple deployment script

#!/bin/bash

SRC_DIR=$1
APP_DIR=$2
VERSION=$3

if [ "$SRC_DIR" == "" ] || [ "$APP_DIR" == "" ] || [ "$VERSION" == "" ]; then
    echo "Syntax: deploy.sh SRC_DIR APP_DIR VERSION"
    exit 1
fi

cd $SRC_DIR || exit 1
echo "Pulling ..."
git pull

gradle build || exit 1

rm -rf $APP_DIR/import
unzip $SRC_DIR/import/build/distributions/gw2trades-importer-$VERSION.zip -d $APP_DIR/
mv $APP_DIR/gw2trades-importer-0.1-SNAPSHOT $APP_DIR/import
cp -v $APP_DIR/conf/import.yaml $APP_DIR/import/
chmod u+x $APP_DIR/import/*.sh

rm -rf $A__DIR/server/*
cp -v $SRC_DIR/server/build/libs/server-$VERSION.jar $APP_DIR/server

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


Add a script to update status at github when running test

#!/bin/bash
# Builds our circle image which runs tests
set -e

DIR=$(cd $(dirname $0) ; pwd -P)
ROBOCUP_ROOT="${DIR}/../../"

# Get sha sum
SHA_SUM="$(git rev-parse HEAD)"
SUCCESS=true

if [ "$1" == "" ]; then
    echo "Token needed to update statuses"
else
    curl -u "jgkamat:$1" https://api.github.com/jgkamat
fi

# Go to root so we can make.
cd ../../

# TODO Auth
curl -u jgkamat -X POST https://api.github.com/repos/robojackets/robocup-software/statuses/${SHA_SUM} -H "Content-Type: application/json" -d '{"state":"pending", "description": "A check for compiling", "context": "circle/compile", "target_url": "https://circleci.com/gh/RoboJackets/robocup-software"}'
curl -u jgkamat -X POST https://api.github.com/repos/robojackets/robocup-software/statuses/${SHA_SUM} -H "Content-Type: application/json" -d '{"state":"pending", "description": "A check for cpp tests", "context": "circle/test-cpp", "target_url": "https://circleci.com/gh/RoboJackets/robocup-software"}'
curl -u jgkamat -X POST https://api.github.com/repos/robojackets/robocup-software/statuses/${SHA_SUM} -H "Content-Type: application/json" -d '{"state":"pending", "description": "A check for style", "context": "circle/style", "target_url": "https://circleci.com/gh/RoboJackets/robocup-software"}'
curl -u jgkamat -X POST https://api.github.com/repos/robojackets/robocup-software/statuses/${SHA_SUM} -H "Content-Type: application/json" -d '{"state":"pending", "description": "A check for firmware", "context": "circle/firmware", "target_url": "https://circleci.com/gh/RoboJackets/robocup-software"}'

if make; then
    curl -u jgkamat -X POST https://api.github.com/repos/robojackets/robocup-software/statuses/${SHA_SUM} -H "Content-Type: application/json" -d '{"state":"success", "description": "A check for compiling", "context": "circle/compile", "target_url": "https://circleci.com/gh/RoboJackets/robocup-software"}'
else
    curl -u jgkamat -X POST https://api.github.com/repos/robojackets/robocup-software/statuses/${SHA_SUM} -H "Content-Type: application/json" -d '{"state":"failure", "description": "A check for compiling", "context": "circle/compile", "target_url": "https://circleci.com/gh/RoboJackets/robocup-software"}'
    SUCCESS=false
fi

if make test-cpp; then
    curl -u jgkamat -X POST https://api.github.com/repos/robojackets/robocup-software/statuses/${SHA_SUM} -H "Content-Type: application/json" -d '{"state":"success", "description": "A check for cpp tests", "context": "circle/test-cpp", "target_url": "https://circleci.com/gh/RoboJackets/robocup-software"}'
else
    curl -u jgkamat -X POST https://api.github.com/repos/robojackets/robocup-software/statuses/${SHA_SUM} -H "Content-Type: application/json" -d '{"state":"failure", "description": "A check for cpp tests", "context": "circle/test-cpp", "target_url": "https://circleci.com/gh/RoboJackets/robocup-software"}'
    SUCCESS=false
fi

if make robot2015; then
    curl -u jgkamat -X POST https://api.github.com/repos/robojackets/robocup-software/statuses/${SHA_SUM} -H "Content-Type: application/json" -d '{"state":"success", "description": "A check for firmware", "context": "circle/firmware", "target_url": "https://circleci.com/gh/RoboJackets/robocup-software"}'
else
    curl -u jgkamat -X POST https://api.github.com/repos/robojackets/robocup-software/statuses/${SHA_SUM} -H "Content-Type: application/json" -d '{"state":"failure", "description": "A check for firmware", "context": "circle/firmware", "target_url": "https://circleci.com/gh/RoboJackets/robocup-software"}'
    SUCCESS=false
fi

# TODO style check
curl -u jgkamat -X POST https://api.github.com/repos/robojackets/robocup-software/statuses/${SHA_SUM} -H "Content-Type: application/json" -d '{"state":"success", "description": "A check for style", "context": "circle/style", "target_url": "https://circleci.com/gh/RoboJackets/robocup-software"}'

# Fail the build if anything fails
return $($SUCCESS)

error: pathspec 'util/docker/maketest.sh' did not match any file(s) known to git


update: next(glibc)

update: next(glibc)

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/takeutch-kemeco/private-build-script.git/'


fix: next(libxml2)

fix: next(libxml2)


add: next(xf86-input-wacom)

add: next(xf86-input-wacom)


update: next(llvm)

update: next(llvm)


add: next(wayland)

add: next(wayland)


Add virusdetect installation

Add virusdetect installation

##depends:none

set -e
#NIC_MIRROR=www.nic.funet.fi
#TMPDIR_PATH=/tmp
#TOOLS_PATH=/opt/chipster/tools
BIOPERL_PATH=${TOOLS_PATH}/bioperl

if [ ! -d $BIOPERL_PATH ]
then
    mkdir /opt/chipster/tools/bioperl
fi

#Berkeley db
mkdir ${BIOPERL_PATH}/berkeleydb
tar xzf /mnt/artefacts/misc/db-6.2.23.tar.gz -C ${BIOPERL_PATH}/berkeleydb/
cd ${BIOPERL_PATH}/berkeleydb/db-6.2.23/build_unix/
../dist/configure --prefix=${BIOPERL_PATH}/berkeleydb
make
make install

cd $BIOPERL_PATH

#Perl
mkdir ${BIOPERL_PATH}/perl
curl -s http://www.cpan.org/src/5.0/perl-5.22.1.tar.gz | tar -xz -C ${TMPDIR_PATH}/
cd ${TMPDIR_PATH}/perl-5.22.1
./Configure -des -Dprefix=${BIOPERL_PATH}/perl/5.22.1
make
make test
make install

OLD_PATH=$PATH
export PATH=${BIOPERL_PATH}/perl/5.22.1/bin:$PATH

#cpanminus
curl -sL http://search.cpan.org/CPAN/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7040.tar.gz | tar -xz -C ${BIOPERL_PATH}/perl/
cd ${BIOPERL_PATH}/perl/App-cpanminus-1.7040
perl Makefile.PL
make
make test
make install

#DBI_File can't be installed with cpanm as the Bekrkely DB is not
#installed in default location
curl -sL http://search.cpan.org/CPAN/authors/id/P/PM/PMQS/DB_File-1.838.tar.gz | tar -xz -C ${BIOPERL_PATH}/perl/
cd ${BIOPERL_PATH}/perl/DB_File-1.838/
mv config.in config.in.orig
grep -v '^INCLUDE' config.in.orig | grep -v '^LIB' >  config.in
echo "INCLUDE = ${BIOPERL_PATH}/berkeleydb/include" >> config.in
echo "LIB = ${BIOPERL_PATH}/berkeleydb/lib" >> config.in
perl Makefile.PL
make
make test
make install

cd ${BIOPERL_PATH}
cpanm Test::NoWarnings
cpanm CGI
cpanm SVG
cpanm GD --force
cpanm GD::SVG
cpanm XML::Simple
cpanm XML::SAX
cpanm XML::Writer
cpanm Bio::Phylo
#cpanm BioPerl --force
cpanm Bio::Perl --force
cpanm Bio::Graphics --force

#install Virus_Detect
cd /opt/chipster/tools
curl -Ls https://github.com/kentnf/VirusDetect/archive/v1.62.tar.gz | tar -xz -C ${TOOLS_PATH}
cd ${TOOLS_PATH}
ln -s VirusDetect-1.62 virusdetect
cd virusdetect
sed -i -e s/'\/usr\/bin\/perl'/'\/opt\/chipster\/tools\/bioperl\/perl\/5.22.1\/bin\/perl'/g virus_detect.pl
cd bin/
sed -i -e s/'\/usr\/bin\/env perl'/'\/opt\/chipster\/tools\/bioperl\/perl\/5.22.1\/bin\/perl'/g virus_identify.pl

#get databases
cd ${TOOLS_PATH}/virusdetect/databases
db_version=$(curl ftp://bioinfo.bti.cornell.edu/pub/program/VirusDetect/virus_database/ | tail -1 | awk '{ print $NF}' 2> /dev/null)
wget ftp://bioinfo.bti.cornell.edu/pub/program/VirusDetect/virus_database/${db_version}/U95/*
version=$(curl ftp://bioinfo.bti.cornell.edu/pub/program/VirusDetect/virus_database/ | tail -1 | tr -d v | awk '{ print $NF}' 2> /dev/null)
rm plant_*
for type in $(ls *U95.tar.gz | cut -d _ -f1)
do
    tar zxvf ${type}_${version}_U95.tar.gz
    mv ${type}_${version}_U95 $type
    cd $type
    #  for extension in amb ann bwt fai nhr nin nsq pac phr pin psq sa
    for extension in amb ann bwt fai pac sa
    do
        mv *.$extension ../vrl_${type}.$extension
    done
    mv *_prot ../vrl_${type}_prot
    mv vrl_*_U95 ../vrl_${type}
    cd ..
    ../bin/formatdb -i vrl_${type} -p F
    ../bin/formatdb -i vrl_${type}_prot -p T
done

rm -rf ${BIOPERL_PATH}/berkeleydb

error: pathspec 'src/main/admin/vm/modules/external_tools/VirusDetect.bash' did not match any file(s) known to git


We no longer need to support RHEL4 or RHEL5.

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/dls-controls/dls_ade.git/'


mkdoc.sh - Add script to generate and cleanup pydocs

#!/bin/bash

ALL_MODS="$(echo IndexedRedis/**.py IndexedRedis/**/*.py | tr ' ' '\n' | sed -e 's|/|.|g' -e 's|.py$||g' -e 's|.__init__$||g' | tr '\n' ' ')"

pydoc -w ${ALL_MODS}
mv *.html doc/
pushd doc >/dev/null 2>&1
rm -f index.html

for fname in `echo *.html`;
do
    python <<EOT

import AdvancedHTMLParser
import sys

if __name__ == '__main__':

    filename = "${fname}"

    parser = AdvancedHTMLParser.AdvancedHTMLParser()
    parser.parseFile(filename)

    em = parser.filter(tagName='a', href='.')

    if len(em) == 0:
        sys.exit(0)

    em = em[0]

    em.href = 'IndexedRedis.html'

    parentNode = em.parentNode

    emIndex = parentNode.children.index(em)

    i = len(parentNode.children) - 1

    while i > emIndex:
        parentNode.removeChild( parentNode.children[i] )
        i -= 1

    with open(filename, 'wt') as f:
        f.write(parser.getHTML())

EOT

done

ln -s IndexedRedis.html index.html

popd >/dev/null 2>&1

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


Added salt_bootstrap to install salt minions

#!/bin/bash

# Configuration
###############

# Functions
###########
function show_help {
    echo "Help Text"
    echo "Usage: $0 [options]"
    echo "Options:"
    echo -e "-h\tShow this help"
}

# Ask a question, defaults to yes
function yes_no_question () {
    read -r -p "$1 [Y/n] " response
    response=${response,,}
    if [[ "$response" =~ ^(yes|y|)$ ]]; then
        return 0
    else
        return 1
    fi
}

# Ask a question, defaults to no
function no_yes_question () {
    read -r -p "$1 [Y/n] " response
    response=${response,,}
    if [[ "$response" =~ ^(no|n|)$ ]]; then
        return 0
    else
        return 1
    fi
}

# Useful Variables
##################
# Directory containing this script
#  (no matter where it is called from)
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
  DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
  SOURCE="$(readlink "$SOURCE")"
  [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
script_dir="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

# Script
########

# Read Command Line Arguments
while getopts "h" opt; do
    case "$opt" in
        h)
            show_help
            exit 0
            ;;
  esac
done

echo "Checking on n2n status..."
echo "(You may need to enter your sudo password)"
sudo status n2n
n2n_status="$?"
if [ ! "$n2n_status" ]; then
    if yes_no_question "n2n does not appear to be running, would you like to configure it now?"
    then
        eval "$script_dir/n2n_bootstrap.sh"
        echo "Checking on n2n status..."
        echo "(You may need to enter your sudo password)"
        sudo status n2n
        n2n_status="$?"
    else
        echo "Exiting..."
        exit 1
    fi
fi

if [ ! "$n2n_status" ]; then
    # n2n Stopped
    echo "n2n does not appear to be running, exiting..."
    exit 1
else
    # n2n Running
    echo "n2n apears to be running!"

    echo "Checking on salt dns entry..."
    if grep -q "salt" "/etc/hosts"
    then
        echo "Salt server dns is setup!"
    else
        echo "Adding salt dns entry to hosts..."
        echo "(You may need to enter your sudo password)"
        echo -e "10.1.2.5\tsalt" | sudo tee -a /etc/hosts > /dev/null
    fi

    echo "Installing salt minion..."
    echo "(You may need to enter your sudo password)"
    eval "wget -O - http://bootstrap.saltstack.org | sudo sh"
fi

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


Fix `clean` rule.

Fix `clean` rule.

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/danfuzz/samizdat.git/'


Fix syntax error in clang-format script

Fix syntax error in clang-format 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/nschloe/seacas.git/'


Design a cas-overlay that can be built by the docker auto-build

#!/bin/bash
export JAVA_HOME=/opt/jre-home
export PATH=$PATH:$JAVA_HOME/bin:.
# echo "Use of this image/container constitutes acceptence of the Oracle Binary Code License Agreement for Java SE."
exec java -jar /cas-overlay/target/cas.war

error: pathspec 'docker/cas-overlay/bin/run-cas.sh' did not match any file(s) known to git


Add convinience script

Add convinience script

git pull
./scripts/package.sh
scp rpm/x86_64/millionaire-0.3.0-1.x86_64.rpm jnferner.com:~/
ssh jnferner.com rpm -Uhv millionaire-0.3.0-1.x86_64.rpm

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


Added tidy up to script

Added tidy up to 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/elliotforbes/tutorialedge-v2.git/'


Add deploy script

Add deploy 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/shoreditch-ops/artillery-docs.git/'


add: deploy script

add: deploy script

#!/usr/bin/env bash
## Author: Prasanna V. Loganathar

set -e
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )"
cd ${dir}

binary_name="nextfirst-core"
dest_path="~/workspace/bin/"

# Build
go get -u github.com/golang/dep/cmd/dep
dep ensure && go build -o ./bin/nextfirst-core

# Deploy
mkdir -p "$dest_path"

wait_for_process_briefly(){
    local pid=$(pidof "$@")
    local i=0
    while kill -0 "$pid"; do
        sleep 0.1s
        i=$((i+1))
        if [ $i -gt 900 ]; then kill -9 "$pid"; fi;
    done
}

wait_for_process_briefly "$binary_name"
mv -f "./bin/${binary_name}" "$dest_path"
nohup "${dest_path}/${binary_name}"


cleaned up deploy.sh.

cleaned up deploy.sh.

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/commerce-wa-ols/commerce-intranet.git/'


re-added apache to the start list

re-added apache to the start list

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/markllama/atomicapp-examples.git/'


use curl to check connectivity if present; add timeout to wget

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/paraschas/vpn_inf.uth.gr.git/'


Add mate terminal theme script

Add mate terminal theme 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/markmiro/tomorrow-theme.git/'


add honeyd.sh

add honeyd.sh

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/halexan/msc.git/'


test commit on branch dev

test commit on branch dev

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/WeiCongcong/WCC.git/'


Fix systemd-network-startup-timeout.sh

Fix systemd-network-startup-timeout.sh

Signed-off-by: Oscar Andreasson <7c96881024bc55b9728595b077993338c023b07f@pelagicore.com>

#!/bin/bash
# vagrant-cookbook
# Copyright (C) 2016 Pelagicore AB
#
# Permission to use, copy, modify, and/or distribute this software for
# any purpose with or without fee is hereby granted, provided that the
# above copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
# WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
# BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
#
# For further information see LICENSE
#
#
# Usage: systemd-network-startup-timeout.sh
#
# Shortens the network startup timeout on systemd networking service from 5
# minutes to 1 minute.
#
# Note: Needs to be run as root
#

echo "Setting timeout of network startup to 1 minute"

sed -i 's/TimeoutStartSec=5min/TimeoutStartSec=1min/' \
    /etc/systemd/system/network-online.target.wants/networking.service

systemctl daemon-reload

#!/bin/bash
# vagrant-cookbook
# Copyright (C) 2016 Pelagicore AB
#
# Permission to use, copy, modify, and/or distribute this software for
# any purpose with or without fee is hereby granted, provided that the
# above copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
# WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
# BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
# SOFTWARE.
#
# For further information see LICENSE
#
#
# Usage: systemd-network-startup-timeout.sh
#
# Shortens the network startup timeout on systemd networking service from 5
# minutes to 1 minute.
#
# Note: Needs to be run as root
#

echo "Setting timeout of network startup to 1 minute"

sed -i 's/TimeoutStartSec=5min/TimeoutStartSec=1min/' \
    /etc/systemd/system/network-online.target.wants/networking.service

journalctl daemon-reload


Deploy script

Deploy script

#!/bin/bash
# Deploy to Kubernetes from docker image ID.

# Confirm from: http://stackoverflow.com/a/1885534/411514
image_name=$1

echo "Deploying image cs61a/ok-server:"$image_name
read -p "Are you sure? " -n 1 -r
echo    # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
    echo "Watch with 'watch kubectl get pods'"
    kubectl delete hpa ok-web-rc
    kubectl rolling-update ok-web-rc --update-period 10s --image=cs61a/ok-server:$image_name
    kubectl autoscale rc ok-web-rc --min=5 --max=15 --cpu-percent=75
    echo "Done"
fi

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


only run npm and bower if necessary

only run npm and bower if necessary

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/aligerum/sentry.git/'


Prevent update script from failing.

Prevent update script from failing.

`git stash pop` may return 1 when there is no valid stash.

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/zhaostu/dotfiles.git/'


Adding a script that dynamically determines which deploy user to use and then runs the unasttended upgrade script.

#!/bin/bash
#HOST="monitor01.nmdev.us"
#USER=""

# Try an SSH command to ubuntu first (faster that if root first)
RETURN=$(ssh -q -i /var/jenkins_home/.ssh/aws.pem -o StrictHostKeyChecking=no -o NumberOfPasswordPrompts=0 ubuntu@$HOSTNAME 'exit')
if [ $? -eq 0 ]; then
  USER="ubuntu"
  UP_CMD="sudo -i
  unattended-upgrade -v"
else
  USER="root"
  UP_CMD="yum update -y --security;"
fi
ssh -q -i /var/jenkins_home/.ssh/aws.pem -o StrictHostKeyChecking=no $USER@$HOSTNAME <<EOF
  $(echo $UP_CMD)
EOF

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


fix jedi-vim pull problem

fix jedi-vim pull problem

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/hlx98007/deployment-scripts.git/'


Add oricutron

Add oricutron

Still needs a bit of tweaking in order to launch from emulationstation, I think one of the roms for it may also be bad or something cause it keeps saying that its failing to load even with the correct permissions.

#!/usr/bin/env bash

# This file is part of The RetroPie Project
#
# The RetroPie Project is the legal property of its developers, whose names are
# too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.
#
# See the LICENSE.md file at the top-level directory of this distribution and
# at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md
#

rp_module_id="oricutron"
rp_module_desc="Oricutron Oric 1/Oric Atmos emulator"
rp_module_menus="4+"
rp_module_flags="!mali"

function depends_oricutron() {
    getDepends cmake libsdl1.2-dev
}

function sources_oricutron() {
    gitPullOrClone "$md_build" https://github.com/HerbFargus/oricutron.git
}

function build_oricutron() {
    make clean
    make
}

function install_oricutron() {
    md_ret_files=(
        'oricutron'
        'oricutron.cfg'
        'roms'
        'disks'
        'images'
    )
}

function configure_oricutron() {
    mkRomDir "oric"

    #copy demo disks
    mv -v $md_inst/disks/* "$romdir/oric/"
    rm -R $md_inst/disks/

    addSystem 1 "$md_id-atmos" "oric" "pushd; $md_inst/oricutron; --machine "atmos" %ROM% --fullscreen; popd" "Oric 1" ".dsk .tap"
    addSystem 0 "$md_id-oric1" "oric" "$md_inst/oricutron --machine "oric1" %ROM% --fullscreen" "Oric 1" ".dsk .tap"
    addSystem 0 "$md_id-o16k" "oric" "$md_inst/oricutron --machine "o16k" %ROM% --fullscreen" "Oric 1" ".dsk .tap"
    addSystem 0 "$md_id-telestrat" "oric" "$md_inst/oricutron --machine "telestrat" %ROM% --fullscreen" "Oric 1" ".dsk .tap"
    addSystem 0 "$md_id-pravetz" "oric" "$md_inst/oricutron --machine "pravetz" %ROM% --fullscreen" "Oric 1" ".dsk .tap"

    chown -R $user:$user "$romdir/oric"
}

error: pathspec 'scriptmodules/emulators/oricutron.sh' did not match any file(s) known to git


Add path.sh and export dot13/bin folder

Add path.sh and export dot13/bin folder

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/ernestas-poskus/dot13.git/'


Create propose_translation_update for horizon

Add slave-file to handle horizon translations.
Setup periodic job to import horizon translations the same way its done
for other projects.

Change-Id: I0e28f0268e7f3fdea9d5f22d2e896b0079410ea6

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/open-switch/infra_puppet-jenkins.git/'


Fixed generation of expected output

Fixed generation of expected output

test/full program tests/fallback targets/init.sh

error: pathspec 'test/full' did not match any file(s) known to git
error: pathspec 'program' did not match any file(s) known to git
error: pathspec 'tests/fallback' did not match any file(s) known to git
error: pathspec 'targets/init.sh' did not match any file(s) known to git


various changes to the script

various changes to the 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/aptira/openstack-training-labs.git/'


synchronize file for grid5000

synchronize file for grid5000

git-svn-id: 9146c88ff6d39b48099bf954d15d68f687b3fa69@2102 28e8926c-6b08-0410-baaa-805c5e19b8d6

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/lpellegr/scheduling.git/'


sub script for new file

sub script for new file

#!/bin/bash

#PBS -N czysz_mod_r
#PBS -S /bin/bash
#PBS -l walltime=30:00:00
#PBS -l nodes=1:ppn=4
#PBS -l mem=16gb

#PBS -o $HOME/
#PBS -e $HOME/oligo.err

module load R/3.1.0

#DATA_DIR=/home/t.cczysz/mRNA_expression/CEL_files/CD4
R CMD BATCH --no-save --no-restore /home/t.cri.cczysz/thesis/scripts/oligo.R

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


add locate

add locate

debian/1-system.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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/RemyNoulin/systemSetup.git/'


Simple launcher script for linux (and other *nix OS's that need it) that just sets up LD_LIBRARY_PATH

#!/bin/sh
export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH
./BlackPearlDS3BrowserApp

error: pathspec 'installer/linux/launcher.sh' did not match any file(s) known to git


Show the list of dependencies required for a package to be built
in the "list" target.

--HG--
extra : convert_revision : e49a14940a078c994703d7ef678cc7e808b9d192

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/Bubble-be/void-packages.git/'


get search service status

get search service status

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/stanxii/indexRiver.git/'


windows install script

windows install script

#!/usr/bin/env bash

function die() {
  echo $*
  exit 1
}

if [ $# -ne "1" ]
then
    die "$0: Received $# args... version required"
fi

#cd client
mvn clean || die "Could not clean?"
mvn install -Dmaven.test.skip=true || die "Could not build?"
#cd -
cp target/lantern-*-jar-with-dependencies.jar install/common/lantern.jar || die "Could not copy jar?"

VERSION=$1
/Applications/install4j\ 5/bin/install4jc -m windows -r $VERSION ./install/lantern.install4j

name=lantern-$VERSION.exe
mv install/Lantern.exe $name
echo "Uploading to http://cdn.bravenewsoftware.org/$name..."
aws -putp lantern $name
echo "Uploaded lantern to http://cdn.bravenewsoftware.org/$name"

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


fix the v + version in a8sidecar tarball

#!/bin/bash
#
# Copyright 2016 IBM Corporation
#
#   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.

set -x
set -e

A8SIDECAR_RELEASE=0.2.0-alpha1
OPENRESTY_RELEASE=1.9.15.1
FILEBEAT_RELEASE=1.2.2

apt-get -y update && apt-get -y install libreadline-dev libncurses5-dev libpcre3-dev \
    libssl-dev perl make build-essential curl wget

wget -O /tmp/openresty-${OPENRESTY_RELEASE}.tar.gz https://openresty.org/download/openresty-${OPENRESTY_RELEASE}.tar.gz
wget -O /tmp/filebeat_${FILEBEAT_RELEASE}_amd64.deb https://download.elastic.co/beats/filebeat/filebeat_${FILEBEAT_RELEASE}_amd64.deb
wget -O /tmp/a8sidecar-v${A8SIDECAR_RELEASE}-linux-amd64.tar.gz https://github.com/amalgam8/sidecar/releases/download/v${A8SIDECAR_RELEASE}/a8sidecar-v${A8SIDECAR_RELEASE}-linux-amd64.tar.gz

##Install OpenResty
adduser --disabled-password --gecos "" nginx
mkdir /var/log/nginx
cd /tmp && \
    tar -xzf /tmp/openresty-${OPENRESTY_RELEASE}.tar.gz && \
    cd /tmp/openresty-${OPENRESTY_RELEASE} && \
    ./configure --with-pcre-jit --with-cc-opt='-O3' --with-luajit-xcflags='-O3' --conf-path=/etc/nginx/nginx.conf --pid-path=/var/run/nginx.pid --user=nginx && \
    make && \
    make install && \
    ln -s /usr/local/openresty/nginx/sbin/nginx /usr/local/bin/nginx && \
    ldconfig

#Install Filebeat
dpkg -i /tmp/filebeat_${FILEBEAT_RELEASE}_amd64.deb

#Install Sidecar -- This should be in the end, as it overwrites nginx.conf, filebeat.yml
tar -xzf /tmp/a8sidecar-v${A8SIDECAR_RELEASE}-linux-amd64.tar.gz -C /

#Cleanup
rm -rf /tmp/openresty-${OPENRESTY_RELEASE}
rm /tmp/openresty-${OPENRESTY_RELEASE}.tar.gz
rm /tmp/filebeat_${FILEBEAT_RELEASE}_amd64.deb
rm /tmp/a8sidecar-v${A8SIDECAR_RELEASE}-linux-amd64.tar.gz

#!/bin/bash
#
# Copyright 2016 IBM Corporation
#
#   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.

set -x
set -e

A8SIDECAR_RELEASE=v0.2.0-alpha1
OPENRESTY_RELEASE=1.9.15.1
FILEBEAT_RELEASE=1.2.2

apt-get -y update && apt-get -y install libreadline-dev libncurses5-dev libpcre3-dev \
    libssl-dev perl make build-essential curl wget

wget -O /tmp/openresty-${OPENRESTY_RELEASE}.tar.gz https://openresty.org/download/openresty-${OPENRESTY_RELEASE}.tar.gz
wget -O /tmp/filebeat_${FILEBEAT_RELEASE}_amd64.deb https://download.elastic.co/beats/filebeat/filebeat_${FILEBEAT_RELEASE}_amd64.deb
wget -O /tmp/a8sidecar-${A8SIDECAR_RELEASE}-linux-amd64.tar.gz https://github.com/amalgam8/sidecar/releases/download/v${A8SIDECAR_RELEASE}/a8sidecar-${A8SIDECAR_RELEASE}-linux-amd64.tar.gz

##Install OpenResty
adduser --disabled-password --gecos "" nginx
mkdir /var/log/nginx
cd /tmp && \
    tar -xzf /tmp/openresty-${OPENRESTY_RELEASE}.tar.gz && \
    cd /tmp/openresty-${OPENRESTY_RELEASE} && \
    ./configure --with-pcre-jit --with-cc-opt='-O3' --with-luajit-xcflags='-O3' --conf-path=/etc/nginx/nginx.conf --pid-path=/var/run/nginx.pid --user=nginx && \
    make && \
    make install && \
    ln -s /usr/local/openresty/nginx/sbin/nginx /usr/local/bin/nginx && \
    ldconfig

#Install Filebeat
dpkg -i /tmp/filebeat_${FILEBEAT_RELEASE}_amd64.deb

#Install Sidecar -- This should be in the end, as it overwrites nginx.conf, filebeat.yml
tar -xzf /tmp/a8sidecar-${A8SIDECAR_RELEASE}-linux-amd64.tar.gz -C /

#Cleanup
rm -rf /tmp/openresty-${OPENRESTY_RELEASE}
rm /tmp/openresty-${OPENRESTY_RELEASE}.tar.gz
rm /tmp/filebeat_${FILEBEAT_RELEASE}_amd64.deb
rm /tmp/a8sidecar-${A8SIDECAR_RELEASE}-linux-amd64.tar.gz


Install

Install

#!/bin/sh
# omv-theme https://github.com/Wolf2000Pi/omv-theme  Version 1.0
# by Wolf2000

chmod +x omv-theme.sh

cp omv-theme.sh /urs/bin/omv-theme

cd

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


production pbf creation script

production pbf creation script

#!/bin/bash
set -e

rm -rf planet-old.osm.pbf
rm -rf planet-new.osm.pbf
touch mapsnapshpttime.txt
./osmupdate --verbose --drop-author --compression-level=1 planet-latest.osm.pbf planet-new.osm.pbf &

rm -rf tmp

mkdir tmp
cd tmp
mkdir nodetiles
mkdir waytiles
mkdir waytiles55
mkdir nodes55

../../jdk8/bin/java -Xmx6144M -Xms6144M -Xmn256M -cp ../pbfparser.jar:../brouter_fc.jar -Ddeletetmpfiles=true -DuseDenseMaps=true  btools.util.StackSampler btools.mapcreator.OsmFastCutter ../lookups.dat nodetiles waytiles nodes55 waytiles55  bordernids.dat  relations.dat  restrictions.dat  ../all.brf ../trekking.brf ../softaccess.brf ../planet-new.osm.pbf

mv ../planet-latest.osm.pbf ../planet-old.osm.pbf
mv ../planet-new.osm.pbf ../planet-latest.osm.pbf

mkdir unodes55
../../jdk8/bin/java -Xmx6144M -Xms6144M -Xmn256M -cp ../brouter_fc.jar -Ddeletetmpfiles=true -DuseDenseMaps=true btools.util.StackSampler btools.mapcreator.PosUnifier nodes55 unodes55 bordernids.dat bordernodes.dat ../../srtm3_bef

mkdir segments
../../jdk8/bin/java  -Xmx6144M -Xms6144M -Xmn256M -cp ../brouter_fc.jar -DuseDenseMaps=true -DskipEncodingCheck=true btools.util.StackSampler btools.mapcreator.WayLinker unodes55 waytiles55 bordernodes.dat restrictions.dat ../lookups.dat ../all.brf segments rd5

cd ..

rm -rf segments
mv tmp/segments segments
touch -r mapsnapshpttime.txt segments/*.rd5
rsh -l webrouter brouter.de "rm -rf segments; mkdir segments"
scp -p segments/* webrouter@brouter.de:segments
rsh -l webrouter brouter.de ./updateRd5.sh

./scan_world.sh
./traffic_simulation.sh

error: pathspec 'misc/scripts/mapcreation/process_pbf_planet_production.sh' did not match any file(s) known to git


picked John Book file for HW3b from his commit 05b7c8106ea5f817f39e0407c2d556ef27d0ab89

#!/bin/bash

#######################################################################
#
# MNXB01-2017-HW3b
# File: pokemoninfo.sh.skeleton file
# Author: Florido Paganelli florido.paganelli@hep.lu.se
#         Lund University
#
########################################################################

# The script must take in input the directory where the database is stored.
# Stores it in a variable called DBDIR.
DBDIR=$1

# use this function to show an error message with usage information.
errormsg()
{
	echo "Usage:"
	echo "$0 <directory>"
	echo "directory must be a path containing a csv dataset."
	exit 1;
}

### Exercise 1: 1 points
# Write an error and exit if no parameter exists or if the parameter is empty.
# hint: use the if construct and the proper conditions to verify parameters
# and directory existence.

if [ -z ${DBDIR} ]; then
	errormsg;
fi

### Exercise 2: 1 points
# Write an error and exit if the DBDIR directory does not exist or it's not a directory.
# Hint: read http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_01.html

if [ ! -d $DBDIR ]; then
	DBDIR=$(pwd)$DBDIR;
	if [ ! -d $DBDIR ]; then
		errormsg;
	fi
	echo "Redirected to $DBDIR";
fi

### Exercise 3: 1 point
# Use the grep command to find which file contains "Pokémon Red Version"
# and output the results on screen.
# grep examples: http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_04_02.html

echo -e "\nSearching for Pokémon Red..."

# Ignore allplatforms if it exists
grep --exclude '*allplatforms*' 'Pokémon Red Version' ${DBDIR}*.csv;

### Exercise 4: 1 point
# delete existing allplatform.csv file in preparation of the next exercise
echo -e "\nRemoving old allplatforms.csv"

# Ignore output
rm ${DBDIR}allplatforms.* > /dev/null;

### Exercise 5: 3 points
# Write a for loop that takes every file in the database and puts it
# into a single file
# called allplatforms.csv.
# Inspect the csv files to understand their structure,
# and make sure to remove the header lines.
# Hint: use the slides about for ... do ... done
#       use the tail command to remove the header lines (check 'man tail'),
#       use the file concatenator '>>' to write out the allplatforms.csv file

# create allplatforms file with a for loop
echo -e "\nCreating new allplatforms.csv"

# Create allplatforms.csv with header
head -1 ${DBDIR}header.csv > ${DBDIR}allplatforms.csv

# the fact that headers.csv is included does not matter since its tailed
for i in $(find ${DBDIR}*.csv); do
	tail -n +2 $i >> ${DBDIR}allplatforms.csv;
done

### Exercise 4: 1 point
# Sort the contents of the allplatforms.csv file by using the sort
# command and write the result in allplatforms.ordered.csv
# Hint: use \" as a delimiter for sort. Check 'man sort'
echo -e "\nSorting allplatforms.csv..."

# Tail to not include header
# Sorted by title in alphabetic order
head -1 ${DBDIR}header.csv > ${DBDIR}allplatforms.ordered.csv;
tail -n +2  ${DBDIR}allplatforms.csv | sort -k2 >> ${DBDIR}allplatforms.ordered.csv;

# Exercise 5: 4 points
# Write a for loop that, for each file, counts all the games
# in each file. Inspect the csv file to understand the structure of the
# csv file to get the right numbers.
# Hint: use the slides about for ... do ... done
#       use the '$()' syntax to put the output of a command inside a variable
#       use the program tail to get rid of useless lines
#       use the program wc to count things
#       make use of the | symbol to compose
#       use the 'basename' command to get rid of the directory part of the filename
# output the result in this form:
# <filename> has <number of games> games <newline>
# example output:
# poke.Android.csv has 2 game(s)
# poke.iOS.csv has 1 game(s)
echo -e "\nCalculating number of games for each file..."

# Ignore allplatforms and header files
for i in $(find ${DBDIR}*.csv ! -name '*allplatforms*' ! -name '*header*'); do
	echo $(basename $i) has $(tail -n +2 $i | wc -l) game'(s)'
done

exit 0;

error: pathspec 'johbook/HW3b/pokemoninfo.sh' did not match any file(s) known to git


Simple BLAST database

Simple BLAST database

Script to create simple BLAST database with inputs as the name of file containing local sequences in FASTA format and the type of sequences contained.

#!/bin/bash

# Phase 1

sequence=$1
dtype=$2

#create BLAST database with masking information
makeblastdb -in $sequence -dbtype ${dtype} -parse_seqids -out $sequence -logfile ${sequence}_blast.log

#verify if masking information is added properly
blastdbcmd -db $sequence -info

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


modify du alias

modify du alias

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/kylelundstedt/dotfiles.git/'


gerp == grep

gerp == grep

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/ankushagarwal/dotfiles.git/'


Document httpserver function

Document httpserver function

# Make jumping between directories a bit less painful.
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias -- -='cd -'

# Shortcuts for long directory listing.
alias ll='ls -l'

# List all files.
alias l='ls -laF'

# Create a new directory and `cd` into it.
take() {
  mkdir "$1" && cd "$1"
}

# Shorter way to `sudo` something.
alias _='sudo'

# Update and edit dotfiles.
alias reload!='. ~/.zshrc'

# Tab completion for dotfiles.
# Totally lifted from [rbenv](https://github.com/sstephenson/rbenv).
compctl -K _dotfiles dotfiles

_dotfiles() {
  local word words completions
  read -cA words
  word="${words[2]}"

  if [ "${#words}" -eq 2 ]; then
    completions="$(dotfiles commands)"
  else
    completions="$(dotfiles completions "${word}")"
  fi

  reply=("${(ps:\n:)completions}")
}

ack() {
  echo "Running ag in 1 second"
  sleep 1
  ag "$@"
}

alias sw='simple'

# Usage: httpserver [<port>]
httpserver() {
  python -m SimpleHTTPServer "$@"
}

# Make jumping between directories a bit less painful.
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias -- -='cd -'

# Shortcuts for long directory listing.
alias ll='ls -l'

# List all files.
alias l='ls -laF'

# Create a new directory and `cd` into it.
take() {
  mkdir "$1" && cd "$1"
}

# Shorter way to `sudo` something.
alias _='sudo'

# Update and edit dotfiles.
alias reload!='. ~/.zshrc'

# Tab completion for dotfiles.
# Totally lifted from [rbenv](https://github.com/sstephenson/rbenv).
compctl -K _dotfiles dotfiles

_dotfiles() {
  local word words completions
  read -cA words
  word="${words[2]}"

  if [ "${#words}" -eq 2 ]; then
    completions="$(dotfiles commands)"
  else
    completions="$(dotfiles completions "${word}")"
  fi

  reply=("${(ps:\n:)completions}")
}

ack() {
  echo "Running ag in 1 second"
  sleep 1
  ag "$@"
}

alias sw='simple'

httpserver() {
  python -m SimpleHTTPServer "$@"
}


Update build.sh

Update build.sh

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/robertswiecki/oss-fuzz.git/'


Create .conda_deploy.sh

Create .conda_deploy.sh

#!/bin/bash
# this script uses the ANACONDA_TOKEN env var.
# to create a token:
# >>> anaconda login
# >>> anaconda auth -c -n travis --max-age 307584000 --url https://anaconda.org/moble/quaternion --scopes "api:write api:read"
# then go to the Travis-CI settings page for this package, and create an environment variable with that token.

# I stole these ideas from Yoav Ram <https://gist.github.com/yoavram/05a3c04ddcf317a517d5>

echo "Trying to run deploy script"

set -e

PACKAGENAME="scri"

if [[ "${CONDA}" == "true" ]]; then

    conda config --set anaconda_upload no;

    conda install -n root conda-build anaconda-client

    echo "Building package"
    conda build .

    echo "Converting conda package..."
    conda convert -f --platform osx-64 $HOME/miniconda/conda-bld/linux-64/${PACKAGENAME}-*.tar.bz2 --output-dir conda-bld/
    conda convert -f --platform linux-32 $HOME/miniconda/conda-bld/linux-64/${PACKAGENAME}-*.tar.bz2 --output-dir conda-bld/
    conda convert -f --platform linux-64 $HOME/miniconda/conda-bld/linux-64/${PACKAGENAME}-*.tar.bz2 --output-dir conda-bld/

    echo "Deploying to Anaconda.org..."
    anaconda -t $ANACONDA_TOKEN upload --force --no-progress conda-bld/**/${PACKAGENAME}-*.tar.bz2

    echo "Successfully deployed to Anaconda.org."

else

    echo "Skipping deployment"

fi

exit 0

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


PhantomJS provision script

PhantomJS provision script

#!/bin/bash

if [ -f "/opt/phantomjs/bin/phantomjs" ]; then
	echo "INFO: PhantomJS is already installed"
else
	echo "INFO: Installing PhantomJS"
	wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 -nv
	tar -xvf phantomjs-2.1.1-linux-x86_64.tar.bz2
	rm phantomjs-2.1.1-linux-x86_64.tar.bz2
	sudo mv phantomjs-2.1.1-linux-x86_64 /opt/phantomjs
	sudo chown -R www-data:www-data /opt/phantomjs
	sudo chmod -R 755 /opt/phantomjs
fi

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


rename alias

rename alias

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/reedcwilson/dotfiles.git/'


Create dnsmasq-adblock.sh

Create dnsmasq-adblock.sh

#!/bin/bash
# This if for Asuswrt-merlin

# Add the following configs to /jffs/configs/dnsmasq.conf.add
# addn-hosts=/tmp/hosts.dnsmasq

declare -a DOMAIN_BLACKLIST=(
'https://pgl.yoyo.org/as/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext'
'https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts'
'http://mirror1.malwaredomains.com/files/justdomains'
'http://sysctl.org/cameleon/hosts'
'https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist'
'https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt'
'https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt'
'https://hosts-file.net/ad_servers.txt'
'https://raw.githubusercontent.com/quidsup/notrack/master/trackers.txt'
'https://ransomwaretracker.abuse.ch/downloads/RW_DOMBL.txt'
)

declare -a ADBLOCK_SUBSCRIPTION_LIST=(
'https://easylist-downloads.adblockplus.org/easyprivacy.txt'
'https://easylist-downloads.adblockplus.org/easylistchina.txt'
'https://easylist-downloads.adblockplus.org/easylist.txt'
'https://easylist-downloads.adblockplus.org/malwaredomains_full.txt'
'https://easylist-downloads.adblockplus.org/exceptionrules.txt'
)

HOSTS_FILE='/tmp/hosts.dnsmasq'
HOSTS_FILE_CACHE_DIR="${HOSTS_FILE}.cache"

download_blacklist() {
    logger "Downloading $1 to $2"
    wget -qO- "$1" | grep -Ev '^[ \t]*#' | grep -oE '[ \t\r\n\v\f]*([a-zA-Z0-9]+[-a-zA-Z0-9]*\.)+[a-zA-Z]{2,}[ \t\r\n\v\f]*' > $2
}

download_blacklist_all() {
    local i=0
    for domain in "$@"; do
        download_blacklist "${domain}" "${HOSTS_FILE_CACHE_DIR}/blacklist-${i}.hosts"
        ((i++))
    done
}

download_adblock_list() {
    logger "Downloading $1 to $2"
    wget -qO- "$1" | grep -Ev '^[ \t]*#' > "$2.tmp"
    cat "$2.tmp" | grep -oE '^\|\|[A-Za-z0-9\.-]+\^$' | awk '{print substr($0, 3, length($0)-3)}' > "$2"
    # for exception (whitelist)
    cat "$2.tmp" | grep -oE '^@@\|\|[A-Za-z0-9\.-]+\^$' | awk '{print substr($0, 5, length($0)-5)}' > "$2.exception"
    rm "$2.tmp"
}

download_adblock_list_all() {
    local i=0
    # regular rules
    for domain in "$@"; do
        download_adblock_list "${domain}" "${HOSTS_FILE_CACHE_DIR}/adblock-${i}.hosts"
        ((i++))
    done
}

generate_host() {
    local HOSTS_DIR="$1"
    local HOSTS_DST="$2"
    logger "Generating ${HOSTS_DST} file.."
    find "${HOSTS_DIR}" -name *.hosts -type f -exec awk '!a[$0]++' {} + > ${HOSTS_DST}
    sed -i 's/^/0.0.0.0/' ${HOSTS_DST}
}

main() {
    rm -f ${HOSTS_FILE}
    rm -rf ${HOSTS_FILE_CACHE_DIR}
    mkdir -p ${HOSTS_FILE_CACHE_DIR}

    download_blacklist_all "${DOMAIN_BLACKLIST[@]}"
    download_adblock_list_all "${ADBLOCK_SUBSCRIPTION_LIST[@]}"
    generate_host "${HOSTS_FILE_CACHE_DIR}" "${HOSTS_FILE}"

    rm -rf ${HOSTS_FILE_CACHE_DIR}

    logger "Restarting DNSMasq.."
    logger $(service restart_dnsmasq)
}

# for debugging only, Asuswrt-merlin has this function by default
#logger() {
#    echo $1
#}

main "$@"

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


Cleaned up how the submenu gets called.

Cleaned up how the submenu gets called.

Instead of repeating the same commands above and below every exported text for the submenu, I made them into their own
variables at the top of the script, so they just get called as 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/jerius/cpmigrator.git/'


added setup

added setup

#!/bin/sh

mkdir application/cache
chown www-data:www-data application/cache

mkdir application/logs
chown www-data:www-data application/logs

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


Create setup.sh

Create setup.sh

#!/bin/bash
##
## rbenv4ubuntu
## version 0.1
## This Bash script install Ruby on Rails with rbenv on Ubuntu.
## - run as standard user
## - environment is created in the home directory
##

SUDO = which sudo
GIT = which git
RUBY_VERSION = "1.9.3-p362"

echo "Update repositories"
$SUDO aptitude update

echo "Update repositories"
$SUDO apt-get install nodejs sqlite3 libsqlite3-dev zlib1g-dev build-essential libssl-dev libreadline-dev git-core

echo "Clone rbenv"
$GIT clone git://github.com/sstephenson/rbenv.git ~/.rbenv

echo "Setup paths"
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL

echo "Clone ruby-build"
mkdir -p ~/.rbenv/plugins
cd ~/.rbenv/plugins
$GIT clone git://github.com/sstephenson/ruby-build.git
exec $SHELL

echo "Install Ruby"
rbenv install $RUBY_VERSION
rbenv global $RUBY_VERSION
rbenv versions
rbenv local $RUBY_VERSION
exec $SHELL

echo "Install Rails and Bundler from gem"
cd ~
echo "gem: --no-ri --no-rdoc" > ~/.gemrc
gem install bundler
gem install rails

echo "Finish"


Create start.sh

Create start.sh

#!/bin/bash -
#

if ! test -d /data/gogs
then
	mkdir -p /var/run/sshd
	mkdir -p /data/gogs/data /data/gogs/conf /data/gogs/log /data/git
fi

if ! test -d /data/ssh
then
	mkdir /data/ssh
	ssh-keygen -q -f /data/ssh/ssh_host_key -N '' -t rsa1
	ssh-keygen -q -f /data/ssh/ssh_host_rsa_key -N '' -t rsa
	ssh-keygen -q -f /data/ssh/ssh_host_dsa_key -N '' -t dsa
	ssh-keygen -q -f /data/ssh/ssh_host_ecdsa_key -N '' -t ecdsa
	ssh-keygen -q -f /data/ssh/ssh_host_ed25519_key -N '' -t ed25519
	chown -R root:root /data/ssh/*
	chmod 600 /data/ssh/*
fi

service ssh start

# sync templates
test -d /data/gogs/templates || cp -ar ./templates /data/gogs/
rsync -rtv /data/gogs/templates/ ./templates/

ln -sf /data/gogs/log ./log
ln -sf /data/gogs/data ./data
ln -sf /data/git /home/git

if ! test -d ~git/.ssh
then
  mkdir ~git/.ssh
  chmod 700 ~git/.ssh
fi

if ! test -f ~git/.ssh/environment
then
  echo "GOGS_CUSTOM=/data/gogs" > ~git/.ssh/environment
  chown git:git ~git/.ssh/environment
  chown 600 ~git/.ssh/environment
fi

chown -R git:git /data .
exec su git -c "./gogs web"

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


Create start.sh

Create start.sh


minor change

minor change

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/timhaak/docker-transmission.git/'


Adicionado um script para instalação do sistema no Ubuntu 16.04

echo 'Starting script.';
echo 'Installing Required Packages: PHP, Composer Apache, MySql';
sudo apt-get install php7.0 mysql-server php7.0-mysql php7.0-gd php-apcu php7.0-intl composer apache2 npm gcc make autoconf libc6-dev pkg-config wget -y

echo 'Installing PEAR package manager';
sudo wget http://pear.php.net/go-pear.phar
php go-pear.phar

echo 'Installing APCU background compatibility';
sudo pecl install apcu_bc-beta
sudo bash -c "echo extension=apc.so > /etc/php/7.0/apache2/conf.d/z_apc.ini"
sudo service apache2 restart

echo 'Installing bower'
sudo npm install -g bower

echo 'Creating symbolic link for nodejs /usr/bin/nodejs ~> /usr/bin/node (May not work on Ubuntu 16.04)'
sudo ln -s /usr/bin/nodejs /usr/bin/node

echo 'Creating virtual host configuration'
sudo tee /etc/apache2/sites-available/cats-lab.conf << EOF
<VirtualHost 127.1.1.100:80>

        ServerName cats-lab.lan

        ServerAdmin catsinformatica@gmail.com
        DocumentRoot "$HOME/vhosts/cats-lab/public"

        <Directory "$HOME/vhosts/cats-lab/public">
                AllowOverride All
                Require all granted
        </Directory>

        SetEnv "APP_ENV" "development"

        ErrorLog $HOME/vhosts/cats-lab/error.log
        CustomLog $HOME/vhosts/cats-lab/access.log combined

</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
EOF

echo 'Binding domain http://cats-lab.lan to 127.1.1.100'
sudo sed -i '/cats-lab.lan/d' /etc/hosts
sudo tee -a  /etc/hosts << EOF
127.1.1.100   cats-lab.lan # bind domain http://cats-lab.lan to 127.1.1.100
EOF

echo 'Changing php.ini max_post_size to 20MB and upload_max_filesize to 15MB'
sudo sed -i 's/.*post_max_size.*/post_max_size = 20M/' /etc/php/7.0/apache2/php.ini
sudo sed -i 's/.*upload_max_filesize.*/upload_max_filesize = 15M/' /etc/php/7.0/apache2/php.ini

echo 'Removing previous cats-lab project'
sudo rm -rf $HOME/vhosts/cats-lab

echo 'Starting git clone'
mkdir $HOME/vhosts
read -p "Please insert the link of your forked repository
(Example: https://github.com/marciodojr/CatsSys.git):
" repository;
git clone $repository $HOME/vhosts/cats-lab

echo 'Starting Composer packages installation'
cd $HOME/vhosts/cats-lab
COMPOSER_PROCESS_TIMEOUT=2000 composer install

echo 'Starting bower assets installation'
cd $HOME/vhosts/cats-lab
bower install

echo 'Creating local configuration'
tee $HOME/vhosts/cats-lab/config/autoload/local.php << EOF
<?php
/*
* ./config/autoload/local.php
*
* inserir usuario, senha e nome do banco de dados que será utilizado
* localmente
*/
return array(
   'doctrine' => array(
       'connection' => array(
           'orm_default' => array(
               'params' => array(
                   'user'     => 'root',
                   'password' => 'root',
                   'dbname'   => 'catssys',
               ),
           ),
       ),
   ),
);
EOF
cp $HOME/vhosts/vendor/zendframework/zend-developer-tools/config/zenddevelopertools.local.php.dist $HOME/vhosts/cats-lab/config/autoload/zenddevelopertools.local.php

echo 'Creating data directories'
mkdir $HOME/vhosts/cats-lab/data/captcha
mkdir $HOME/vhosts/cats-lab/data/session

echo 'Enabling rewrite mode'
sudo a2enmod rewrite

echo 'Enabling cats-lab virtual host'
sudo a2ensite cats-lab.conf

echo 'Restarting Apache server'
sudo service apache2 restart

echo 'Setting permissions for data directories'
sudo chmod 777 $HOME/vhosts/cats-lab/data/DoctrineORMModule/Proxy
sudo chmod 777 $HOME/vhosts/cats-lab/data/cache
sudo chmod 777 $HOME/vhosts/cats-lab/data/edital
sudo chmod 777 $HOME/vhosts/cats-lab/data/fonts
sudo chmod 777 $HOME/vhosts/cats-lab/data/profile
sudo chmod 777 $HOME/vhosts/cats-lab/data/captcha
sudo chmod 777 $HOME/vhosts/cats-lab/data/session
sudo chmod 777 $HOME/vhosts/cats-lab/data/pre-interview

echo 'Creating database CatsSys. Please insert your mysql password: '
mysql -u root -p -e 'drop database if exists catssys; create database catssys'

echo 'Creating database schema'
php $HOME/vhosts/cats-lab/public/index.php orm:validate-schema
php $HOME/vhosts/cats-lab/public/index.php orm:schema-tool:create
php $HOME/vhosts/cats-lab/public/index.php orm:generate-proxies

echo 'Importing table contents. Please Insert your mysql password'
cat $HOME/vhosts/cats-lab/data/dev-helpers/*.sql | mysql -u root -p catssys

echo 'Starting browser'
firefox http://cats-lab.lan &

error: pathspec 'data/dev-helpers/ubuntu-16.04-setup-environment.sh' did not match any file(s) known to git


Added letencrypt renewal script

Added letencrypt renewal script

hash certbot 2>/dev/null || {
    echo >&2 "I require certbot but it's not installed.";
    exit 1;
}

certbot certonly --webroot -w /var/github/KCreate/leonardschuetz.ch/dist -d leonardschuetz.ch

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


Create crontf2d.sh

Create crontf2d.sh

#!/bin/bash
# Wrapper for cron to check and start TF2 server from $SCRIPT if need be

# cron is setup as:
# @reboot /home/tf2server/tf2d.sh start &> /dev/null
# */5 * * * * /home/tf2server/crontf2d.sh &> /dev/null
#

if ! /usr/bin/pgrep srcds ; then /home/tf2server/tf2d.sh start; fi

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


Symlinks updated

Symlinks updated

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


glew opengl problens

glew opengl problens

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/h31nr1ch/Linux.git/'


fix install script

fix install 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/frans-fuerst/thinks.git/'


changes

changes

pip install Flask
pip install flask-script
pip install WTForms
pip install flask-sqlalchemy

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


Idem [ Hotfix (Fixed possible future bug with domain delegation that would lead urls being delegated prefixed with "www.www.") ]

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/Quicktech-Moreno/qbot.git/'


Add mvn to the PATH if the toolchain is present

A recent commit made it so that we stopped sourcing the toolchain, which we depended on in order
to get mvn, so our builds have been fully red.

Change-Id: Ic3f2e9defc822b0f9d25d493bdf31dd723779f1e
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/6987
Reviewed-by: Adar Dembo <866ca730bfc7f544e3ebce604ceeba4879f23df0@cloudera.com>
Tested-by: jenkins

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/cloudera/kudu.git/'


build script changes

build script changes

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/hashvoid/crossbinder.git/'


Pub/Sub test with external broker is now the default, test with internal broker is renamed malzmq_pubsub_app.

#!/usr/bin/env sh

gsl project.xml

chmod +x autogen.sh
if [ -e version.sh ];then
chmod +x version.sh
fi

error: pathspec 'test/malzmq_pubsub_app/generate.sh' did not match any file(s) known to git


added git push helper script

added git push helper script

#!/bin/sh

git push rubyforge master
git push gitorious master
git push github master

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


CDR spooling quick & dirty plugin

CDR spooling quick & dirty plugin

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/jjuarez/mydotfiles.git/'


chore(init-app.sh): Move on heroku

chore(init-app.sh): Move on heroku

#!/usr/bin/env bash
#
# Script to initialize angular app

# @log startup time
START_SERVER_TEIM=$(date +%s)

npm install
grunt package

rm -rf app

# copy doc directory resolve symlinks
cp -Lr build/docs app

# copy javascript files
cp build/*.js app/
# copy home page
cp docs/src/templates/home.html app/
cd app

cat > "package.json" << EOF
{
  "name": "Angularjs",
  "description": "Angularjs documentation",
  "version": "0.0.1",
  "engines":{
    "node": "0.8.6",
    "npm": "1.1.65"
  },
  "private": true,
  "dependencies": {
  "express": "3.x",
  "connect" : "2.x"
  }
}
EOF

cat > "main.js" << EOF
  var express = require('express');
  var connect = require('connect');
  var app = express();
  app.use(connect.compress());
  console.log(__dirname);
  app.use(express.static(__dirname + '/'));
  // HTML5 URL Support
  app.get('^(/|home\.html )$', function(req, res) {
    res.sendfile('home.html');
  });
  app.get('^\/?(guide|api|cookbook|misc|tutorial)(/)?*$', function(req, res) {
    res.sendfile('index.html');
  });
  var port = process.env.PORT || 80000;
  console.log('SERVER RUN ON PORT: ', port);
  app.listen(port);
EOF

npm install

END_SERVER_TEIM=$(date +%s)

# @log startup time
echo "SERVER START TIME: $((END_SERVER_TEIM - START_SERVER_TEIM))"

node main.js

#!/usr/bin/env bash
#
# Script to initialize angular app

# @log startup time
START_SERVER_TEIM=$(date +%s)

npm install
grunt package

rm -rf app

# copy doc directory resolve symlinks
cp -Lr build/docs app

# copy javascript files
cp build/*.js app/
# copy home page
cp docs/src/templates/home.html app/
cd app

cat > "package.json" << EOF
{
  "name": "Angularjs",
  "description": "Angularjs documentation",
  "version": "0.0.1",
  "engines":{
    "node": "0.8.6",
    "npm": "1.1.65"
  },
  "private": true,
  "dependencies": {
  "express": "3.x",
  "connect" : "2.x"
  }
}
EOF

cat > "main.js" << EOF
  var express = require('express');
  var connect = require('connect');
  var app = express();
  app.use(connect.compress());
  console.log(__dirname);
  app.use(express.static(__dirname + '/'));
  // HTML5 URL Support
  app.get('^(/|home\.html )$', function(req, res) {
    res.sendfile('home.html');
  });
  app.get('^\/?(guide|api|cookbook|misc|tutorial)(/)?*$', function(req, res) {
    res.sendfile('index.html');
  });
  console.log('SERVER RUN ON PORT: ', process.env.PORT);
  app.listen(process.env.PORT);
EOF

npm install

END_SERVER_TEIM=$(date +%s)

# @log startup time
echo "SERVER START TIME: $((END_SERVER_TEIM - START_SERVER_TEIM))"

node main.js


Add synology collectd script

Add synology collectd script

#!/bin/bash

#This script pulls storage information from the Synology NAS

set -o pipefail  ## trace ERR through pipes
set -o errtrace  ## trace ERR through 'time command' and other functions
set -o nounset   ## set -u : exit the script if you try to use an uninitialised variable
set -o errexit   ## set -e : exit the script if any statement returns a non-true return value

DRIVE_COUNT=9
NETWORK_COUNT=10
HOSTNAME="$1"
INTERVAL="${COLLECTD_INTERVAL:-60}"

fetch_snmp() {
    snmpget -v 2c -c public "$HOSTNAME" "$1" -Ov | cut -f 2 -d ':' | xargs
}

search_snmp_id() {
    snmpwalk -v 2c -c public "$HOSTNAME" "$1" |grep -e "$2" | cut -f 1 -d '=' | xargs
}

snmp_simple_value() {
    STATS_NODE=$1
    SNMP_NODE=$2

    value=$(fetch_snmp $SNMP_NODE)
    if [[ "$value" -gt 0 ]]; then
        send_data "$STATS_NODE" "$value"
    fi
}

get_volume_usage () {
    VOLUME_NAME="$1"
    VOLUME_PATH="$2"
    SNMP_NODE_ID=$(search_snmp_id "1.3.6.1.2.1.25.2.3.1.3" "$VOLUME_PATH")

    VOLUME_NODE_ID=$(echo $SNMP_NODE_ID | rev | cut -d. -f1 | rev)

    snmp_simple_value "volume.${VOLUME_NAME}.used"      "1.3.6.1.2.1.25.2.3.1.6.${VOLUME_NODE_ID}"
    snmp_simple_value "volume.${VOLUME_NAME}.capacity"  "1.3.6.1.2.1.25.2.3.1.5.${VOLUME_NODE_ID}"
    snmp_simple_value "volume.${VOLUME_NAME}.blocksize" "1.3.6.1.2.1.25.2.3.1.4.${VOLUME_NODE_ID}"
}

get_drive_temps () {
    counter=0
    while [  "$counter" -lt "$DRIVE_COUNT" ]; do
        #Get Drive Name
        syno_drivename=$(fetch_snmp 1.3.6.1.4.1.6574.2.1.1.2.$counter)
        if [[ "$syno_drivename" == *"exists"* ]]; then
            let counter=counter+1
        	continue
        fi

        syno_drivename=$(echo $syno_drivename | cut -c 10-)
        syno_drivename=${syno_drivename// /_}

        #Get Health Status
        snmp_simple_value "disk${counter}.health"      "1.3.6.1.4.1.6574.2.1.1.5.$counter"

        #Get temperature
        snmp_simple_value "disk${counter}.temperature"      "1.3.6.1.4.1.6574.2.1.1.6.$counter"

        let counter=counter+1
    done
}

get_sys_stats() {
    # System
    snmp_simple_value "system.temperature" "1.3.6.1.4.1.6574.1.2.0"

    # Cpu
    snmp_simple_value "cpu.user"      "1.3.6.1.4.1.2021.11.9.0"
    snmp_simple_value "cpu.system"    "1.3.6.1.4.1.2021.11.10.0"
    snmp_simple_value "cpu.idle"      "1.3.6.1.4.1.2021.11.11.0"

    # Load
    snmp_simple_value "load.1"      "1.3.6.1.4.1.2021.10.1.5.1"
    snmp_simple_value "load.5"      "1.3.6.1.4.1.2021.10.1.5.2"
    snmp_simple_value "load.15"     "1.3.6.1.4.1.2021.10.1.5.3"

    # Memory
    snmp_simple_value "memory.swap_total"      "1.3.6.1.4.1.2021.4.3.0"
    snmp_simple_value "memory.swap_avail"      "1.3.6.1.4.1.2021.4.4.0"
    snmp_simple_value "memory.mem_total"       "1.3.6.1.4.1.2021.4.5.0"
    snmp_simple_value "memory.mem_total_real"  "1.3.6.1.4.1.2021.4.5.0"
    snmp_simple_value "memory.mem_avail_real"  "1.3.6.1.4.1.2021.4.6.0"
    snmp_simple_value "memory.mem_total_free"  "1.3.6.1.4.1.2021.4.11.0"
    snmp_simple_value "memory.mem_shared"      "1.3.6.1.4.1.2021.4.13.0"
    snmp_simple_value "memory.mem_buffer"      "1.3.6.1.4.1.2021.4.14.0"
    snmp_simple_value "memory.mem_cached"      "1.3.6.1.4.1.2021.4.15.0"
}

get_net_stats() {
    counter=1
    while [  $counter -lt "$NETWORK_COUNT" ]; do
        #Get Drive Name
        net_ifname=$(fetch_snmp 1.3.6.1.2.1.31.1.1.1.1.$counter)
        if [[ "$net_ifname" == *"exists"* ]]; then
            break
        fi

        net_rx=$(fetch_snmp 1.3.6.1.2.1.31.1.1.1.6.$counter)
        net_tx=$(fetch_snmp 1.3.6.1.2.1.31.1.1.1.10.$counter)

        if [[ "$net_rx" -le 0 || "$net_tx" -le 0 ]]; then
            true
        else
            send_data_counter "network.${net_ifname}.rx"  "$net_rx"
            send_data_counter "network.${net_ifname}.tx"  "$net_tx"
        fi

        let counter=counter+1
    done
}

send_data() {
	VAR_NAME=${1//./_}
	VAR_VALUE=$2
	echo "PUTVAL \"$HOSTNAME/synology/gauge-$VAR_NAME\" interval=$INTERVAL N:$VAR_VALUE"
}

send_data_counter() {
	VAR_NAME=${1//./_}
	VAR_VALUE=$2
	echo "PUTVAL \"$HOSTNAME/synology/counter-$VAR_NAME\" interval=$INTERVAL N:$VAR_VALUE"
}

main() {
    get_sys_stats
    get_net_stats
    get_drive_temps
    get_volume_usage "volume1" "\"/volume1\""
    get_volume_usage "volume2" "\"/volume2\""
    get_volume_usage "volume3" "\"/volume3\""
}

main


Add lasp_pull_s3_logs.sh

Add lasp_pull_s3_logs.sh

#!/usr/bin/env bash

if [ -z "$AWS_ACCESS_KEY_ID" ]; then
  echo ">>> AWS_ACCESS_KEY_ID is not configured; please export it."
  exit 1
fi

if [ -z "$AWS_SECRET_ACCESS_KEY" ]; then
  echo ">>> AWS_SECRET_ACCESS_KEY is not configured; please export it."
  exit 1
fi

## Configure AWS CLI
##   - see how to install it here:
##     http://docs.aws.amazon.com/cli/latest/userguide/installing.html
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY

## Sync s3 bucket with local logs folder
aws s3 sync s3://lasp-transmission-instrumentation-logs logs/

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