Updates

Updates

export BEAGLE_USERNAME="yadunandb"
export MIDWAY_USERNAME="yadunand"
export MCS_USERNAME="yadunand"
export UC3_USERNAME="yadunand"
export OSGC_USERNAME="yadunand"
export BLUES_USERNAME="yadunand"
export FUSION_USERNAME="yadunand"
export GODZILLA_USERNAME="yadunand"
export COMM_USERNAME="yadunandb"
export BRID_USERNAME="yadunandb"
export SWAN_USERNAME="p01953"
export RAVEN_USERNAME="p01953"
export GORDON_USERNAME="yadunand"
export STAMPEDE_USERNAME="yadunand"
export TRESTLES_USERNAME="yadunand"

export FROM_MAIL="Test-Engine@midway001"
export TO_MAIL="yadudoc1729@gmail.com hategan@mcs.anl.gov wilde@mcs.anl.gov"

export REMOTE_DRIVER_FASTSETUP="false"
#export REMOTE_DRIVER_FASTSETUP="true"
export SWIFT_TAR_FILE="/scratch/midway/yadunand/swift-trunk.tar"

export SWIFT_LOCAL_REPO="/scratch/midway/yadunand/swift-k"
export SWIFT_GIT_REPO="https://github.com/swift-lang/swift-k.git"
export CLEAN_CHECKOUT="yes"  # only yes or no
export KILL_JAVA="false"

# Extra performance stats
export COG_OPTS=-Dtcp.channel.log.io.performance=true

export RUN_TYPE="daily"
#export RUN_TYPE="test"

if [ "midway001" == "midway001" ]
then
   export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu
   export GLOBUS_TCP_PORT_RANGE=50000,51000
fi;

export BEAGLE_USERNAME="yadunandb"
export MIDWAY_USERNAME="yadunand"
export MCS_USERNAME="yadunand"
export UC3_USERNAME="yadunand"
export OSGC_USERNAME="yadunand"
export BLUES_USERNAME="yadunand"
export FUSION_USERNAME="yadunand"
export COMM_USERNAME="yadunandb"
export BRID_USERNAME="yadunandb"
export SWAN_USERNAME="p01953"
export RAVEN_USERNAME="p01953"
export FROM_MAIL="Test-Engine@midway001"
export TO_MAIL="yadudoc1729@gmail.com hategan@mcs.anl.gov wilde@mcs.anl.gov"

#export REMOTE_DRIVER_FASTSETUP="false"
export REMOTE_DRIVER_FASTSETUP="true"
export SWIFT_TAR_FILE="/scratch/midway/yadunand/swift-trunk.tar"

export SWIFT_LOCAL_REPO="/scratch/midway/yadunand/swift-k"
export SWIFT_GIT_REPO="https://github.com/swift-lang/swift-k.git"
export CLEAN_CHECKOUT="yes"  # only yes or no
export KILL_JAVA="false"

# Extra performance stats
export COG_OPTS=-Dtcp.channel.log.io.performance=true

export RUN_TYPE="daily"
#export RUN_TYPE="test"

if [ "midway001" == "midway001" ]
then
   export GLOBUS_HOSTNAME=swift.rcc.uchicago.edu
   export GLOBUS_TCP_PORT_RANGE=50000,51000
fi;


Add iex launcher

Add iex launcher

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


New VM: jmv

New VM: jmv

# ---------------------------------------------------------------------------
#
# $Id$
# ---------------------------------------------------------------------------

# ---------------------------------------------------------------------------
# Misc. environment variables

export PERL5LIB=$HOME/lib/perl
export mystuff=$HOME/src/mystuff

export CLASSPATH=\
$CLASSPATH:\
/usr/share/java/hsqldb.jar:\
/usr/share/java/hsqldbutil.jar:\
/usr/share/java/mysql-connector-java.jar:\
/usr/share/java/postgresql.jar:\
$HOME/java/classes/sqlitejdbc-v056-pure.jar:\
$HOME/java/classes/h2-1.2.129.jar

export JAVA_HOME=/usr/lib/jvm/java-6-openjdk

# ---------------------------------------------------------------------------
# PATH

export PATH=\
$HOME/.gem/ruby/1.8/bin:\
$HOME/local/bin:\
/usr/bin:\
/bin:\
$PATH:\
/usr/local/sbin:\
/usr/sbin:\
/sbin

# ---------------------------------------------------------------------------
# Programmatic Completion

#unset -f _get_vpn_completions
#_get_vpn_completions()
#{
#    local cur prev possibles
#    # "cur" is the current word (the one being completed)
#    cur="${COMP_WORDS[COMP_CWORD]}"
#    # prev is the previous word type. We don't use that here.
#    prev="${COMP_WORDS[COMP_CWORD-1]}"
#
#    # COMPREPLY is a bash array in which the responses are returned
#    COMPREPLY=()
#
#    # Generate the list of possible matches (i.e., the directories under
#    # $HOME/openvpn
#    possibles=
#    for f in $HOME/openvpn/*
#    do
#        if [ -d $f ]
#        then
#            possibles="$possibles $(basename $f)"
#        fi
#    done
#
#    # Now, use the compgen built-in to generate the matches
#    COMPREPLY=( $(compgen -W "$possibles" -- $cur) )
#}
## enable completions on command "vpn"
#complete -F _get_vpn_completions vpn

# ---------------------------------------------------------------------------
# Aliases and functions

alias ftp=ncftp
alias mllog="sudo tail -f /var/log/mail.log"
alias mslog="sudo tail -f /var/log/messages"
alias nslookup="$(type -P nslookup) -silent"
alias mystuff="varcd mystuff"
alias top=htop

load_file ~/bash/java.sh
load_file ~/bash/scala.sh

# ---------------------------------------------------------------------------
# JMV consulting

export jmv=$HOME/src/consulting/jmv
alias jmv='varcd jmv'

PATH=$HOME/Applications/maven/bin:$PATH

# ---------------------------------------------------------------------------
# Ruby

rvm 1.8.7-p352
if interactive
then
    echo "Using Ruby $(rvm current)"
fi
alias man='gem man -s'

# ---------------------------------------------------------------------------
# Python stuff

pythonbrew use 2.7.1 >/dev/null 2>&1

# ---------------------------------------------------------------------------
# Local stuff

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib:$HOME/lib

load_file ~/bash/ubuntu.sh
# Not necessary on Ubuntu; Ubuntu starts one that's integrated into Gnome.
#load_file ~/bash/ssh.sh

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


initial deploy script

initial deploy script

#!/bin/sh

GIT_URL=`git remote show origin | awk '/Push  URL/ { print $NF }'`
DEPLOY_DIR=/tmp/deploy.$$
mkdir ${DEPLOY_DIR}
(cd ${DEPLOY_DIR} ; \
    git clone ${GIT_URL} . \
 && git checkout gh-pages \
 && git rm -rf .
)
cp -r _build/html/* ${DEPLOY_DIR}
touch ${DEPLOY_DIR}/.nojekyll
(cd ${DEPLOY_DIR} ; \
    git add .nojekyll *  \
    && git commit -m "deploy"  \
    && git push)

rm -rf ${DEPLOY_DIR}

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


Add gok.sh.

Add gok.sh.

#!/bin/sh
#
# Verifies that go code passes go fmt, go vet, golint, and go test.
#

o=$(tempfile)

fail() {
	echo Failed
	cat $o
	exit 1
}

echo Formatting
gofmt -l $(find . -name '*.go') 2>&1 > $o
test $(wc -l $o | awk '{ print $1 }') = "0" || fail

echo Vetting
go vet ./... 2>&1 > $o || fail

echo Testing
go test -test.timeout=1s ./... 2>&1 > $o || fail

echo Linting
golint .


Add basic script fot js minifying. It uses a public api for minifying js.

#!/bin/bash

cd ../js
for line in $(find . -name '*.js' ! -name '*min.js' ); do
     echo "$line"
     curl -X POST -s --data-urlencode 'input@'$line https://javascript-minifier.com/raw > ${line::-3}.min.js
done

#curl -X POST -s --data-urlencode 'input@ready.js' https://javascript-minifier.com/raw > ready.min.js

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


Added unrar & 1password6 to brew.sh

Added unrar & 1password6 to brew.sh

fatal: remote error: upload-pack: not our ref d9fea8c34cda9b6658976905aa21a12af6422aa1
fatal: the remote end hung up unexpectedly


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/davidtsadler/seapig.git/'


deploy script

deploy script

#!/bin/bash -e

DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
PI_HOSTNAME="${1:-cheezoid-jr}"

echo "Deploying ${DIR} to ${PI_HOSTNAME}..."

rsync -v --size-only -r "${DIR}" pi@${PI_HOSTNAME}:.


Add bash script to wrap run the magic

Add bash script to wrap run the magic

#!/bin/bash

# Arguments
EXPECTED_ARGS=5

DIR="$(dirname "$(readlink -f "$0")")"
cd ${DIR}

USER=$1
PASS=$2
SERVER=$3
PORT=$4
SID=$5

print_usage(){
    echo "dmdump schema password server port sid"
    exit 1
}

# Make sure the correct number of arguments were received
if [[ $# -ne ${EXPECTED_ARGS} ]]; then
    echo "Wrong number of args; Received $#; Expected ${EXPECTED_ARGS}" >&2
    print_usage
    exit ${INVALID_ARGS}
fi

echo "INPUT:"
echo USER:${USER}
echo PASS:${PASS}
echo SERVER:${SERVER}
echo PORT:${PORT}
echo SID:${SID}

echo "exit" | sql ${USER}/${PASS}@//${SERVER}:${PORT}/${SID} @scriptWrap

echo "Finished"
exit 0

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


First commit

First commit

#!/bin/bash
#set -u

# Usage text
usage_text=$(cat << EOF
Usage: `basename $0` -p <package> [-r] [-v version]...

Script to detect OS and update package by name.
Package is needed, all other keys are optional.

    -p\tpackage name, can be anything, if version is not forced
    -r\trestart all services after successful update
    -v\tforce exact version, you need to provide correct package name for used OS
    -o\tforce os (format is \$os\$major_version, i.e. Debian8, CentOS7, Ubuntu14, etc.)
    -h\tdisplay that help

Other parameters are for technical needs, usage in other scripts, etc.

    -c\tuse given CTID
    -l\tcreate log file, minimal screen output provided
EOF
)

# Enables writing to log, minimal screen output
enable_logging()
{
    if [ "$LOGGING" == "1" ]; then
        if [ ${CTID} ]; then
            LOG_FILE=/root/${CTID}-${PACKAGE}.log
        else
            LOG_FILE=/root/${PACKAGE}.log
        fi
        exec 1<&-
        exec 1<>$LOG_FILE
        exec 2>&1
    fi
}

# Parsing arguments recieved
check_args()
{
    if [ $# -eq 0 ]; then
        echo -e "$usage_text"
        exit 0
    fi
    while getopts "hlrRp:v:o:c:" opt; do
        case $opt in
            p )
                PACKAGE=$OPTARG
            ;;
            v )
                FORCE_VERSION='1'
                FORCED_VERSION=$OPTARG
            ;;
            r )
                RESTART_NEEDED='1'
            ;;
            R )
                ONLY_RESTART='1'
            ;;
            l )
                LOGGING='1'
            ;;
            o )
                FORCE_OS='1'
                FORCED_OS=$OPTARG
            ;;
            c )
                CTID=$OPTARG
            ;;
            h )
                echo -e "$usage_text"
                exit 0
            ;;
            \? )
                echo "Invalid option: -$OPTARG" >&2
                exit 1
            ;;
            : )
                echo "Option -$OPTARG requires an argument." >&2
                exit 1
          ;;
      esac
    done
}

# Exit function
finish()
{
    local result=$1
    case $result in
        OK )
            echo -e "RESULT: ${TXT_GRN}OK${TXT_RST}"; exit 0
        ;;
        NOTOK )
            echo -e "RESULT: ${TXT_RED}FAIL${TXT_RST}"; exit 1
        ;;
        * )
            echo -e "RESULT: ${TXT_YLW}UNKNOWN${TXT_RST}"; exit 2
        ;;
    esac
}

# Check package manager
detect_package_manager()
{
    local dpkg=""
    local rpm=""
    local dpkg=`which dpkg >/dev/null 2>&1; echo $?`
    local rpm=`which rpm >/dev/null 2>&1; echo $?`
    local result=`echo "$dpkg$rpm"`
    case $result in
        01 )
            package_manager='dpkg'
        ;;
        10 )
            package_manager='rpm'
        ;;
        00 )
            echo 'You have both dpkg and rpm? Hello, Dr. Frankenstein!'
            finish NOTOK
        ;;
        11 )
            echo "You don't have neither dpkg, nor rpm. We don't know, what to do here. Exiting."
            finish NOTOK
        ;;
        * )
            echo "We couldn't detect package manager. Exiting"
            finish NOTOK
        ;;
    esac
}

# OS to package manager hash
verify_package_manager()
{
    # Do not check package manager, if we need only restart services, mainly because of bash 4.0
    if [ $ONLY_RESTART -eq 1 ]; then
        return
    fi

    local os=$1
    local -A os_to_pm_hash
    os_to_pm_hash["Debian"]="dpkg"
    os_to_pm_hash["Ubuntu"]="dpkg"
    os_to_pm_hash["CentOS"]="rpm"

    local os_name=`echo ${os} | tr -d [:digit:]`
    if [ ${os_to_pm_hash[$os_name]-} ]; then
        if [ ! "${os_to_pm_hash[$os_name]}" == "$package_manager" ]; then
            echo "Your have $package_manager on ${os}. We can't do anything here. Exiting."
            finish NOTOK
        fi
    else
        echo "We don't know, what package manager is needed for your OS. You have $package_manager on ${os}. Exiting."
        finish NOTOK
    fi
}

# Detect OS
detect_os()
{
    # Echo CTID if set
    if [ $CTID ]; then
        echo -e "CTID:\t$CTID"
    fi

    # Use forced OS if any
    if [ $FORCE_OS -eq 1 ]; then
        OS=$FORCED_OS
        echo -e "Forced OS:\t$OS"
        return
    fi

    local issue_file='/etc/issue'
    local os_release_file='/etc/os-release'
    local redhat_release_file='/etc/redhat-release'

    # First of all, trying os-relese file
    if [ -f $os_release_file ]; then
        local name=`grep '^NAME=' $os_release_file | awk -F'[" ]' '{print $2}'`
        local version=`grep '^VERSION_ID=' $os_release_file | awk -F'[". ]' '{print $2}'`
        OS=`echo "${name}${version}"`
        verify_package_manager $OS
        echo -e "OS:\t${TXT_YLW}${OS}${TXT_RST}"
    else
        # If not, trying redhat-release file (mainly because of bitrix-env)
        if [ -f $redhat_release_file ]; then
            OS=`head -1 /etc/redhat-release | sed -re 's/([A-Za-z]+)[^0-9]*([0-9]+).*$/\1\2/'`
            verify_package_manager $OS
            echo -e "OS:\t${TXT_YLW}${OS}${TXT_RST}"
        else
            # Else, trying issue file
            if [ -f $issue_file ]; then
                OS=`head -1 $issue_file | sed -re 's/([A-Za-z]+)[^0-9]*([0-9]+).*$/\1\2/'`
                verify_package_manager $OS
                echo -e "OS:\t${TXT_YLW}${OS}${TXT_RST}"
            else
                # If none of that files worked, exit
                echo -e "${TXT_RED}Cannot detect OS. Exiting now"'!'"${TXT_RST}"
                finish NOTOK
            fi
        fi
    fi
}

# Exit if bash is older then 4.0
check_bash_version()
{
    local bash_version=`echo $BASH_VERSION| awk -F. '{print $1}'`
    if [ $bash_version -lt 4 ]; then
        echo -e "Old bash ($BASH_VERSION). 4.0 or newer needed."
        finish NOTOK
    fi
}

# Filling os -> safe_version hash
# You need to create file ${package}.list accecible via http on $download_url
# Format:
#   OS:package_name:safe_version
#   OS2:package_name2:safe_version2
#
# Example:
#   File URL:
#   http://domain.com/lists/glibc.list
#
#   File contents:
#   Debian8:libc6:2.19-18+deb8u3
#   Debian7:libc6:2.13-38+deb7u10
#   Debian6:libc6:2.11.3-4+deb6u11
#   Ubuntu14:libc6:2.19-0ubuntu6.7
#   Ubuntu12:libc6:2.15-0ubuntu10.13
#   CentOS7:glibc:2.17-106.el7_2.4
#   CentOS6:glibc:2.12-1.166.el6_7.7
#
find_safe_version()
{
    local os=$1
    local package=$2

    # Use forced version if any
    if [ $FORCE_VERSION -eq 1 ]; then
        SAFE_VERSION=$FORCED_VERSION
        PACKAGE_NAME=$package
        return
    fi

    local -A safe_version_hash
    local -A package_name_hash
    local hash_os
    local hash_pkg
    local hash_version

    local list=(`wget -q -O- ${download_url}${package}.list`)
    for line in ${list[@]}; do
        IFS=':' read hash_os hash_pkg hash_version <<< "$line"
        package_name_hash["$hash_os"]="$hash_pkg"
        safe_version_hash["$hash_os"]="$hash_version"
    done

    if [ ${package_name_hash[$os]-} ]; then
        PACKAGE_NAME=${package_name_hash[$os]}
    else
        PACKAGE_NAME='nil'
    fi

    if [ ${safe_version_hash[$os]-} ]; then
        SAFE_VERSION=${safe_version_hash[$os]}
    else
        SAFE_VERSION='nil'
    fi
}

# Selecting action to restart services
select_restart_action()
{
    local os=$1

    case $os in
        Debian8 | CentOS7 )
            RESTART_ACTION='systemctl'
        ;;
        Debian* | Ubuntu* )
            systemctl=`which systemctl >/dev/null 2>&1; echo $?`
            service=`which service >/dev/null 2>&1; echo $?`

            RESTART_ACTION='service'
        ;;
        CentOS* )
            RESTART_ACTION='chkconfig'
        ;;
        * )
            RESTART_ACTION='exit'
        ;;
    esac
}

# Setting commands for different OS
set_commands()
{
    local os=$1
    case $os in
        Debian* | Ubuntu* )
            check_current_version="apt-cache policy \$package_name | sed -n 2p | awk '{print \$NF}'"
            check_candidate_version="apt-cache policy \$package_name | sed -n 3p | awk '{print \$NF}'"
            update_repo="apt-get -qq update"
            update_pkg="DEBIAN_FRONTEND=noninteractive apt-get -qq install \$package_name -y --force-yes"
        ;;
        CentOS* )
            check_current_version="rpm -q \$package_name | head -1 | sed -r -e 's#\w+-(.+)\.\w+#\1#'"
            check_candidate_version="yum -q --enablerepo=updates info glibc | grep -A4 Available | grep -E 'Version|Release' | awk '{print $3}' | xargs | sed -e 's/ /-/'"
            update_repo="yum -q updateinfo"
            update_pkg="yum -q --enablerepo=updates update \$package_name -y"
        ;;
        "" )
            echo -e 'OS is not detected. NEED MANUAL CHECK!'
            finish NOTOK
        ;;
        * )
            echo "OS: ${os}. We don't know how to update it."
            finish OK
        ;;
    esac
}

# Check current installed version
check_installed()
{
    local installed=`eval $check_current_version`
    echo -e "Curr:\t$installed\nSafe:\t$safe_version"

    # Exit, if already safe
    if [ "$installed" == "$safe_version" ]; then
        echo -e 'No update needed!'
        finish OK
    fi

    local short_installed=`echo $installed | awk -F'-' '{print $1}'`
    local short_safe=`echo $safe_version | awk -F'-' '{print $1}'`

    # Exit, if we are updating major version
    if [ ! "$short_installed" == "$short_safe"  ]; then
        echo -e "Version mismatch."
        finish NOTOK
    fi
}

# Updating package info
update_repository()
{
   eval $update_repo
}

# Checking version to be installed
check_cantidate()
{
    local installed=`eval $check_current_version`
    local candidate=`eval $check_candidate_version`
    echo -e "Candidate:\t$candidate"
    local short_installed=`echo $installed | awk -F'-' '{print $1}'`
    local short_candidate=`echo $candidate | awk -F'-' '{print $1}'`

    # Exit, if we are updating major version
    if [ ! "$short_installed" == "$short_candidate"  ]; then
        echo -e "Version mismatch."
        finish NOTOK
    fi

    # Exit, if candidate is not safe
    if [ ! "$candidate" == "$safe_version"  ]; then
        echo -e "We can't update to safe version."
        finish NOTOK
    fi
}

# Actially updating package
update_package()
{
    eval $update_pkg
}

# Check result after update
check_updated()
{
    local new_version=`eval $check_current_version`
    echo -e "New:\t$new_version"
    if [ "$new_version" == "$safe_version" ]; then
        echo -e 'Update successful!'
        UPDATE_SUCCESS=1
    else
        echo -e 'Update did not work! NEED MANUAL CHECK!'
        finish NOTOK
    fi
}

# Combining functions to actually perform update
update_action()
{
    local os=$1
    local safe_version=$2
    local package_name=$3
    if [ "$safe_version" == "nil" ]; then
        echo -e "There is no safe version for $os"
        finish OK
    fi
    check_installed
    update_repository
    check_cantidate
    update_package
    check_updated
}

# Restart services if needed
restart_action()
{
    local action=$1

    # Exit if update was not successful
    if [ $UPDATE_SUCCESS -eq 0 ]; then
        return
    fi

    # Exit if restart is not needed
    if [ $RESTART_NEEDED -eq 0 ]; then
        return
    fi

    case $action in
        systemctl )
            systemctl try-restart `systemctl --no-legend --no-pager --state=running --type=service list-units | awk '{print $1}' | xargs`
        ;;
        chkconfig )
            chkconfig  --list | grep on | sed 's/ .*//'| grep -v udev-post | xargs -I {} service {} restart
        ;;
        service )
            service --status-all 2>&1| grep ' + ' | sed 's/.* //' | grep -v pdns | xargs  -I {} service {} --full-restart
        ;;
        exit )
            echo "OS: ${OS}. You need to restart services manually."
            exit
        ;;
        * )
            echo 'No correct action specified!'
        ;;
    esac
}

# Some constants

download_url='http://46.36.223.167/script/'

UPDATE_SUCCESS=0
FORCE_VERSION=0
FORCE_OS=0
RESTART_NEEDED=0
LOGGING=0
ONLY_RESTART=0

TXT_GRN='\e[0;32m'
TXT_RED='\e[0;31m'
TXT_YLW='\e[0;33m'
TXT_RST='\e[0m'

check_args "$@"
if [ $ONLY_RESTART -eq 0 ]; then
    enable_logging
    check_bash_version
    detect_package_manager
    detect_os
    find_safe_version $OS $PACKAGE
    select_restart_action $OS
    set_commands $OS
    update_action $OS $SAFE_VERSION $PACKAGE_NAME
    restart_action $RESTART_ACTION
else
    UPDATE_SUCCESS=1
    RESTART_NEEDED=1
    detect_package_manager
    detect_os
    select_restart_action $OS
    restart_action $RESTART_ACTION
fi


Update homebrew.sh

Update homebrew.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/barvian/dotfiles.git/'


Added dump for table values

Added dump for table values

git-svn-id: 3b4b84547dfdca3638583abe8533e8c649d4f491@18196 b630af17-092b-0410-afba-a002956477a4

#!/bin/sh
export INPUTDB=$1
OUTPUTFILE="${INPUTDB}-data.sql"
TABLES="auth_user auth_user_id_seq geometry_columns raster_data_set raster_data_set_id_seq raster_entry raster_entry_file raster_entry_file_id_seq raster_entry_id_seq raster_entry_search_tag raster_entry_search_tag_id_seq raster_file raster_file_id_seq repository repository_id_seq requestmap requestmap_id_seq role role_auth_user role_id_seq stager_queue_item stager_queue_item_id_seq video_data_set video_data_set_id_seq video_data_set_search_tag video_data_set_search_tag_id_seq video_file video_file_id_seq"

rm -f $OUTPUTFILE

for table in $TABLES;  do
	echo $table;
	pg_dump \
		-U postgres \
		--data-only \
		--column-inserts \
		--disable-triggers \
		--encoding=UNICODE \
		--table=$table \
		$INPUTDB >> $OUTPUTFILE;
done
echo "geometry_columns"
pg_dump \
	-U postgres \
	--data-only \
	--column-inserts \
	--disable-triggers \
	--encoding=UNICODE \
	--table=geometry_columns \
	$INPUTDB >> $OUTPUTFILE;

error: pathspec 'apps/omar/dump.sh' did not match any file(s) known to git


[dev] developer script for providing tarballs of tiki branch snapshots

git-svn-id: a7fabbc6a7c54ea5c67cbd16bd322330fd10cc35@46326 b456876b-0849-0410-b77d-98878d47e9d5

#!/bin/bash
#
# Script for providing tarballs of tiki releases (snapshots)
#
# You have to configure paths and svn user in the marked section below.
# Your svn login data must be availabe in ~/.subversion, see svn docs.
#
# Usage: $0 <branch>
# Example: $0 trunk

BRANCH=$1

if [ "${BRANCH}" = "" ]; then
  echo "ERROR: branch parameter missing (eg 'trunk')"
  exit
fi

# --- configuration --- edit here ---
SVNUSER=ohertel
LOGFILE="/var/log/tiki/svnlog_${BRANCH}"
TARGET="/var/www/tikiwiki.org/tar/"
BASE=/opt
# --- configuration --- edit here ---

OLDIR=`pwd`
PACKDIR=${BASE}/data/packaging

mkdir -p ${BASE}/data/arc  ${PACKDIR}  ${TARGET}

# start new logfile with timestamp as first entry
date > ${LOGFILE}

# always rebuild trunk from scratch (for now!)
if [ "${BRANCH}" = "trunk" ]; then
    rm -rf ${BASE}/data/${BRANCH}
fi

if [ ! -d "${BASE}/data/${BRANCH}" ]; then
    echo "Folder doesn't exist yet, checking out project ..."

    cd ${BASE}/data
    svn checkout --username ${SVNUSER} https://svn.code.sf.net/p/tikiwiki/code/${BRANCH} ${BRANCH} 2>&1 >> ${LOGFILE}

    LINE=`tail -1 ${LOGFILE}`
    RC=`echo "${LINE}" | grep "Checked out revision"`
    if [ "${RC}" = "" ]; then
        echo "ERROR: could not check out project: ${LINE}"
        exit
    fi
else
    echo "Folder exists, updating project ..."
    cd ${BASE}/data/${BRANCH}
    svn update 2>&1 >> ${LOGFILE}
    LINE=`tail -1 ${LOGFILE}`
    RC=`echo "${LINE}" | grep "At revision"`
    if [ "${RC}" = "" ]; then
        RC=`echo "${LINE}" | grep "Updated to revision"`
        if [ "${RC}" = "" ]; then
            echo "ERROR: could not update project: ${LINE}"
            exit
        fi
    else
        echo "INFO: no need to update: ${LINE}"
        exit
    fi
fi

echo "Cleanup packaging folder and rebuild"
rm -rf ${PACKDIR}/${BRANCH}
cp -r ${BASE}/data/${BRANCH} ${PACKDIR}

# cleanup
if [ -d "${PACKDIR}/${BRANCH}" ]; then
    cd ${PACKDIR}/${BRANCH}
    echo "Current folder: `pwd`"

    echo "Removing temp files and cache files, if any"
    # no tests needed and no temporary files:
    rm -rf tests *.core *.tmp *.bak *.tpl.php temp/cache
    mkdir -p temp/cache

    echo "Hopefully no one has checked in his password file, we better remove it now"
    rm -f db/local.php

    echo "Chmodding setup.sh"
    chmod u+x setup.sh

    echo "Executing setup.sh"
    ./setup.sh -u www-data -g www-data -n fix

    echo "Removing svn config files"
    find . -name ".svn" | xargs -n 1 rm -rf

    echo "Adding timestamp file to archive"
    echo "Last update: " > .timestamp
    echo `date` >> .timestamp

    cd ${PACKDIR}

    echo "Creating tar.bz2 file"
    rm -f ${BASE}/data/arc/lastiki_${BRANCH}.tar.bz2_previous
    mv ${BASE}/data/arc/lastiki_${BRANCH}.tar.bz2 ${BASE}/data/arc/lastiki_${BRANCH}.tar.bz2_previous
    tar -cjf ${BASE}/data/arc/lastiki_${BRANCH}.tar.bz2 ${BRANCH}

    echo "Createing zip file"
    rm -f ${BASE}/data/arc/lastiki_${BRANCH}.zip_previous
    mv ${BASE}/data/arc/lastiki_${BRANCH}.zip ${BASE}/data/arc/lastiki_${BRANCH}.zip_previous
    zip -rq ${BASE}/data/arc/lastiki_${BRANCH}.zip ${BRANCH}
    chown www-data:www-data ${BASE}/data/arc/lastiki_${BRANCH}.zip
    chmod a+r ${BASE}/data/arc/lastiki_${BRANCH}.zip

    echo "Copying archives to docroot folder"
    cp ${BASE}/data/arc/lastiki_${BRANCH}.tar.bz2_previous ${TARGET}
    cp ${BASE}/data/arc/lastiki_${BRANCH}.tar.bz2 ${TARGET}
    cp ${BASE}/data/arc/lastiki_${BRANCH}.zip_previous ${TARGET}
    cp ${BASE}/data/arc/lastiki_${BRANCH}.zip ${TARGET}

    echo "Creating md5 files"
    cd ${TARGET}
    FILES=`/bin/ls * | grep -v md5 | grep -v grep`
    for FILE in ${FILES}
    do
      md5sum ${FILE} > ${FILE}.md5
      chmod a+r *
    done
else
    echo "ERROR: Folder not found after svn checkout."
    exit
fi

cd ${OLDIR}

echo "Finish"

# eof

error: pathspec 'doc/devtools/provide_tarballs.sh' did not match any file(s) known to git


vlc linux

vlc linux

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/Sistemas-Multimedia/live-streaming.git/'


First commit

First commit

alias cd..='cd ../'
alias cdprj='cd ~/Prj/'
alias cdedu='cd ~/Edu/'
alias cdfri='cd ~/Fri/'
alias aps='cd ~/Edu/APS'
alias os='cd ~/Edu/OS'
alias spo='cd ~/Edu/SPO'
alias prj='cd ~/Prj/'

alias ll='ls -lp'
alias dir='ls -lp'
alias la='ls -alp'
alias rm='rm -i'
alias rmf='rm'
alias cp='cp -i'
alias cpf='cp'
alias mv='mv -i'
alias mvf='mv'

function sshfri {
    h=${1:-lalg}
    u=${2:-jure}
    a=$3
    ssh $u@$h.fri.uni-lj.si $a

}
alias sshlalg='sshfri'
alias sshlalgec='sshfri lalgec'

function edit {
    /Applications/Design/Sublime\ Text\ 2.app/Contents/MacOS/Sublime\ Text\ 2 &
}


Remove PyCrypto

Remove PyCrypto

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


initial commit

initial commit

#!/bin/bash
#Script by Sam Gleske
#Thu Mar  6 23:14:29 EST 2014
#Ubuntu 13.10
#Linux 3.11.0-12-generic x86_64
#GNU bash, version 4.2.45(1)-release (x86_64-pc-linux-gnu)
#Setup script has been adapted from instructions
#http://www.g-loaded.eu/2005/11/10/be-your-own-ca/

######################################################################
#myCA is our Certificate Authority’s directory.
#myCA/certs directory is where our server certificates will be placed.
#myCA/newcerts directory is where openssl puts the created
#   certificates in PEM (unencrypted) format and in the form
#   cert_serial_number.pem (eg 07.pem). Openssl needs this directory,
#   so we create it.
#myCA/crl is where our certificate revokation list is placed.
#myCA/private is the directory where our private keys are placed. Be
#   sure that you set restrictive permissions to all your private keys
#   so that they can be read only by root, or the user with whose
#   priviledges a server runs. If anyone steals your private keys,
#   then things get really bad.
######################################################################
mkdir -m 0755 -p ./myCA/private ./myCA/certs ./myCA/newcerts ./myCA/crl

######################################################################
#We are going to copy the default openssl configuration file
#   (openssl.cnf) to our CA’s directory.
#On Ubuntu it is /etc/ssl; on Fedora it is /etc/pki/tls
#This script assumes Ubuntu.
cp /etc/ssl/openssl.cnf ./myCA/openssl.my.cnf

######################################################################
#This file does not need to be world readable, so we change its
#attributes.
chmod 0600 ./myCA/openssl.my.cnf

######################################################################
#We also need to create two other files. This file serves as a
#database for openssl.
touch ./myCA/index.txt

######################################################################
#The following file contains the next certificate’s serial number.
#Since we have not created any certificates yet, we set it to "01".
echo '01' > ./myCA/serial

######################################################################
#Things to remember about SSL file extensions
#  KEY – Private key (Restrictive permissions should be set on this)
#  CSR – Certificate Request (This will be signed by our CA in order
#        to create the server certificates. Afterwards it is not
#        needed and can be deleted)
#  CRT – Certificate (This can be publicly distributed)
#  PEM – We will use this extension for files that contain both the
#        Key and the server Certificate (Some servers need this).
#        Permissions should be restrictive on these files.
#  CRL – Certificate Revokation List (This can be publicly
#        distributed)


Use fd-find as FZF engine if both are installed

#!/bin/zsh
# If fzf and fd-find do not exist => exit
! [ -f "$HOME/.fzf.zsh" ] && return 0
! [ -f "$HOME/.cargo/bin/fd" ] && return 0

# Use fd-find as FZF engine
export FZF_DEFAULT_COMMAND='fd --type file --color=always'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_ALT_C_COMMAND='fd --type directory --color=always'
export FZF_DEFAULT_OPTS="--ansi"

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


Create run.sh

Create run.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/voltron80/ubuntu-upscripts.git/'


script to run piscope app

script to run piscope app

#!/bin/sh
cd app
xinit /usr/bin/python pipscope.py

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


now print out the names of the ENV_VARS

now print out the names of the ENV_VARS

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/Financial-Times/email-users-kafka-consumer.git/'


add sh-script to run alloy on current dir

java -Duser.home=`pwd` -jar alloy41/alloy41.jar &


Initial commit.

Initial commit.

#!/bin/bash

cd `dirname $0`

path=`curl -s http://www.bing.com | grep -m1 -oP 'url:\s*("[^"]+")' | cut -d: -f2 | jq '.' | tr -d '"'`
url=http://www.bing.com$path

file=`echo $url | rev | cut -d/ -f1 | rev`
out=wallpapers/$file

if [ -f "$out" ]; then
  echo "Wallpaper already exists, exiting."
  exit -1
fi

mkdir -p wallpapers
curl -s -o "$out" "$url"

git checkout -b wallpapers
git add -v wallpapers
git commit -m "Add wallpaper."
ssh-agent bash -c "ssh-add id_rsa && git push -u origin wallpapers"


script to prepare and launch hipache

script to prepare and launch hipache

#!/usr/bin/env bash
# VERSION: 0.1.0
# AUTHOR: Joan Llopis <jllopis@acb.es>
REDIS_PORT_6379_TCP_ADDR="localhost"
REDIS_PORT_6379_TCP_PORT=6379
TIMEOUT=${HIPACHE_REDIS_TIMEOUT:=10}

reset="\033[0m"
underline="\033[4m"
bold="\033[1m"
red="\033[31m"
green="\033[32m"
yellow="\033[33m"
blue="\033[34m"
magenta="\033[35m"
cyan="\033[36m"
white="\033[37m"
orange="\033[33m"
purple="\033[31m"
grey="\033[37m"

echo -e "${cyan}${bold}Wait for Redis to start (timeout ${TIMEOUT}s)${reset}"
until $(: </dev/tcp/${REDIS_PORT_6379_TCP_ADDR}/${REDIS_PORT_6379_TCP_PORT} 2>/dev/null); do
	sleep 1
	let TIMEOUT=TIMEOUT-1
	if [ $TIMEOUT -eq 0 ]; then
		echo -e "${red}${bold}Timeout connecting to Redis. Aborting!${reset}"
		echo -e "${yellow}Start the container for Redis Server and try again${reset}"
		exit 1
	fi
done

echo -e "${green}Successfully connected to Redis!${reset}"

echo -3 "${cyan}Starting hipache...${reset}"
/usr/local/bin/hipache -c /usr/local/lib/node_modules/hipache/config/config.json


Experiments running

Experiments running

#!/bin/bash

for i in {1..3}; do
    foreman start web &
    cd client; ./client-ea.js && killall node
done


Made run.sh executable.

Made run.sh executable.

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/PrincessTeruko/TsunArt.git/'


Add launcher, which launches with debug output


Added port mapping 52003:2003

Added port mapping 52003:2003

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/asyncee/docker-graphite.git/'


finish launch.sh

finish launch.sh

#!/bin/bash

echo "Please enter ami image id:"
read id
echo "Please enter cout:"
read cnt
echo "Please enter instance type:"
read type
echo "Please enter security group:"
read sg
echo "Please enter subnet id:"
read sn
echo "Please enter key name:"
read key

aws ec2 run-instances --image-id $id --count $cnt --instance-type $type --security-group-ids $sg --subnet-id $sn --key-name $key --associate-public-ip-address --user-data file:..//Environment-Setup/install-env.sh --debug

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


modify the convert.sh script

modify the convert.sh 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/frankgu/tensorflow_video_classification_LSTM.git/'


Add aliases for exercism commands

Add aliases for exercism commands

fatal: remote error: upload-pack: not our ref 73c91dfb61fe20363e12d4039e5376c70155bbad
fatal: the remote end hung up unexpectedly


Fix pwd in set_xsd_urls.sh

Fix pwd in set_xsd_urls.sh

git-svn-id: 27916816d6cfa57849e9a885196bf7392b80e1ac@12291 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/'


[.files/lib/scpt/] RemoveDirectoryFromUsersHome.sh added.

#!/usr/bin/env bash

if [ -d "${SYMLINK_OR_DIR}" ]; then # If $SYMLINK_OR_DIR exists then...
	if [ -L "${SYMLINK_OR_DIR}" ]; then # If $SYMLINK_OR_DIR is a symbolic link then...
		rm "${SYMLINK_OR_DIR}" # Remove $SYMLINK.
	else # Else, ie if $SYMLINK_OR_DIR is a directory, then...
		if [ $(ls -A "${SYMLINK_OR_DIR}") ]; then # If $DIR is empty then...
			mv "${SYMLINK_OR_DIR}/*" ${HOME}/Desktop/ # Move $DIR's contents to current user's desktop.
			rmdir "${SYMLINK_OR_DIR}" # Remove $DIR.
		else # Else, ie if $DIR is not empty, then...
			rmdir "${SYMLINK_OR_DIR}" # Remove $DIR.
		fi
	fi
fi

if [ ! -d "${SYMLINK_OR_DIR}" ]; then # If $SYMLINK_OR_DIR does not exist then...
	exit
fi

error: pathspec 'lib/scpt/RemoveDirectoryFromUsersHome.sh' did not match any file(s) known to git


added open alias

added open alias

fatal: remote error: upload-pack: not our ref d85f033ee58d610b02f4ee6d501417a724d888cb
fatal: the remote end hung up unexpectedly


CSV report generator

CSV report generator

#!/bin/bash

echo "file,missing,extra"
for t in tests/* ; do
	DATA=`fcss-comp $t/fcss-2.csv $t/fcss-2a.csv |  grep -A 5 "SUMMARY" | tail -2`
	MISSING=`echo "$DATA" | sed -r '/EXTRA:.*/d;s/MISSING:\s*(.*)/\1/'`
	EXTRA=`echo "$DATA" | sed -r '/MISSING:.*/d;s/EXTRA:\s*(.*)/\1/'`
	echo $t, $MISSING, $EXTRA
done

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


bash: Add fzf util for spawning tmux sessions with new terminal

fatal: remote error: upload-pack: not our ref 7011c14da1bae4850a6e96d43c49e07b0a37c251
fatal: the remote end hung up unexpectedly


Added opt-out header

Added opt-out header

fatal: remote error: upload-pack: not our ref d178caf2c544f6ee45b1ba409aa179281f2c30c8
fatal: the remote end hung up unexpectedly


Time is off; cannot determine why; thought it was timezone

fatal: remote error: upload-pack: not our ref 6dcb4e35ff1c8ddedf6a3050ab780a896775a73f
fatal: the remote end hung up unexpectedly


Remove command not found brew hook

Remove command not found brew hook

fatal: remote error: upload-pack: not our ref 063b5fd8399a1d8c7609abfc0b12e4ccfde6825b
fatal: the remote end hung up unexpectedly


Upload updated auto.sh

Upload updated auto.sh

#Creator of script: SirJosh3917
#Creator of anime-dl: Xonshiz
#May (5) 5th, 2018 - Updated June (6) 10th, 2018

#check if root
#https://askubuntu.com/questions/15853/how-can-a-script-check-if-its-being-run-as-root
is_root() {
	if ! [ $(id -u) = 0 ]; then
		echo "Please run this script as root."
		echo "Running \'sudo\' on this script..."

		SCRIPT_NAME=$(basename "$0")

		CMD="sudo ./${SCRIPT_NAME}"
		eval ${CMD}
		exit $?
	fi
}

#shamelessly stolen/modified from https://install.pi-hole.net
distro_check() {
	DISTRO_OS=""
	DISTRO_DEBIAN="debian"

	PKG_MANAGER=""
	PKG_INSTALL=""

	if command -v apt-get &> /dev/null; then
		DISTRO_OS=(${DISTRO_DEBIAN})
		PKG_MANAGER="apt-get"
		PKG_INSTALL="${PKG_MANAGER} --yes --no-install-recommends install"
#	elif command -v rpm &> /dev/null; then
#		if command -v dnf &> /dev/null; then
#			PKG_MANAGER="dnf"
#		elif
#			PKG_MANAGER="yum"
#		fi
	else
		echo "Your linux distro is not supporeted."
		exit
	fi

	if [ ${DISTRO_OS} == ${DISTRO_DEBIAN} ]; then
		return 0;
	else
		echo "Your linux distro either isn\'t supported, or somebody didn\'t finish coding the distro_check..."
		exit
	fi

	return 0;
}

get_distro() {
	DISTRO_DEBIAN_7=0
	DISTRO_DEBIAN_8=1
	DISTRO_DEBIAN_9=2
	RETURN=-1

	if [ ${DISTRO_OS} == ${DISTRO_DEBIAN} ]; then
		lsb_release -a > tmp_distro
		if grep "stretch" tmp_distro; then
			RETURN=${DISTRO_DEBIAN_9}
		elif grep "jessie" tmp_distro; then
                        RETURN=${DISTRO_DEBIAN_8}
                elif grep "wheezy" tmp_distro; then
                        RETURN=${DISTRO_DEBIAN_7}
		else
			echo "Version of debian not supported."
			RETURN=-1;
		fi
	fi

	rm tmp_distro
	return ${RETURN}
}

install_ffmpeg() {
	${PKG_INSTALL} ffmpeg
}

install_mkvmerge() {
	wget -q -O - https://mkvtoolnix.download/gpg-pub-moritzbunkus.txt | sudo apt-key add -

	get_distro
	DISTRO=$?

	if [ ${DISTRO} == ${DISTRO_DEBIAN_9} ]; then
		deb https://mkvtoolnix.download/debian/ stretch main
		deb-src https://mkvtoolnix.download/debian/ stretch main
	elif [ ${DISTRO} == ${DISTRO_DEBIAN_8} ]; then
		deb https://mkvtoolnix.download/debian/ jessie main
		deb-src https://mkvtoolnix.download/debian/ jessie main
	elif [ ${DISTRO} == ${DISTRO_DEBIAN_7} ]; then
                deb https://mkvtoolnix.download/debian/ wheezy main
                deb-src https://mkvtoolnix.download/debian/ wheezy main
        else echo "Distro unsupported."; return 1; fi

	apt update
	${PKG_INSTALL} mkvtoolnix
}

install_nodejs() {
	curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
	${PKG_INSTALL} nodejs
}

install_animedl() {
	wget https://github.com/Xonshiz/anime-dl/archive/master.tar.gz
	tar -xzf master.tar.gz
	mv anime-dl-master anime-dl #rename to anime-dl
	rm master.tar.gz

	SCRIPTS_DIR="anime-dl/anime_dl/"

	#make it runnable
	chmod -R +x ${SCRIPTS_DIR}
	chmod -R 755 ${SCRIPTS_DIR}
}

install_curl() {
	${PKG_INSTALL} curl
}

install_pip() {
	curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
	python get-pip.py
	rm get-pip.py
}

install_dependencies() {
	pip install cfscrape
	pip install tqdm
	pip install bs4
}

ensure_animedl_installed() {
	#find "Anime_DL downloads anime from" in the --help

	FIND="Anime_DL downloads anime from"
	SCRIPTS_DIR="anime-dl/anime_dl/"
	RETURN=1

	cd ${SCRIPTS_DIR}
	./__main__.py --help > ../../tmp_help
	cd ..; cd ..

	if grep "${FIND}" tmp_help; then
		echo "anime-dl installed!";
		RETURN=0
	else
		echo "anime-dl not installed...";
		RETURN=1
	fi

	rm tmp_help
	return ${RETURN}
}

#make sure we're root so we can install packages

is_root

distro_check

if [ $? == 0 ]; then
	install_ffmpeg
	install_mkvmerge
	install_nodejs
	install_curl
	install_pip
	install_dependencies
	install_animedl
	ensure_animedl_installed
	exit $?
else
	echo "no"
	exit
fi

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


Install Microsoft Teams

Install Microsoft Teams

fatal: remote error: upload-pack: not our ref d26e19179a4d56c1cac11f1249361103794ad851
fatal: the remote end hung up unexpectedly


Comment out stuff I won't be needing.

Comment out stuff I won't be needing.

fatal: remote error: upload-pack: not our ref 87607d5942185ae2d4a214254dcf6efe606666df
fatal: the remote end hung up unexpectedly


teamcity-install.sh

teamcity-install.sh

#!/bin/bash
#title           :teamcity-install.sh
#description     :The script to install TeamCity 9.x
#more            :https://confluence.jetbrains.com/display/TCD9/Installing+and+Configuring+the+TeamCity+Server
#author	         :Tomas Pecserke
#date            :2016-05-03T14:43+0100
#usage           :/bin/bash teamcity-install.sh
#tested-version  :9.1.6
#tested-distros  :Ubuntu 16.04

TEAMCITY_VERSION=9.1.6
TEAMCITY_FILENAME=TeamCity-$TEAMCITY_VERSION
TEAMCITY_ARCHIVE_NAME=$TEAMCITY_FILENAME.tar.gz
TEAMCITY_DOWNLOAD_ADDRESS=https://download.jetbrains.com/teamcity/$TEAMCITY_ARCHIVE_NAME

INSTALL_DIR=/opt
TEAMCITY_DIR=$INSTALL_DIR/teamcity

TEAMCITY_USER="teamcity"
TEAMCITY_GROUP="teamcity"
TEAMCITY_SERVICE="teamcity"

TEAMCITY_SERVICE_STARTUP_TIMEOUT=240
TEAMCITY_SERVICE_SHUTDOWN_TIMEOUT=30

if [ $EUID -ne 0 ]; then
  echo "This script must be run as root."
  exit 1
fi

if [ ! -x /bin/systemctl ]; then
  echo "Systemd not found. This script uses systemd service to manage TeamCity."
  exit 1
fi

if [ $(java -version 2>&1 | head -n 1 | grep 1.8 -c) -ne 1 ]; then
  echo "Java 1.8 is required."
  exit 1
fi

echo "Downloading: $TEAMCITY_DOWNLOAD_ADDRESS..."
cd /tmp
if [ -e "$TEAMCITY_ARCHIVE_NAME" ]; then
  echo 'TeamCity archive already exists.'
else
  curl -L -O $TEAMCITY_DOWNLOAD_ADDRESS
  if [ $? -ne 0 ]; then
    echo "Not possible to download TeamCity."
    exit 1
  fi
fi

echo "Creating user and group..."
getent group $TEAMCITY_GROUP > /dev/null || \
  groupadd $TEAMCITY_GROUP
getent passwd $TEAMCITY_USER > /dev/null || \
  useradd -s /bin/false -g $TEAMCITY_GROUP -d $INSTALL_DIR $TEAMCITY_USER

echo "Installation..."
mkdir $TEAMCITY_DIR -p
tar -xzf $TEAMCITY_ARCHIVE_NAME -C $TEAMCITY_DIR --strip-components=1
chown -R $TEAMCITY_USER:$TEAMCITY_GROUP $TEAMCITY_DIR
chown -R $TEAMCITY_USER:$TEAMCITY_GROUP $TEAMCITY_DIR/

echo "Registering service..."
cat > /etc/systemd/system/$TEAMCITY_SERVICE.service << "EOF"
[Unit]
Description=TeamCity continuous integration and deployment server
After=network.target

[Service]
Type=forking

ExecStart=$TEAMCITY_DIR/bin/runAll.sh start
ExecStop=$TEAMCITY_DIR/bin/runAll.sh stop

User=$TEAMCITY_USER
Group=$TEAMCITY_GROUP

[Install]
WantedBy=multi-user.target
EOF

sed -i -e 's,$TEAMCITY_DIR,'$TEAMCITY_DIR',g' /etc/systemd/system/$TEAMCITY_SERVICE.service
sed -i -e 's,$TEAMCITY_USER,'$TEAMCITY_USER',g' /etc/systemd/system/$TEAMCITY_SERVICE.service
sed -i -e 's,$TEAMCITY_GROUP,'$TEAMCITY_GROUP',g' /etc/systemd/system/$TEAMCITY_SERVICE.service

systemctl daemon-reload
systemctl enable $TEAMCITY_SERVICE

echo "Starting service..."
systemctl start $TEAMCITY_SERVICE

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


Added triggered dlms url parameter

Added triggered dlms url parameter

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/OSGP/Integration-Tests.git/'


added autostart mount script

added autostart mount script

#!/bin/bash

# This script is written by Pascal Wichmann (pa-w.de)
# See installation instructions on GitHub (github.com/wichmannpas) in order for this script to work!

#this script needs to be ran as root! (usually via rc.local or a similar autostart service)

# mount actual partition as read only
mount -o ro /dev/sda1 /home_ro

# mount new writeable blank tmpfs file system
mount -t tmpfs none /home_rw

# mount tmpfs over ro actual partition using aufs on /home
mount -t aufs -o dirs=/home_rw=rw:/home_ro=ro unionfs /home


logwork orange

logwork orange

fatal: remote error: upload-pack: not our ref cdffa4ba73b05603336a03c07af2df76028ba5eb
fatal: the remote end hung up unexpectedly


fix for sierra update

fix for sierra update

fatal: remote error: upload-pack: not our ref 70a6f296072c908aac3cf7b45b8ed30962b25ab6
fatal: the remote end hung up unexpectedly


try qt5

try qt5

fatal: remote error: upload-pack: not our ref 5b544b0434c3b772dff1d48b2f43ac2c5b161294
fatal: the remote end hung up unexpectedly


imageoptim added

imageoptim added

# OSX-only stuff. Abort if not OSX.
is_osx || return 1

# Exit if Homebrew is not installed.
[[ ! "$(type -P brew)" ]] && e_error "Brew casks need Homebrew to install." && return 1

# Ensure the cask keg and recipe are installed.
kegs=(caskroom/cask)
brew_tap_kegs
recipes=(brew-cask)
brew_install_recipes

# Exit if, for some reason, cask is not installed.
[[ ! "$(brew ls --versions brew-cask)" ]] && e_error "Brew-cask failed to install." && return 1

# Hack to show the first-run brew-cask password prompt immediately.
brew cask info this-is-somewhat-annoying 2>/dev/null

# Homebrew casks
casks=(
  ## Applications
  a-better-finder-rename
  atom
  bettertouchtool
  charles
  chromium
  chronosync
  crypt
  dropbox
  fastscripts
  firefox
  flux
  google-chrome
  gyazo
  hex-fiend
  imageoptim
  istat-menus
  iterm2
  lastpass
  launchbar
  macvim
  mailbox
  moom
  omnidisksweeper
  race-for-the-galaxy
  reaper
  remote-desktop-connection
  safemonk
  sonos
  spotify
  steam
  synology-assistant
  teamspeak-client
  the-unarchiver
  todoist
  totalfinder
  tower
  transmission-remote-gui
  vagrant
  virtualbox
  vlc
  ## Quick Look plugins
  betterzipql
  qlcolorcode
  qlmarkdown
  qlprettypatch
  qlstephen
  quicklook-csv
  quicklook-json
  quicknfo
  suspicious-package
  webp-quicklook
  ## Color pickers
  colorpicker-developer
  colorpicker-skalacolor
)

# Install Homebrew casks.
casks=($(setdiff "${casks[*]}" "$(brew cask list 2>/dev/null)"))
if (( ${#casks[@]} > 0 )); then
  e_header "Installing Homebrew casks: ${casks[*]}"
  for cask in "${casks[@]}"; do
    brew cask install $cask
  done
  brew cask cleanup
fi

# Work around colorPicker symlink issue.
# https://github.com/caskroom/homebrew-cask/issues/7004
cps=()
for f in ~/Library/ColorPickers/*.colorPicker; do
  [[ -L "$f" ]] && cps=("${cps[@]}" "$f")
done

# Work around lastpass requiring an installer dance
# we aren't doing anything special with homebrew / cask
open "/opt/homebrew-cask/Caskroom/lastpass/latest/LastPass Installer.app"

if (( ${#cps[@]} > 0 )); then
  e_header "Fixing colorPicker symlinks"
  for f in "${cps[@]}"; do
    target="$(readlink "$f")"
    e_arrow "$(basename "$f")"
    rm "$f"
    cp -R "$target" ~/Library/ColorPickers/
  done
fi

# OSX-only stuff. Abort if not OSX.
is_osx || return 1

# Exit if Homebrew is not installed.
[[ ! "$(type -P brew)" ]] && e_error "Brew casks need Homebrew to install." && return 1

# Ensure the cask keg and recipe are installed.
kegs=(caskroom/cask)
brew_tap_kegs
recipes=(brew-cask)
brew_install_recipes

# Exit if, for some reason, cask is not installed.
[[ ! "$(brew ls --versions brew-cask)" ]] && e_error "Brew-cask failed to install." && return 1

# Hack to show the first-run brew-cask password prompt immediately.
brew cask info this-is-somewhat-annoying 2>/dev/null

# Homebrew casks
casks=(
  ## Applications
  a-better-finder-rename
  atom
  bettertouchtool
  charles
  chromium
  chronosync
  crypt
  dropbox
  fastscripts
  firefox
  flux
  google-chrome
  gyazo
  hex-fiend
  istat-menus
  iterm2
  lastpass
  launchbar
  macvim
  mailbox
  moom
  omnidisksweeper
  race-for-the-galaxy
  reaper
  remote-desktop-connection
  safemonk
  sonos
  spotify
  steam
  synology-assistant
  teamspeak-client
  the-unarchiver
  todoist
  totalfinder
  tower
  transmission-remote-gui
  vagrant
  virtualbox
  vlc
  ## Quick Look plugins
  betterzipql
  qlcolorcode
  qlmarkdown
  qlprettypatch
  qlstephen
  quicklook-csv
  quicklook-json
  quicknfo
  suspicious-package
  webp-quicklook
  ## Color pickers
  colorpicker-developer
  colorpicker-skalacolor
)

# Install Homebrew casks.
casks=($(setdiff "${casks[*]}" "$(brew cask list 2>/dev/null)"))
if (( ${#casks[@]} > 0 )); then
  e_header "Installing Homebrew casks: ${casks[*]}"
  for cask in "${casks[@]}"; do
    brew cask install $cask
  done
  brew cask cleanup
fi

# Work around colorPicker symlink issue.
# https://github.com/caskroom/homebrew-cask/issues/7004
cps=()
for f in ~/Library/ColorPickers/*.colorPicker; do
  [[ -L "$f" ]] && cps=("${cps[@]}" "$f")
done

# Work around lastpass requiring an installer dance
# we aren't doing anything special with homebrew / cask
open "/opt/homebrew-cask/Caskroom/lastpass/latest/LastPass Installer.app"

if (( ${#cps[@]} > 0 )); then
  e_header "Fixing colorPicker symlinks"
  for f in "${cps[@]}"; do
    target="$(readlink "$f")"
    e_arrow "$(basename "$f")"
    rm "$f"
    cp -R "$target" ~/Library/ColorPickers/
  done
fi


Modification du mot de passe pour le relai MX

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/hardware/mailserver-autoinstall.git/'


Added app install script.

Added app install script.

#!/bin/sh

./gradlew :app:installDebug
./gradlew :app-flavor:installProductionDebug
./gradlew :app-flavor:installDevelopmentDebug
./gradlew :app-androidformenhancer:installDebug
./gradlew :app-richbuttons:installDebug
./gradlew :app-simplealertdialog:installDebug

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


add installer.sh

add installer.sh

#!/bin/bash

echo Downloading Jython...
hg clone http://hg.python.org/jython

echo Removing PySonar 1.0...
rm -rf jython/tests/java/org/python/indexer
rm -rf jython/src/org/python/indexer/*

echo Moving PySonar2 into src/org/python/indexer
mv * jython/src/org/python/indexer

echo Buidling
cd jython
ant jar-complete

echo Please find PySonar2 inside 'dist/jython.jar'
echo To run demo:
echo java -classpath dist/jython.jar org.python.indexer.demos.HtmlDemo /usr/lib/python2.7 /usr/lib/python2.7


Add a simple install script.

Add a simple install script.

- Not tested yet.

#! /bin/sh
#
# install.sh
# Copyright (C) 2014 Roy QIU <karoyqiu@gmail.com>
#
# Distributed under terms of the MIT license.
#

SCRIPT=$(readlink -f $0)
RC_DIR=`dirname $SCRIPT`
echo "RC directory: $RC_DIR"
echo "Installing RC to $HOME"

# vimrc
read -n 1 -p "Do you want to install vimrc? [Y/n]: " ANSWER
echo ""

if [[ "$ANSWER" = [Yy] ]]
then
    echo "Installing vimrc"

    # Backup the original .vimrc and .vim
    if [ -f "$HOME/.vimrc" ]
    then
        mv -f "$HOME/.vimrc" "$HOME/.vimrc.bak"
    fi

    if [ -d "$HOME/.vim" ]
    then
        mv -f "$HOME/.vim" "$HOME/.vim.bak"
    fi

    # Make a symbolic link
    ln -fs "$RC_DIR/vimrc" "$HOME/.vim"
fi

# oh-my-zsh
read -n 1 -p "Do you want to install oh-my-zsh? [Y/n]: " ANSWER
echo ""

if [[ "$ANSWER" = [Yy] ]]
then
    echo "Installing oh-my-zsh"

    # Backup the original .oh-my-zsh
    if [ -d "$HOME/.oh-my-zsh" ]
    then
        mv -f "$HOME/.oh-my-zsh" "$HOME/.oh-my-zsh.bak"
    fi

    # Make a symbolic link
    ln -fs "$RC_DIR/oh-my-zsh" "$HOME/.oh-my-zsh"
    $HOME/.oh-my-zsh/tools/install.sh
fi

# astyle
read -n 1 -p "Do you want to install astylerc? [Y/n]: " ANSWER
echo ""

if [[ "$ANSWER" = [Yy] ]]
then
    echo "Installing oh-my-zsh"

    # Backup the original .astylerc
    if [ -d "$HOME/.astylerc" ]
    then
        mv -f "$HOME/.astylerc" "$HOME/.astylerc.bak"
    fi

    # Make a symbolic link
    ln -fs "$RC_DIR/astylerc" "$HOME/.astylerc"
fi

# astyle
read -n 1 -p "Do you want to install git config files? [Y/n]: " ANSWER
echo ""

if [[ "$ANSWER" = [Yy] ]]
then
    echo "Installing oh-my-zsh"

    # Backup the original .gitconfig
    if [ -d "$HOME/.gitconfig" ]
    then
        mv -f "$HOME/.gitconfig" "$HOME/.gitconfig.bak"
    fi

    # Make a symbolic link
    ln -fs "$RC_DIR/git/gitconfig" "$HOME/.gitconfig"
    ln -fs "$RC_DIR/git/gitignore_global" "$HOME/.gitignore_global"
fi

echo "Done"


Adicionado script de configuração de monitor exerno

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


minor script fix

minor script fix

git-svn-id: 38a422904f24e0d8449a4199bfa17604df50ed60@301 d3c6d0af-6456-5cbd-3218-6188ca4e956b

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/whatvn/rfc5766-turn-server.git/'


Add backup_musashi.sh

Add backup_musashi.sh

#!/bin/bash

# Backs up some /media/musashi files to /mediazero-unity's files to /media/musashi, which is encrypted.
#
# Note that files not readable by current user (notably /root,
# including /root/keys) will not be copied.
BACKUP_DIR=/media/clown/backup/musashi-backup-$(date +%Y-%m-%d)
[[ -d /media/musashi ]] || {
  echo "FATAL: No /media/musashi" >&2
  exit 1
}
[[ -d /media/clown ]] || {
  echo "FATAL: No /media/clown" >&2
  exit 1
}
cd /media/musashi
rsync -vaHAX . ${BACKUP_DIR} --exclude={anime,backup,video,educational,lost+found}

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


code to kill previous terminators

code to kill previous terminators

#! /bin/bash
zenity --title Killer --text "Kill existing drop downs?" --question >& /dev/null
if [[ $? -eq 0 ]]; then
	a=$(pgrep -f dropdown);
	terminator -b --layout=dropdown --profile=solar &
	kill -9 $a
else
	terminator -b --layout=dropdown --profile=solar &
fi

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


fixed query and content provider shell scripts

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/rfcx/rfcx-guardian-android.git/'


add bin/reset_vbox.sh

add bin/reset_vbox.sh

#!/bin/sh

rm -rf ~/.VirtualBox/
rm -rf ~/VirtualBox\ VMs/
rm -rf ~/.vagrant
rm ~/travis-worker/.vagrant
rm ~/travis-worker/base/.vagrant

killall VBoxXPCOMIPCD
killall VBoxSVC
killall VBoxHeadless

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


[Genomics]: Add a basic script which can be used to submit the sparkcaller JAR.

#!/bin/sh
spark-submit --class com.github.sparkcaller.SparkCaller \
    --executor-memory 16G \
    --driver-memory 6G \
    sparkcaller-1.0.jar \
    $@

error: pathspec 'genomics/sparkcaller/submit-sparkcaller.sh' did not match any file(s) known to git


jeeze

jeeze

Ok, this will get actual somewhat meaningful revisions

#! /bin/sh

if (( $# != 1 )); then
  echo "Call this script with the name of the environment"
  echo "Example: ${0} production"
  exit 1
fi

CODEDIR='/etc/puppetlabs/code/environments'
CODESTAGE='/etc/puppetlabs/code-staging/environments'
GITCODEDIR="${CODEDIR}/${1}/.git"
GITCODESTAGE="${CODESTAGE}/${1}/.git"

# Are we using old-school git clones?
if [ -d ${GITCODEDIR} ]; then
  git --git-dir ${GITCODEDIR} rev-parse --short HEAD

elif [ -d ${GITCODESTAGE} ]; then
  git --git-dir ${GITCODESTAGE} rev-parse --short HEAD

else
  date '+%s'
fi

#! /bin/sh

if (( $# != 1 )); then
  echo "Call this script with the name of the environment"
  echo "Example: ${0} production"
  exit 1
fi

ENVROOT='/etc/puppetlabs/code/environments'
GITDIR="${ENVROOT}/${1}/.git"

# check to make sure the env repo exists
if [ -e ${GITDIR} ];
then
  git --git-dir ${GITDIR} rev-parse --short HEAD
else
  date '+%s'
fi


Tache d'export vers DB2 pour les DRM

Tache d'export vers DB2 pour les DRM

#!/bin/bash

. bin/task.inc

DESCRIPTION="Export des DRM pour DB2"

. bin/task_start.inc

EXPORT_DIR=contrat/export_drm_db2
LINK="$TASK_URL/$EXPORT_DIR/?C=M;O=D"
EXPORT_DIR=$(pwd)/contrat/export_drm_db2

mkdir -m 777 $EXPORT_DIR > /dev/null

cd $GIILDA_DIR

php symfony drm:export-db2 $EXPORT_DIR --application=civa

echo "[Télécharger le fichier]($TASK_URL/$EXPORT_FILE)"

error: pathspec 'project/bin/task/05-DRM/02-export-db2.sh' did not match any file(s) known to git


improving module "OTRS"

improving module "OTRS"

*  still incomplete => manual configuration needed
*  more log messages
*  more TODO hints

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/bheisig/smartitsm.git/'


rework sign script to sign any chain of frameworks

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/drmonkeysee/Laconomie-FirstDraft.git/'


Create merge_subtitles.sh

Create merge_subtitles.sh

#!/bin/bash

OLD_IFS="${IFS}"
IFS=$'\n'
for SUBTITLE_FILE in `find /Storage/Videos/ -name '*.srt'` ; do
    echo "Subtitle file is ${SUBTITLE_FILE}"
    # Verify is english
    if [[ `echo "${SUBTITLE_FILE}" | grep '.en.srt'` == "" ]];then
        echo "Non english subtitle file, deleting."
        rm "${SUBTITLE_FILE}"
        continue
    fi
    VIDEO_FILE=$(find "${SUBTITLE_FILE%???????}"* -name '*.mkv' -or -name '*.mp4')
    echo "Video File is    ${VIDEO_FILE}"

    # mkvmerge cannot perform an in place add so we must copy into a temp file
    echo "Merging..."
    mkvmerge -o "${VIDEO_FILE}".TEMP "${VIDEO_FILE}" --language 0:eng "${SUBTITLE_FILE}"
    if [[ $? == 0 ]];then
        echo "Merege was successful, cleaning up..."
        rm "${VIDEO_FILE}"
        rm "${SUBTITLE_FILE}"
        mv "${VIDEO_FILE}".TEMP "${VIDEO_FILE}"
    else
        echo "There was an error!"
        continue
    fi
    echo "Finished loop."
done
IFS="${OLD_IFS}"
echo "All done, exiting."

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


script to extact transcriptions from audio dir

#!/bin/bash

ENTRADA=$1
SALIDA=$2

#just in case
cd /home/jls/work/speech/speech-asr/speech-asr/egs/english/s5b/bin

for fichero in $(ls $ENTRADA | grep "\.wav")
  do
    ./nnet6-process-wav-to-lat-and-ctm_withSAD_mono_and_stereo.sh $ENTRADA/$fichero $SALIDA
done

error: pathspec 'data_preparation/jobScreening_cvpr17/run_asr_on_dir.sh' did not match any file(s) known to git


git-svn-id: http://svn.bigcat.unimaas.nl/bridgedb/trunk@379 e3f1d335-44b1-4163-9530-9b341189ae98

#!!!!!!!!!!!
# Update "release-#" below
#!!!!!!!!!!!

ftp_site=ftp.ensemblgenomes.org
species_list=${1?"Usage: $0 species_list"}

mysql='mysql --host=mysql-dev.cgl.ucsf.edu --port=13308'
mysqlimport='mysqlimport  --host=mysql-dev.cgl.ucsf.edu --port=13308'

cat $species_list | while read species_name
do

 # check if commented out
 if [[ $species_name =~ '#' ]]
 then
	echo "Skip!: $species_name commented out in file: $species_list"
	continue
 fi

  export species_name="$species_name"; var=`echo "ls -l /pub/plants/release-4/mysql/" | ncftp ${ftp_site} | perl -ane 'if ( $_ =~ /$Logged in to/ ) { $go=1; next } if ( $go ) { @a=split; $fileName=$a[ scalar( @a ) - 1]; $compareStr=$ENV{ species_name }."_core"; if ( $fileName =~/^$compareStr/) { print $fileName."\n"; } }'`; set -- $var; mysql_db_name=$1

  # check variable before proceeding
  if [[ $mysql_db_name =~ 'species_list' || $mysql_db_name == '' ]]
  then
	echo "Skip!:  $species_name not found at $ftp_site. Please fix file: $species_list"
  	continue
  fi

  echo "** $mysql_db_name **"
  mkdir ./${mysql_db_name}

  # get raw tables from ftp site
  ncftpget ${ftp_site} ./${mysql_db_name} /pub/plants/release-4/mysql/${mysql_db_name}/*.txt.gz
  for q in ./${mysql_db_name}/*.txt.gz
  do
    gunzip $q
  done

  ncftpget ${ftp_site} ./ /pub/plants/release-4/mysql/${mysql_db_name}/${mysql_db_name}.sql.gz
  gunzip ./${mysql_db_name}.sql.gz

  #create local mysql db
  echo "create database if not exists ${mysql_db_name_local}" | ${mysql} -u genmapp -pfun4genmapp
  #create schema
  ${mysql} -u genmapp -pfun4genmapp ${mysql_db_name_local} < ./${mysql_db_name}.sql
   # place in own scope, due to "cd" command
  (
    cd ./${mysql_db_name}; for table_name in *.txt
    do
      ${mysqlimport} -u genmapp -pfun4genmapp ${mysql_db_name_local} `pwd`/${table_name}
    done
  )

  # zip, archive and clean up
  gzip ./${mysql_db_name}.sql
  tar cvzf ./${mysql_db_name}.txt.tgz ./${mysql_db_name}/*
  rm -R ./${mysql_db_name}/

done

error: pathspec 'dbbuilder/src/org/bridgedb/download/plants_download.sh' did not match any file(s) known to git


Added #192 shell script.

Added #192 shell 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/geth1b/h1b-coding-interview.git/'


bash script for bulk upload and analyze via POST request

#!/bin/bash

#FILES = regex for folder
#PROJECT = project for POST request

for f in $FILES
do
	echo "Processing $f ..."
	curl -X POST -H "Content-Type: application/json" http://localhost:7081/analyze/"$PROJECT"/"$f" > /dev/null
	echo "Done"

done
echo "FINISHED"

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


initialize repo and add first file

initialize repo and add first file

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/jstitch/git_history_visualizer.git/'


Create post-link.sh

Create post-link.sh

#!/bin/bash

echo ""
echo "Must set environmental variable:"
echo "export GDAL_DATA=$PREFIX/share/gdal"

error: pathspec 'gdal/gdal-data_1.10.1/post-link.sh' did not match any file(s) known to git


加入控制脚本.

加入控制脚本.

#!/bin/bash
# @describe:
# @author:   Jerry Yang(hy0kle@gmail.com)

#set -x

bin_name="api-server"
server_port=`grep port conf/server.json | head -n 1 | awk '{split($2, cntr, ","); print cntr[1]}'`
prog="$bin_name:$server_port"
#echo $prog

work_pid=""
function get_work_pid()
{
    work_pid=$(ps aux | grep $prog | grep -v grep | awk '{print $2}' | xargs)
}

get_work_pid

case "$1" in
    start)
        if ((work_pid > 0))
        then
            echo "$prog is working..."
            exit 1
        else
            cmd="./$bin_name"
            nohup $cmd &
            echo "$prog start work."
        fi
    ;;

    stop)
        if ((work_pid > 0))
        then
            kill -9 "$work_pid"
            echo "stop $prog success, pid: $work_pid"
        else
            echo "Can find $bin_name, please check it out."
        fi
    ;;

    restart)
        $0 stop
        $0 start
    ;;

    status)
        if ((work_pid > 0))
        then
            echo "$prog is working, pid: $work_pid"
        else
            echo "$bin_name is not working..."
        fi
    ;;

    *)
        echo "Usage: $0 {start|stop|restart|status}"
        exit 11
    ;;
esac

exit 0

# vim:set ts=4 sw=4 et fdm=marker:

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


Initial commit

Initial commit

git() {
  command git rev-parse --is-inside-work-tree >/dev/null 2>&1 && git-id
  command git $@
}

git-id() {
  _git-id-get-id
  [ "$GIT_ID[1]" != "GIT_ID_NULL" ] \
    && [ "$(command git config user.name)" != "$GIT_ID[1]" ] \
    && echo "Setting local git user name to $GIT_ID[1]" \
    && $(command git config --local user.name $GIT_ID[1])
  [ "$GIT_ID[2]" != "GIT_ID_NULL" ] \
    && [ "$(command git config user.email)" != "$GIT_ID[2]" ] \
    && echo "Setting local git user email to $GIT_ID[2]" \
    && $(command git config --local user.email $GIT_ID[2])
  unset GIT_ID
}

_git-id-get-id() {
  IFS=$'\n'
  set -f
  GIT_ID=($(ruby -e "
    require 'yaml'
    conf = YAML.load_file(File.expand_path('~/.gitid.yml'))
    dir = Dir.pwd.split('/')
    id = {}
    while dir.length > 1
      if conf[File.join(dir)]
        id = conf[File.join(dir)]
        break
      end
      dir.pop
    end
    print \"#{id['name'] || 'GIT_ID_NULL'}\n#{id['email'] || 'GIT_ID_NULL'}\"
  "))
  unset IFS
  set +f
}


automatically merge pot into po files

automatically merge pot into po files

#!/usr/bin/env bash

bin/cake i18n extract --ignore-model-validation --output src\\Locale --paths src,config --overwrite --extract-core no --merge yes --no-location

msgmerge src/Locale/de_DE/default.po src/Locale/default.pot --output-file=src/Locale/de_DE/default.po
msgmerge src/Locale/en_US/default.po src/Locale/default.pot --output-file=src/Locale/en_US/default.po

error: pathspec 'devtools/update-pot-and-po-files.sh' did not match any file(s) known to git


tweaks

tweaks

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/davecheney/juju.git/'


debian/ubuntu start-up scripts

debian/ubuntu start-up scripts

#!/bin/sh

#
# IMPORTANT: To use, do the folling:
#
# 1. Change 'NAME' variable to the name of your project. E.g. "bednets_for_nigeria"
# 2. Place this file in the TOP-LEVEL of your project, right where 'manage.py' is
# 3. Link it into /etc/init.d e.g. > ln -s /usr/local/my_project/rapidsms-init.sh /etc/init.d/
# 4. Add it to the runlevels, on Ubuntu/Debian there is a nice tool to do this for you:
#    > sudo update-rc.d rapidsms-init.sh defaults
#
# NOTE: If you want to run multiple instances of RapidSMS, just put this init file in each project dir,
#       set a different NAME for each project, link it into /etc/init.d with _different_ names,
#       and add _each_ script to the runlevels.
#

### BEGIN INIT INFO
# Provides:          amatd daemon instance
# Required-Start:    $all
# Required-Stop:     $all
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts instance of amatd daemon
# Description:       starts instance of amatd daemon using start-stop-daemon
### END INIT INFO

# set -e

ME=`readlink -f $0`
WHERE_AM_I=`dirname $ME`

############### EDIT ME ##################
NAME="smsforum" # change to your project name
DAEMON=$WHERE_AM_I/manage.py
DAEMON_OPTS=""
RUN_AS=root
APP_PATH=$WHERE_AM_I
ROUTER_PID_FILE=/var/run/${NAME}_router.pid
WEBSERVER_PID_FILE=/var/run/${NAME}_webs.pid

############### END EDIT ME ##################
test -x $DAEMON || exit 0

do_start() {
    echo -n "Starting router for $NAME... "
    start-stop-daemon -d $APP_PATH -c $RUN_AS --start --background --pidfile $ROUTER_PID_FILE  --make-pidfile --exec $DAEMON -- route $DAEMON_OPTS
    echo "Router Started"
    sleep 2
    echo -n "Starting webserver for $NAME... "
    start-stop-daemon -d $APP_PATH -c $RUN_AS --start --background --pidfile $WEBSERVER_PID_FILE  --make-pidfile --exec $DAEMON -- runserver $DAEMON_OPTS
    echo "Webserver Started"
}

do_stop() {
    echo -n "Stopping webserver for $NAME... "
    start-stop-daemon --stop --pidfile $WEBSERVER_PID_FILE
    echo "Webserver Stopped"
    sleep 2
    echo -n "Stopping webserver for $NAME... "
    start-stop-daemon --stop --pidfile $ROUTER_PID_FILE
    echo "Router Stopped"
}

case "$1" in
  start)
        do_start
        ;;

  stop)
        do_stop
        ;;

  restart|force-reload)
        do_stop
        sleep 2
        do_start
        ;;

  *)
        echo "Usage: $ME {start|stop|restart|force-reload}" >&2
        exit 1
        ;;
esac

exit 0

error: pathspec 'dist/debian_ubuntu/rapidsms-init.sh' did not match any file(s) known to git


Create docker-entrypoint.sh

Create docker-entrypoint.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/yusanish/crowi.git/'


Script to install and launch Weave scope

Signed-off-by: mystique <a2c28a79fd059c0038bf659c822f1c4f689fa2d4@quantumfoam.uni.me>

#!/bin/bash
set -x
##################################################################################
##
##
## VERSION		:	0.0.1
## DATE			:	31Aug2015
## DESCRIPTION	:	Weave Scope installation script
## Ref[1]		:	https://github.com/weaveworks/scope
##################################################################################

# Set Environment variables here
SCOPE_FILE=/usr/local/bin/scope

function startScope() {
	scope launch && \
	{ printf "\n\n\t\t Started Weave Successfully!!!\n\n"; printf "\n\n\t\t Open your web browser to http://localhost:4040 to use weave scope\n\n"; } || \
	{ printf "\n\n\t Not able to start weave!!"; return 1; }
	}

# check if docker is running
docker info > /dev/null 2>&1 || { printf "\n\tDocker is not running! Ensure Docker is running before running this script\n\n"; exit; }

if [ -f $SCOPE_FILE ]; then
   printf "\n\n\t FILE : $SCOPE_FILE Exists!!, \tProceeding to launch Weave Scope"
   startScope
else
   printf "\n\n\t The file '$SCOPE_FILE' Does Not Exist. Downloading the images and starting them\n\n"
   curl -L https://github.com/weaveworks/scope/releases/download/latest_release/scope -o /usr/local/bin/scope && \
   chmod a+x /usr/local/bin/scope && \
   startScope
fi

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


added setup script for bash

added setup script for bash

#!/bin/bash
vercomp () {
    if [[ $1 == $2 ]]
    then
        echo 0
        return 0
    fi
    local IFS=.
    local i ver1=($1) ver2=($2)
    # fill empty fields in ver1 with zeros
    for ((i=${#ver1[@]}; i<${#ver2[@]}; i++))
    do
        ver1[i]=0
    done
    for ((i=0; i<${#ver1[@]}; i++))
    do
        if [[ -z ${ver2[i]} ]]
        then
            # fill empty fields in ver2 with zeros
            ver2[i]=0
        fi
        if ((10#${ver1[i]} > 10#${ver2[i]}))
        then
            echo 1
            return 1
        fi
        if ((10#${ver1[i]} < 10#${ver2[i]}))
        then
            echo 2
            return 2
        fi
    done
    echo 0
    return 0
}

retrieve_version_number() {
    input=$1
    pattern="[0-9]+(\.[0-9]+)+"
    [[ $input  =~ $pattern ]]

    result=${BASH_REMATCH[0]}
    echo $result
}
errors=0

test_package() {
    name=$1
    input=$2
    atleast=$3

    version=`retrieve_version_number "$input"`
    result=`vercomp $version $atleast`

    if [[ -z $version ]]
    then
        errors=$((errors + 1))
        echo "$name could not be found"
        return 1
    elif [[ $result == 2 ]]
    then
        errors=$((errors + 1))
        echo "Found version $version for $name, needed atleast $atleast"
        return 1
    fi

    echo "Found $name and is of correct version"
    return 0
}

errors=0

npm_version='1.3.6'
bower_version='1.4.1'
grunt_version='0.4.5'
gruntcli_version='0.1.13'
imagemagick_version='6.8.8'
karma_version="0.12.36"

test_package "npm" "`npm --version`" $npm_version
test_package "bower" "`bower --version`" $bower_version

version_input="`grunt --version | grep grunt-cli`"
test_package "grunt-cli" "$version_input" $gruntcli_version

version_input="`grunt --version | grep 'grunt '`"
test_package "grunt" "$version_input" $grunt_version
test_package "ImageMagick" "`convert --version | grep Version:`" $imagemagick_version
test_package "karma" "`karma --version`" $karma_version

echo --------------------
if [[ $errors == 0 ]]
then
    echo All dependencies found
else
    echo Not everey dependancy could be found. Exiting...
    exit 1
fi

echo Installing npm dependancies...
npm install
if [[ $? -ne 0 ]]
then
    echo Failed to install npm dependancies
    exit 1
fi

echo Installing bower dependancies...
bower install
if [[ $? -ne 0 ]]
then
    echo Failed to install bower dependancies
    exit 1
fi

echo Building application
grunt
if [[ $? -ne 0 ]]
then
    echo Failed to build applications
    exit 1
fi

echo The server can be started with:
echo "  node server.js [--production]"

echo -n "Start the server [y/n]? "
read STARTSERVER
if [[ $STARTSERVER == "y" ]]
then
    node server.js
fi

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


Add x permission to rollback.sh as well.

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/raincious/trailk.git/'


added analysis script

added analysis script

#!/bin/bash
# Compile QuadTarget (if needed) and run it in image analysis mode -- spits
# data about detected markers to stdout, is filtered a bit and then saved to
# whatever file you specify as a commandline argument.

if [ "$1" = "" ]; then
    echo "Please give /path/to/desired_output.csv
    exit 1
fi

QTFSM_DIR="/home/owain/Dropbox/Aber/MSc_Dissertation/code/QuadTargetFSM"
export QUADTARGET_CONFIG="$QTFSM_DIR/cfg/defaults.ini $QTFSM_DIR/cfg/config_images.ini"
mkdir -p $HOME/Projects/quadtargetfsm
cd $HOME/Projects/quadtargetfsm
cmake -DCMAKE_BUILD_TYPE=Release $QTFSM_DIR
ccache make -j8
./QuadTarget | sed 's/^null//g' | uniq | tee $1

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


remove sed from getAll.sh (linux/commands/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/TiagoMestre/process-monitor.git/'


Add support for building a docker container in 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/ankushagarwal/cloudsql-proxy.git/'


Core: fixed invalid function call in mail admin command (refs #5790)

And update From mail address to 'noreply'

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/it-toolbox/project-factory-core.git/'


Script for migrations

Script for migrations

#!/usr/bin/env bash

echo ">>> change directory"

cd /vagrant

echo ">>> Composer update"
composer update

echo ">>> Migrating OAuth2.0 usertables"

php artisan migrate

echo ">>> Migrating cartalyst/sentry tables"
php artisan migrate --package=cartalyst/sentry

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


Add script to set home

Add script to set home

#!/bin/sh -e

NODE=$1
CAN=can0

canmat -f $CAN nmt $NODE reset-node
sleep 1

canmat -f $CAN dict-dl $NODE 'modes of operation' 0x6

canmat -f $CAN nmt $NODE start
sleep 1

canmat -f $CAN dict-dl $NODE 'controlword' 0x6
canmat -f $CAN dict-dl $NODE 'controlword' 0x7
canmat -f $CAN dict-dl $NODE 'controlword' 0xf

canmat -f $CAN dict-dl $NODE 'controlword' 0xff

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


fixed printout of coordinator names

fixed printout of coordinator names

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/alexanderfahlke/oozie-tool.git/'


Create init.sh

Create init.sh

#!/usr/bin/env bash

docker rm -f `docker ps -aq -f name=${PROJECT_NAME}_*`

export DOCKER_IP=$(dlite ip)

set -a
source .env

# create the subdirectories for the volumes
mkdir -p ${PROJECT_VOlUME}/htdocs
mkdir -p ${PROJECT_VOlUME}/db
mkdir -p ${PROJECT_VOlUME}/elasticsearch/data
mkdir -p ${PROJECT_VOlUME}/elasticsearch/config

cp ./elasticsearch/config/elasticsearch.yml ${PROJECT_VOlUME}/elasticsearch/config/elasticsearch.yml

cat ${COMPOSE_CONFIG} | envsubst | docker-compose -f - -p "${PROJECT_NAME}" up -d

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


Use sudo during apt-get invocations.

Use sudo during apt-get invocations.

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/zatosource/zato-build.git/'


New location for bootstrap script

New location for bootstrap script

git-svn-id: 0c33e958600270102f91bf5868e396345dde476c@8487 e27351fd-9f3e-4f54-a53b-843176b1656c

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/red-hood/calendarserver.git/'


Update Oh My ZSH with other updates

Update Oh My ZSH with other updates

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


check for failure

check for failure

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/warmchang/minikube.git/'


script to upload Wikipedia Atom feed checker

#!/bin/sh

CURRENT_DIR=`pwd`
CURRENT_BASE=`basename $CURRENT_DIR`
if [ "$(basename $CURRENT_DIR)" != 'scripts' ]; then
    echo "Error: Please start this script from inside the 'scripts' directory";
    exit 1;
fi

TARGET_FILE=LanguageTool-wikipedia-2.4-SNAPSHOT.zip

cd ../..
mvn clean package -DskipTests
scp languagetool-wikipedia/target/$TARGET_FILE languagetool@languagetool.org:feed-checker/languagetool/
echo "Now log on to the server and unzip feed-checker/languagetool/$TARGET_FILE"

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


Base Linux packages

Base Linux packages

args=$@

if [[ " ${args[*]} " == *" --libs "* ]] ||
   [[ " ${args[*]} " == *" all "* ]]    ||
   [[ " ${args[*]} " == *" --php--install "* ]] ||
   [[ " ${args[*]} " == *" --apache--install "* ]]; then
  # required librearies for installing apache and php5
  sudo aptitude install -y \
   build-essential \
   autoconf \
   libreadline6-dev \
   libxml2-dev libxml2 \
   libcurl4-openssl-dev \
   libicu-dev \
   libapr1-dev libaprutil1-dev \
   libpng-dev libjpeg-dev \
   libmcrypt-dev \
   libltdl-dev \
   openssl \
   nodejs \
   npm \
   git
fi