small cleanup

small cleanup

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/jhalfmoon/yabagi-prompt.git/'


New script for FIXME/TODO reporting

New script for FIXME/TODO reporting

[Finishes #37637781]

##
##  ____    ____    _____    ____    ___     ____
## |  _ \  |  _ \  | ____|  / ___|  / _/    / ___|        Precog (R)
## | |_) | | |_) | |  _|   | |     | |  /| | |  _         Advanced Analytics Engine for NoSQL Data
## |  __/  |  _ <  | |___  | |___  |/ _| | | |_| |        Copyright (C) 2010 - 2013 SlamData, Inc.
## |_|     |_| \_\ |_____|  \____|   /__/   \____|        All Rights Reserved.
##
## This program is free software: you can redistribute it and/or modify it under the terms of the
## GNU Affero General Public License as published by the Free Software Foundation, either version
## 3 of the License, or (at your option) any later version.
##
## This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
## without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
## the GNU Affero General Public License for more details.
##
## You should have received a copy of the GNU Affero General Public License along with this
## program. If not, see <http://www.gnu.org/licenses/>.
##
##
#!/bin/bash

(echo -e "
FIXMEs
\n\n
";
 ack -i --heading --break --scala 'FIXME';
 echo -e "\n

TODOs
\n\n
";
 ack -i --heading --break --scala 'TODO(?!uble)';
 echo "
") | mutt -e "set content_type=text/html" -s "FIXME/TODO report `date '+%F'`" engineering@precog.com

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


Jemalloc update script added.

Jemalloc update script added.

#!/bin/bash
VER=$1
URL="http://www.canonware.com/download/jemalloc/jemalloc-${VER}.tar.bz2"
echo "Downloading $URL"
curl $URL > /tmp/jemalloc.tar.bz2
tar xvjf /tmp/jemalloc.tar.bz2
rm -rf jemalloc
mv jemalloc-${VER} jemalloc
echo "Use git status, add all files and commit changes."

error: pathspec 'deps/update-jemalloc.sh' did not match any file(s) known to git


Add dev-scripts/run-demo.sh

Add dev-scripts/run-demo.sh

#!/bin/sh

set -x

sensible-browser demo/calculator.html &
./dev-scripts/soh-runner.sh

error: pathspec 'dev-scripts/run-demo.sh' did not match any file(s) known to git


Move EOF to beginning of line

Move EOF to beginning of line

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/pvsone/pcf-pipelines.git/'


cleanup

cleanup

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/martinfischer/socketchat.git/'


add wrapper script for formatting the code

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/Ryezhang/h2o.git/'


Added setup file for postgres

Added setup file for postgres

#! /bin/sh
sudo -u postgres -H sh -c "createdb feeddb"
sudo -u postgres -H sh -c "createuser -P combustible"
sudo -u postgres -H sh -c "psql -c 'GRANT ALL PRIVLEGES ON DATABASE feeddb TO combustible;'"

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


Added error detection and reporting to the build 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/unchartedsoftware/PLUTO.git/'


cmake-git-builder.sh: Use params from env

Use environment variables as in parameters to the script in order to
allow optional parameters. This also improves code by being more
self-documenting in Vagrantfiles (since the environment variable name
gives you a hint of what the parameter is for).

This also adds support for not wiping the source directory of the qmake
project bein built.

WARNING: The default behavior of this script HAS CHANGED where the
source directory is now NOT removed per default. In order to remove the
source directory, please set the WIPE_SRC_DIR parameter to "yes".

Signed-off-by: Jonatan Pålsson <b877e03b4df07f69204a69532c182daf90405999@pelagicore.com>

#!/bin/bash
# vagrant-cookbook
# Copyright (C) 2015-2017 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
#
# Download gitrepo containing a cmake build system into srcdir and build
# in srcdir/build using cmakeargs to cmake.
#
# Usage: cmake-git-builder.sh
#
# Required environment variables:
# SRC_DIR: Source directory to build
# GIT_REPO: Git repository to clone
#
# Optional environment variables:
# WIPE_SRC_DIR: Set to 'yes' in order to rm -rf the \$SRC_DIR before building
# MAKE_COMMAND: Commands used to build the project. Defaults to "make && sudo make install"
# CMAKE_ARGS: Arguments to pass to cmake
# CMAKE_PATH: cmake executable path. Defaults to "cmake" (picked from $PATH)
# GIT_REVISION: Git revision to check out

if [ -z ${SRC_DIR+x} ]; then echo "SRC_DIR must be set in env"; exit; fi
if [ -z ${GIT_REPO+x} ]; then echo "GIT_REPO must be set in env"; exit; fi
if [ -z ${CMAKE_PATH+x} ]; then CMAKE_PATH="cmake"; fi
if [ -z ${CMAKE_ARGS+x} ]; then CMAKE_ARGS=""; fi
if [ -z ${MAKE_COMMAND+x} ]; then MAKE_COMMAND="make && sudo make install"; fi

BUILD_DIR=$SRC_DIR/build

echo "Building $SRC_DIR from git repo $GIT_REPO"

if [ "$WIPE_SRC_DIR" == "yes" ]; then
    rm -rf "$SRC_DIR"
fi

git clone $GIT_REPO "$SRC_DIR"
git pull

mkdir "$BUILD_DIR"
cd "$BUILD_DIR"

if  [[ "$GIT_REVISION" != "" ]] ; then
    git reset --hard $GIT_REVISION
fi

$CMAKE_PATH .. $CMAKE_ARGS

eval "$MAKE_COMMAND"

#!/bin/bash
# vagrant-cookbook
# Copyright (C) 2015 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: cmake-git-builder.sh <srcdir> <gitrepo> <cmakeargs> [revision]
#
# Download gitrepo containing a cmake build system into srcdir and build
# in srcdir/build using cmakeargs to cmake.
#

srcdir=$1
builddir=$srcdir/build
gitrepo=$2
cmakeargs=$3
rev=$4

echo "Building $srcdir from git repo $gitrepo"

rm -rf $srcdir
git clone $gitrepo $srcdir
if  [[ "${rev}" != "" ]] ; then
    cd $srcdir
    git reset --hard $rev
    cd ..
fi
mkdir $builddir
cd $builddir
cmake .. $cmakeargs

make && sudo make install


Add script to pull down and mirror the prod database

#!/bin/bash

set -e

echo "drop database open_food_web_dev" | psql -h localhost -U ofw open_food_web_test
echo "create database open_food_web_dev" | psql -h localhost -U ofw open_food_web_test
ssh ofw-prod "pg_dump -h localhost -U openfoodweb openfoodweb_production |gzip" |gunzip |psql -h localhost -U ofw open_food_web_dev

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


small fix

small fix

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/Feminist-Software-Foundation/Muzei-Bash.git/'


Add script to run program.

Add script to run program.

        - Reads configuration file.

#!/usr/bin/env bash

if [ $# -ne 1 ]; then
    echo "usage: $0 config_file"
    exit
fi

# Read configuration file
data1=`grep data1 $1 | awk -F'"' '{print $2}'`
data2=`grep data2 $1 | awk -F'"' '{print $2}'`
names1=`grep names1 $1 | awk -F'"' '{print $2}'`
names2=`grep names2 $1 | awk -F'"' '{print $2}'`
std_names=`grep std_names $1 | awk -F'"' '{print $2}'`
year1=`grep year1 $1 | awk -F'"' '{print $2}'`
year2=`grep year2 $1 | awk -F'"' '{print $2}'`
sex=`grep sex $1 | awk -F'"' '{print $2}'`
min_age1=`grep min_age1 $1 | awk -F'"' '{print $2}'`
max_age1=`grep max_age1 $1 | awk -F'"' '{print $2}'`
min_age2=`grep min_age2 $1 | awk -F'"' '{print $2}'`
max_age2=`grep max_age2 $1 | awk -F'"' '{print $2}'`

# Check if we have everything
function check_valid {
    if [ -z "$2" ]; then
        echo "run.sh:error: invalid config entry '$1'" >&2
        exit
    fi
}
check_valid data1     $data1     ; check_valid data2    $data2;
check_valid names1    $names1    ; check_valid names2   $names2;
check_valid std_names $std_names ; check_valid sex      $sex;
check_valid year1     $year1     ; check_valid year2    $year2;
check_valid min_age1  $min_age1  ; check_valid max_age1 $max_age1;
check_valid min_age2  $min_age2  ; check_valid max_age2 $max_age2;

#echo $data1; echo $data2; echo $names1; echo $names2; echo $std_names;
#echo $year1; echo $year2; echo $sex;
#echo $min_age1; echo $max_age1; echo $min_age2; echo $max_age2;

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


No longer needed

No longer 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/jrock2004/install-scripts.git/'


Remove build from being default

Remove build from being default

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/beni55/rust-design-patterns.git/'


Add -march to build-toolchain.sh to avoid compressed instructions in libgcc

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/VectorBlox/risc-v.git/'


bugfix for phpunit.

bugfix for phpunit.

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/nickfan/homestead.git/'


#421: A fun little pre-commit hook to help with CS stuff

#!/bin/sh
#
# Helpful git pre-commit hook to minimize "fix code standards" commits
#
# Installation:
#
#   cd /dir/to/kalabox
#   ln -s /dir/to/kalabox/scripts/pre-commit.sh .git/hooks/pre-commit
#
grunt test:code

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


Actually (?!) copy files to working directory

#!/bin/bash -e
if [ ! -d ${ROOTFS_DIR} ]; then
	copy_previous
fi

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


build: add few tests with GOMAXPROCS=32 to run.bash
Some class of bugs (data races, runtime bugs) can be found
only with real parallelism.
Note that GOMAXPROCS=32 is somewhat different from go test -cpu=32,
this intentionally uses GOMAXPROCS to stress program bootstrap,
testing code, garbage collections, etc.
Package selection is mostly random.

R=golang-dev, dave, r
CC=golang-dev
http://codereview.appspot.com/6346070

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/dsriram/golang.git/'


[generator] Script to create routes from mwm and osrm

#!/bin/bash

set -e -u -x

if [[ `hostname` == "Scout" ]]; then
  DATA_DIR=/media/ssd/osm/omim/data
  OSRM_DIR=~/toolchain/v2/data/planet-split
  GENERATOR_TOOL=/media/ssd/osm/omim-build-release/out/release/generator_tool
else
  DATA_DIR=~/omim/data
  OSRM_DIR=~/planet-split
  GENERATOR_TOOL=~/omim-build-release/out/release/generator_tool
fi

ls "$OSRM_DIR"/*.osrm | parallel -t -v "V=`basename -s .osrm {}`; $GENERATOR_TOOL --osrm_file_name={} --data_path=$DATA_DIR --output={/.}"

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


Script for static files server

Script for static files server

#!/bin/bash
# Config Tiny Statoc Files Server

cd ~

echo "1.- Installing Libraries"
sudo apt-get install python-dev

echo "2.- Config .bashrc file"
echo "alias tinyserver='python -m SimpleHTTPServer 8000'" >> ~/.bashrc
source ~/.bashrc

echo "Now you can tap 'tinyserver' to initialize the static server!"

echo "################"
echo "Config Complete!"
echo "################"
exit 0

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


Create .clear_cookies.sh

Create .clear_cookies.sh

#!/bin/sh
find ~/Library/Cookies/ -name "*.cookies" -type f -delete
find ~/Library/Cookies/ -name "*.binarycookies" -type f -delete
echo
echo Cookies clearing: script ran.

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


It's actually simpler without the tag

It's actually simpler without the tag

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


Added create-dataset.sh for suggest learning.

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/hiroyuki-sato/groonga.git/'


try to export env var

try to export env var

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/pariveda/sweet-skills.git/'


Create .travis-script.sh

Create .travis-script.sh

#!/bin/bash
# Builds one specific package, specified by $PACKAGE
if [ -z "${PACKAGE}" ]; then
	echo "PACKAGE is not set"
	exit 1
fi
cd ${PACKAGE}
# Openjdk make should not be used with option -j
if [ "${PACKAGE}" == "openjdk8" ]; then
	make
else
	make -j2
fi

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


Add scipt for DY with one norm regularizor

Idx_dataset="1 2 3 4 5 6"

for idx in $Idx_dataset
do
    /usr/local/MATLAB/R2012a/bin/matlab -r "cd ..; datasetId = $idx; Exp_DY_one_norm_H; exit;" &
done

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


adding apps installation script

adding apps installation script

#!/usr/bin/env bash
# ---------------------------------------------------------------------------------------
#
# Author: Dennis Coldwell (@dencold)
#

# make sure that arch is fully updated
pacman --noconfirm -Syu

# anki spaced repetition learning program
pacman --noconfirm -S anki

error: pathspec 'linux/arch-install-apps.sh' did not match any file(s) known to git


Ya no se necesita expect

Ya no se necesita expect

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/rendon/omegaup.git/'


create tmp root user for mysql

create tmp root user for mysql

#!/bin/sh

systemctl start mysqld

root_mycnf=$HOME/.my.cnf
tmp_pass=$(cat /var/log/mysqld.log | grep "temporary password" | awk '{print $11}')
cat > $root_mycnf <<EOF
[client]
user=root
password=$tmp_pass
EOF

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


Fix typo in testec2serversetup.sh

Fix typo in testec2serversetup.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/addrummond/nodeibexfarm.git/'


Now using PyCalendar trunk.

Now using PyCalendar trunk.

git-svn-id: 0c33e958600270102f91bf5868e396345dde476c@10555 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/'


Added 32rbenv-avatar.sh

Added 32rbenv-avatar.sh

#!/bin/bash

ABBREV='rbenv-avatar'
OWNER='jhsu802701'
DISTRO='debian'
SUITE='jessie'
DOCKER_IMAGE="$OWNER/32bit-$DISTRO-$SUITE-$ABBREV"
CONTAINER="container-32bit-$DISTRO-$SUITE-$ABBREV"
TGZ_FILE="32bit-$DISTRO-$SUITE-$ABBREV.tgz"

echo 'By default, your host port numbers are:'
echo '  MailCatcher: 1080'
echo '  Rails web server: 3000'
echo '  PostgreSQL: 15432'
echo
echo 'If you wish to work with multiple Docker images, you need to use a'
echo 'different offset for each one in order to avoid conflicts.'
echo
echo 'Enter the desired offset for your port numbers.'
read OFFSET

P1080=$(( 1080+OFFSET ))
P3000=$(( 3000+OFFSET ))
P5432=$(( 15432+OFFSET ))

sh setup.sh $ABBREV $DOCKER_IMAGE $CONTAINER $TGZ_FILE $P1080 '1080' $P3000 '3000' $P5432 '5432'

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


Add script to setup JupyterHub TODO: finish and test

#! /bin/bash

# Update package list
sudo apt-get update

# Upgrade installed packages
sudo apt-get upgrade

# Install dependencies (General)
sudo apt-get -y install git gfortran libatlas-dev libatlas-base-dev libfreetype6-dev

# Install dependencies (Python 2)
sudo apt-get -y install python-pip
sudo pip install -U pip
sudo apt-get -y install python-numpy python-scipy python-matplotlib
sudo pip install pyrho[full]

# Install dependencies (Python 3)
sudo apt-get -y install python3-pip
sudo pip3 install -U pip
sudo apt-get -y install python3-numpy python3-scipy python3-matplotlib
sudo pip3 install pyrho[full]

sudo apt-get autoremove

# Jupyter Hub (Requires Python >= 3.3)
# https://github.com/jupyter/jupyterhub
sudo apt-get -y install npm nodejs-legacy
sudo npm install -g configurable-http-proxy
sudo pip3 install jupyterhub
# To run notebook servers locally
pip3 install --upgrade notebook

# Install Python Kernels
sudo ipython2 kernelspec install-self
# This should be jupyter kernelspec

# Changes to jupyterhub_config.py
jupyterhub --generate-config
# c.Spawner.env_keep = ['PATH', 'PYTHONPATH', 'CONDA_ROOT', 'CONDA_DEFAULT_ENV', 'VIRTUAL_ENV', 'LANG', 'LC_ALL', 'NRN_NMODL_PATH']
# https://github.com/jupyterhub/jupyterhub/issues/330
echo "c.Spawner.env_keep.append('NRN_NMODL_PATH')" >> jupyterhub_config.py
echo "c.Spawner.notebook_dir = '~/notebooks'" >> jupyterhub_config.py

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


add commands

add commands

#!/bin/bash
./subdrift.forward.sh
sleep 0.8
./subdrift.forward.sh
sleep 0.5
./subdrift.left.sh
sleep 1
./subdrift.stop.sh

error: pathspec 'shell/demo.drift.sh' did not match any file(s) known to git


diagnostics: add omz_bindkey_dump

diagnostics: add omz_bindkey_dump

# omz_bindkey_dump()
#
# Dumps the current bindkey state, including mappings to terminal keys using
# terminfo.
#
# Output is displayed as a human-readable table which includes:
#  - The character sequence that is bound
#  - The terminal capability names matching that sequence for the current $TERM
#  - The command this character sequence is bound to
#
# As a hack, you may set $TERM before running this to see what the capability map
# looks like in other terminals. This is not guaranteed to work in all situations.
#
#    TERM=rxvt-unicode omz_bindkey_dump
function omz_bindkey_dump() {

  # Display the active keymap
  bindkey -l -L main

  local header_format="%-8s   %-20s   %-20s";
  local table_format="%8s   %-20s   %-20s";

  printf "$header_format\n" "Key"       "Capability"      ""
  printf "$header_format\n" "Sequence"  "($TERM)"         "Command"

  # This is an ugly hack because zsh doesn't have real array references
  local code="$(bindkey | sed -e 's/\(.*\)/_omz_bindkey_dump_step \1/')"
  eval $code
}

function _omz_bindkey_dump_step() {
  local is_range=0
  if [[ $1 == "-R" ]]; then
    is_range=1
    shift
  fi

  local keys="$1"
  local name="$2"
  # Replace bindkey escapes with echo-able escapes
  local keys2=${keys:s/^[/\\e/}
  local literal_keys="$(echo -ne $keys2)"
  #printf "Literal keys: %s - %s\n" "$(tiquote $literal_keys)" "$literal_keys"

  # Terminal capabilities bound to this thing
  # This is not a full list, unfortunately, because custom capabilities defined
  # in $terminfo are not exposed in their list of keys.
  local -a caps
  local cap

  if [[ $is_range == 0 ]]; then
    for cap ( ${(k)terminfo} ); do
      if [[ "$terminfo[$cap]" == "$literal_keys" ]]; then
        caps+=$cap
      fi
    done
  fi
  caps_str=${(j:,:)caps}

  printf "$table_format\n" "$keys" "$caps_str" "$name"
}

error: pathspec 'diagnostics-extras.zsh' did not match any file(s) known to git


Python3.6.1 and pip

Python3.6.1 and pip

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/otlet/linux_command_lib.git/'


scripts/dist: Basitleştir

scripts/dist: Basitleştir

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/roktas/cezmi.git/'


Checking dependencies

Checking dependencies

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/'


updata

updata

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/JonnyCE/project-platform.git/'


Trying to debug "unreachable" error

Trying to debug "unreachable" error

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/swiftstack/runway.git/'


add nvm install script

add nvm install script

#!/bin/bash

# adopted from https://github.com/songchenwen/dotfiles
# great thanks to the original author!

# SCRIPTDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd -P )

brew install nvm
if test ! -f "$HOME/.zsh.after/nvm.zsh"; then
  touch "$HOME/.zsh.after/nvm.zsh"
  chmod +x "$HOME/.zsh.after/nvm.zsh"
  echo "export NVM_DIR=~/.nvm" >> "$HOME/.zsh.after/nvm.zsh"
  echo "source $(brew --prefix nvm)/nvm.sh" >> "$HOME/.zsh.after/nvm.zsh"
fi

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


get all data

get all data

#!/bin/sh

# Same as the reads used in Heng Li's paper "Toward better
# understanding of artifacts in variant calling from high-coverage
# samples"

for RUN in ERR194146 ERR194147 ; do
    if [ ! -f "${RUN}.fastq.gz" ] ; then
	wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR194/${RUN}/${RUN}.fastq.gz
    fi
    if [ ! -f "${RUN}_1.fastq.gz" ] ; then
	wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR194/${RUN}/${RUN}_1.fastq.gz
    fi
    if [ ! -f "${RUN}_2.fastq.gz" ] ; then
	wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR194/${RUN}/${RUN}_2.fastq.gz
    fi
done

for samp in 36 37 38 39 40 41 ; do
    if [ ! -f "SRR6426${samp}_1.fastq.gz" ] ; then
	wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR642/SRR6426${samp}/SRR6426${samp}_1.fastq.gz
    fi
    if [ ! -f "SRR6426${samp}_2.fastq.gz" ] ; then
	wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR642/SRR6426${samp}/SRR6426${samp}_2.fastq.gz
    fi
done

error: pathspec 'experiments/platinum/get.sh' did not match any file(s) known to git


Create script to collect log data.

Create script to collect log data.

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/'


Agrego script de migracion

Agrego script de migracion

Script de migracion de andino 1.0 a 2.0
refs:#39

#!/usr/bin/env bash

set -e;

old_andino="app-ckan"
old_db="pg-ckan"
install_dir="/etc/portal"
database_backup="backup.gz"
app_backup="backup.tar.gz"

usage() {
    echo "Usage: `basename $0`" >&2
    echo "Se requiere las siguientes variables de entorno:" >&2
    echo "EMAIL, HOST, DB_USER, DB_PASS, STORE_USER, STORE_PASS"

}

if [ -z "$EMAIL" ] || [ -z "$HOST" ] || [ -z "$DB_USER" ] || [ -z "$DB_PASS" ] || [ -z "$STORE_USER" ] || [ -z "$STORE_PASS" ]; then
    echo "Falta una variable de entorno."
    usage
    exit 1;
fi

function backup_database {
    today=`date +%Y-%m-%d.%H:%M:%S`
    container=$old_db
    backupdir=$(mktemp -d)
    backupfile="$backupdir/$database_backup"
    echo "Directorio temporal: $backupdir"
    docker exec $container pg_dumpall -c -U postgres | gzip > "$backupfile"
    echo "Copiando a $PWD"
    cp "$backupfile" $PWD
}

function backup_app {
    container=$old_andino
    backupdir=$(mktemp -d)
    echo "Directorio temporal: $backupdir"
    today=`date +%Y-%m-%d.%H:%M:%S`
    appbackupdir="$backupdir/application/"
    mkdir $appbackupdir

    docker inspect --format '{{json .Mounts}}' $container  | jq -r '.[]|[.Name, .Source, .Destination] | @tsv' |
    while IFS=$'\t' read -r name source destination; do

        if ls $source/* 1> /dev/null 2>&1; then
            echo "Guardando: $name."
            echo "Fuente: $source"
            echo "Destino: $destination"
            dest="$appbackupdir$name"
            mkdir -p $dest
            echo "$destination" > "$dest/destination.txt"

            tar -C "$source" -zcvf "$dest/backup_$today.tar.gz" $(ls $source)
        else
            echo "Ningun archivo en el directorio $source"
        fi
    done

    tar -C "$appbackupdir../" -zcvf $app_backup "application/"
}

function install_andino {

    wget https://raw.github.com/datosgobar/portal-base/master/deploy/install.py
    python ./install.py --error_email "$EMAIL" --site_host="$HOST" \
        --database_user="$DB_USER" --database_password="$DB_PASS" \
        --datastore_user="$STORE_USER" --datastore_password="$STORE_PASS"
}

function restore_files {
    container="andino"
    containers=$(docker ps -q)
    docker stop $containers

    restoredir=$(mktemp -d)
    echo "Directorio temporal: $restoredir"
    tar zxvf $app_backup -C $restoredir

    docker inspect --format '{{json .Mounts}}' $container  | jq -r '.[]|[.Name, .Source, .Destination] | @tsv' |
    while IFS=$'\t' read -r name source destination; do
        for directory in $restoredir/application/*; do
            dest=$(cat "$directory/destination.txt")
            echo "Dest: dest"
            echo "Destination: $destination"
            if [ "$dest" == "$destination" ]; then
                tar zxvf "$directory/$(ls "$directory" | grep backup)" -C "$source"
            fi
        done
    done

    docker restart $containers
}

function restore_db {
    container="andino-db"
    containers=$(docker ps -q)
    docker stop $containers
    docker restart $container
    sleep 10;

    restoredir=$(mktemp -d);
    echo "Directorio temporal: $restoredir"

    restorefile="$restoredir/dump.sql";

    gzip -dkc < $database_backup > "$restorefile";
    echo "Borrando base de datos actual."
    docker exec $container psql -U postgres -c "DROP DATABASE IF EXISTS ckan;"
    docker exec $container psql -U postgres -c "DROP DATABASE IF EXISTS datastore_default;"
    echo "Restaurando la base de datos: $restorefile"
    cat "$restorefile" | docker exec -i $container psql -U postgres

    docker exec  $container psql -U postgres -c "ALTER USER $DB_USER WITH PASSWORD '$DB_PASS';"
    docker exec  $container psql -U postgres -c "ALTER USER $STORE_USER WITH PASSWORD '$STORE_PASS';"

    docker restart $containers
}

function rebuild_search {
    docker exec andino /etc/ckan_init.d/run_rebuild_search.sh
}

mkdir -p $install_dir

cd $install_dir

backup_database;
backup_app;
docker stop $(docker ps -q)

install_andino;

restore_files;
restore_db;
sleep 5;
rebuild_search;

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


disabled interactive start

disabled interactive start

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/lazydays79/homeserver.git/'


Add script that builds the paper

Add script that builds the paper

#!/bin/sh

set -e

lualatex hctr2.tex
biber hctr2
lualatex hctr2.tex
lualatex hctr2.tex

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


Add git push alias

Add git push alias

#!/usr/bin/env bash

# Easier navigation: .., ..., ...., ....., ~ and -
alias ..="cd .."
alias 2..="cd ../.."
alias 3..="cd ../../.."
alias 4..="cd ../../../.."
alias -- -="cd -"

# Quick navigation
alias p='cd ~/Projects && ll'
alias d='cd ~/Desktop'

# Shortcuts
alias dl="cd ~/Downloads"
alias dt="cd ~/Desktop"
alias p='cd ~/Projects && ll'
alias g="git"
alias h="history"

# Often use commands
alias v=$EDITOR
alias g=git

function o { open ${@:-'.'} }
function a { atom ${@:-'.'} }

# Show and hide hidden files in Finder
alias show='defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder'
alias hide='defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder'

# Listing files
alias ls='ls -FG' # List with slashes (for directories) and colors
alias l='ls'
alias lsa='ls -A' # List also hidden files except . and ..
alias la='lsa'
alias ll='ls -lh' # List with human readable form
alias lla='ll -A' # List also hidden files except . and .. with human readable form

# Create a directory and enter it
function mkd { mkdir -p $1 && cd $_ }

# Bundler aliases
alias be='bundle exec'
alias bi='bundle install'
alias bo='bundle outdated'
alias bu='bundle update'

# Middleman-related aliases
alias mb='bundle exec middleman build'
alias mid='bundle exec middleman deploy'
alias ms='bundle exec middleman server'

# IP addresses
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
alias localip="ifconfig -a inet | awk '/inet/ {print $2}'"

alias reload!='source ~/.zshrc'

alias path='echo -e ${PATH//:/\\n} | nl'

# git aliases
alias st="git status -s"
alias gp="git push"


- add script to generate lots of failing (random)configs   rm -f STOP ; ARCH=i386 nohup extra/scripts/randconfig.sh &   if you want to stop it, touch STOP

#!/bin/sh

test "x$ARCH" = "x" && ARCH=`uname -m`
KCONFIG_ALLCONFIG=.config.allconfig
(echo TARGET_$ARCH=y
 echo '# UCLIBC_PREGENERATED_LOCALE_DATA is not set'
 echo '# UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA is not set'
) > $KCONFIG_ALLCONFIG
export KCONFIG_ALLCONFIG

i=0
while test ! -f STOP
do
  make $* randconfig > /dev/null
  make $* silentoldconfig > /dev/null
  if (make $*) 2>&1 >& mk.log
  then
    :
  else
    i=`expr $i + 1`
    num=`printf "%.5d" $i`
    mv .config FAILED.$num.config
    mv mk.log FAILED.$num.log
  fi
  make distclean > /dev/null || true
done

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


add script to build images

add script to build images

build_docker_image() {
  local directory="$1"

  echo "$directory"

  pushd $directory
  ./build.sh || return 1
  docker build . -t "cvmfs/$(basename $directory)"
  popd
}
export -f build_docker_image

parallel="1"

while getopts "p:" opt; do
  case $opt in
    p)
      parallel={$OPTARG}
      ;;
  esac
done

ls images/*/Dockerfile | xargs -n 1 dirname | xargs -n 1 -P "$parallel" -I {} bash -c 'build_docker_image "{}"'

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


sys report : ignore errors mode always printed

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/bitrise-io/osx-box-bootstrap.git/'


required packages

required packages

pip install google-cloud-dataflow timezonefinder pytz python-dateutil

error: pathspec '03_sqlstudio/simulate/install_packages.sh' did not match any file(s) known to git


Adjusting the mongodb keyserv for firewall issues

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/Sgoettschkes/learning.git/'


Add vim to provision.sh

Add vim to provision.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/guttmann/vagrant-php-dev.git/'


Script di Jiahao per aggiornare tutto il database

#!/bin/bash
#
# cerca ed esegue i file indicati dall'opzione -name a partire dal path indicato come primo parametro
#
find ./ -name create.sql -exec /Users/dongwenren/PostgreSQL/pg96/bin/psql -h scuola247 -U postgres -d scuola247 -f {} ';'

error: pathspec 'schemas/unit_tests_public/functions/psql-recursive.sh' did not match any file(s) known to git


Restore push-prod script for regular site.

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/nickofbh/veloce.git/'


add jsg_markdown_test.sh

add jsg_markdown_test.sh

some confusion about how `run` works with pipes

#!/usr/bin/env test/bats/bin/bats

@test "markdown" {
  run bash -c 'echo "#header" | bin/jsg_markdown'
  [ "$status" -eq 0 ]
  echo "$output" | grep "<h1>"
}

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


a script to compile leveldb with the -fPIC flag

#!/bin/sh

(cd leveldb-read-only; make OPT='-fPIC -O2 -DNDEBUG')

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


Add Python venv setup

Add Python venv setup

export WORKON_HOME="$HOME/.virtualenvs"
export VIRTUALENVWRAPPER_PYTHON='/usr/local/bin/python3'
export PROJECT_HOME="$HOME/code"
source /usr/local/bin/virtualenvwrapper.sh

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


test-lib.sh: fix umount calls

test-lib.sh: fix umount calls

As test directories contain a space, we need to
properly quote paths, otherwise we get errors like:

```
umount: /home/christian/gocode/src/github.com/ipfs/go-ipfs/test/sharness/trash is not mounted (according to mtab)
umount: /home/christian/gocode/src/github.com/ipfs/go-ipfs/test/sharness/trash is not mounted (according to mtab)
```

instead of:

```
umount: /home/christian/gocode/src/github.com/ipfs/go-ipfs/test/sharness/trash directory.t0030-mount.sh/ipfs is not mounted (according to mtab)
umount: /home/christian/gocode/src/github.com/ipfs/go-ipfs/test/sharness/trash directory.t0030-mount.sh/ipns is not mounted (according to mtab)
```

License: MIT
Signed-off-by: Christian Couder <ddbaab5867ed34fd53535b58c9cdd59abd2e2aff@tuxfamily.org>

# Test framework for go-ipfs
#
# Copyright (c) 2014 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.
#
# We are using sharness (https://github.com/mlafeldt/sharness)
# which was extracted from the Git test framework.

# use the ipfs tool to test against

# add current directory to path, for ipfs tool.
PATH=$(pwd)/bin:${PATH}

# set sharness verbosity. we set the env var directly as
# it's too late to pass in --verbose, and --verbose is harder
# to pass through in some cases.
test "$TEST_VERBOSE" = 1 && verbose=t

# assert the `ipfs` we're using is the right one.
if test `which ipfs` != $(pwd)/bin/ipfs; then
	echo >&2 "Cannot find the tests' local ipfs tool."
	echo >&2 "Please check test and ipfs tool installation."
	exit 1
fi

# source the common hashes first.
. lib/test-lib-hashes.sh

SHARNESS_LIB="lib/sharness/sharness.sh"

. "$SHARNESS_LIB" || {
	echo >&2 "Cannot source: $SHARNESS_LIB"
	echo >&2 "Please check Sharness installation."
	exit 1
}

# Please put go-ipfs specific shell functions below

# grab + output options
test "$TEST_NO_FUSE" != 1 && test_set_prereq FUSE
test "$TEST_EXPENSIVE" = 1 && test_set_prereq EXPENSIVE

if test "$TEST_VERBOSE" = 1; then
	echo '# TEST_VERBOSE='"$TEST_VERBOSE"
	echo '# TEST_NO_FUSE='"$TEST_NO_FUSE"
	echo '# TEST_EXPENSIVE='"$TEST_EXPENSIVE"
fi

# source our generic test lib
. ../../ipfs-test-lib.sh

test_cmp_repeat_10_sec() {
	for i in 1 2 3 4 5 6 7 8 9 10
	do
		test_cmp "$1" "$2" >/dev/null && return
		sleep 1
	done
	test_cmp "$1" "$2"
}

test_run_repeat_60_sec() {
	for i in 1 2 3 4 5 6
	do
		for i in 1 2 3 4 5 6 7 8 9 10
		do
			(test_eval_ "$1") && return
			sleep 1
		done
	done
	return 1 # failed
}

test_wait_output_n_lines_60_sec() {
	for i in 1 2 3 4 5 6
	do
		for i in 1 2 3 4 5 6 7 8 9 10
		do
			test $(cat "$1" | wc -l | tr -d " ") -ge $2 && return
			sleep 1
		done
	done
	actual=$(cat "$1" | wc -l | tr -d " ")
	test_fsh "expected $2 lines of output. got $actual"
}

test_wait_open_tcp_port_10_sec() {
	for i in 1 2 3 4 5 6 7 8 9 10; do
		# this is not a perfect check, but it's portable.
		# cant count on ss. not installed everywhere.
		# cant count on netstat using : or . as port delim. differ across platforms.
		echo $(netstat -aln | egrep "^tcp.*LISTEN" | egrep "[.:]$1" | wc -l) -gt 0
		if [ $(netstat -aln | egrep "^tcp.*LISTEN" | egrep "[.:]$1" | wc -l) -gt 0 ]; then
			return 0
		fi
		sleep 1
	done
	return 1
}

# test_config_set helps us make sure _we really did set_ a config value.
# it sets it and then tests it. This became elaborate because ipfs config
# was setting really weird things and am not sure why.
test_config_set() {

	# grab flags (like -bool in "ipfs config -bool")
	test_cfg_flags="" # unset in case.
	test "$#" = 3 && { test_cfg_flags=$1; shift; }

	test_cfg_key=$1
	test_cfg_val=$2

	# when verbose, tell the user what config values are being set
	test_cfg_cmd="ipfs config $test_cfg_flags \"$test_cfg_key\" \"$test_cfg_val\""
	test "$TEST_VERBOSE" = 1 && echo "$test_cfg_cmd"

	# ok try setting the config key/val pair.
	ipfs config $test_cfg_flags "$test_cfg_key" "$test_cfg_val"
	echo "$test_cfg_val" >cfg_set_expected
	ipfs config "$test_cfg_key" >cfg_set_actual
	test_cmp cfg_set_expected cfg_set_actual
}

test_init_ipfs() {

	# we have a problem where initializing daemons with the same api port
	# often fails-- it hangs indefinitely. The proper solution is to make
	# ipfs pick an unused port for the api on startup, and then use that.
	# Unfortunately, ipfs doesnt yet know how to do this-- the api port
	# must be specified. Until ipfs learns how to do this, we must use
	# specific port numbers, which may still fail but less frequently
	# if we at least use different ones.

	# Using RANDOM like this is clearly wrong-- it samples with replacement
	# and it doesnt even check the port is unused. this is a trivial stop gap
	# until the proper solution is implemented.
	RANDOM=$$
	PORT_API=$((RANDOM % 3000 + 5100))
	ADDR_API="/ip4/127.0.0.1/tcp/$PORT_API"

	PORT_GWAY=$((RANDOM % 3000 + 8100))
	ADDR_GWAY="/ip4/127.0.0.1/tcp/$PORT_GWAY"

	# we set the Addresses.API config variable.
	# the cli client knows to use it, so only need to set.
	# todo: in the future, use env?

	test_expect_success "ipfs init succeeds" '
		export IPFS_PATH="$(pwd)/.ipfs" &&
		ipfs init -b=1024 > /dev/null
	'

	test_expect_success "prepare config -- mounting and bootstrap rm" '
		mkdir mountdir ipfs ipns &&
		test_config_set Mounts.IPFS "$(pwd)/ipfs" &&
		test_config_set Mounts.IPNS "$(pwd)/ipns" &&
		test_config_set Addresses.API "$ADDR_API" &&
		test_config_set Addresses.Gateway "$ADDR_GWAY" &&
		ipfs bootstrap rm --all ||
		test_fsh cat "\"$IPFS_PATH/config\""
	'

}

test_config_ipfs_gateway_readonly() {
	ADDR_GWAY=$1
	test_expect_success "prepare config -- gateway address" '
		test "$ADDR_GWAY" != "" &&
		test_config_set "Addresses.Gateway" "$ADDR_GWAY"
	'

	# tell the user what's going on if they messed up the call.
	if test "$#" = 0; then
		echo "#			Error: must call with an address, for example:"
		echo '#			test_config_ipfs_gateway_readonly "/ip4/0.0.0.0/tcp/5002"'
		echo '#'
	fi
}

test_config_ipfs_gateway_writable() {

	test_config_ipfs_gateway_readonly $1

	test_expect_success "prepare config -- gateway writable" '
		test_config_set -bool Gateway.Writable true ||
		test_fsh cat "\"$IPFS_PATH/config\""
	'
}

test_launch_ipfs_daemon() {

	test_expect_success "'ipfs daemon' succeeds" '
		ipfs daemon >actual_daemon 2>daemon_err &
	'

	# we say the daemon is ready when the API server is ready.
	test_expect_success "'ipfs daemon' is ready" '
		IPFS_PID=$! &&
		pollEndpoint -ep=/version -host=$ADDR_API -v -tout=1s -tries=60 2>poll_apierr > poll_apiout ||
		test_fsh cat actual_daemon || test_fsh cat daemon_err || test_fsh cat poll_apierr || test_fsh cat poll_apiout
	'

	if test "$ADDR_GWAY" != ""; then
		test_expect_success "'ipfs daemon' output includes Gateway address" '
			pollEndpoint -ep=/version -host=$ADDR_GWAY -v -tout=1s -tries=60 2>poll_gwerr > poll_gwout ||
			test_fsh cat daemon_err || test_fsh cat poll_gwerr || test_fsh cat poll_gwout
		'
	fi
}

test_mount_ipfs() {

	# make sure stuff is unmounted first.
	test_expect_success FUSE "'ipfs mount' succeeds" '
		umount "$(pwd)/ipfs" || true &&
		umount "$(pwd)/ipns" || true &&
		ipfs mount >actual
	'

	test_expect_success FUSE "'ipfs mount' output looks good" '
		echo "IPFS mounted at: $(pwd)/ipfs" >expected &&
		echo "IPNS mounted at: $(pwd)/ipns" >>expected &&
		test_cmp expected actual
	'

}

test_launch_ipfs_daemon_and_mount() {

	test_init_ipfs
	test_launch_ipfs_daemon
	test_mount_ipfs

}

test_kill_repeat_10_sec() {
	# try to shut down once + wait for graceful exit
	kill $1
	for i in 1 2 3 4 5 6 7 8 9 10
	do
		sleep 1
		! kill -0 $1 2>/dev/null && return
	done

	# if not, try once more, which will skip graceful exit
	kill $1
	sleep 1
	! kill -0 $1 2>/dev/null && return

	# ok, no hope. kill it to prevent it messing with other tests
	kill -9 $1 2>/dev/null
	return 1
}

test_kill_ipfs_daemon() {

	test_expect_success "'ipfs daemon' is still running" '
		kill -0 $IPFS_PID
	'

	test_expect_success "'ipfs daemon' can be killed" '
		test_kill_repeat_10_sec $IPFS_PID
	'
}

test_curl_resp_http_code() {
	curl -I "$1" >curl_output || {
		echo "curl error with url: '$1'"
		echo "curl output was:"
		cat curl_output
		return 1
	}
	shift &&
	RESP=$(head -1 curl_output) &&
	while test "$#" -gt 0
	do
		expr "$RESP" : "$1" >/dev/null && return
		shift
	done
	echo "curl response didn't match!"
	echo "curl response was: '$RESP'"
	echo "curl output was:"
	cat curl_output
	return 1
}

test_must_be_empty() {
	if test -s "$1"
	then
		echo "'$1' is not empty, it contains:"
		cat "$1"
		return 1
	fi
}

test_should_contain() {
	test "$#" = 2 || error "bug in the test script: not 2 parameters to test_should_contain"
	if ! grep -q "$1" "$2"
	then
		echo "'$2' does not contain '$1', it contains:"
		cat "$2"
		return 1
	fi
}

test_str_contains() {
	find=$1
	shift
	echo "$@" | grep "$find" >/dev/null
}

# Test framework for go-ipfs
#
# Copyright (c) 2014 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.
#
# We are using sharness (https://github.com/mlafeldt/sharness)
# which was extracted from the Git test framework.

# use the ipfs tool to test against

# add current directory to path, for ipfs tool.
PATH=$(pwd)/bin:${PATH}

# set sharness verbosity. we set the env var directly as
# it's too late to pass in --verbose, and --verbose is harder
# to pass through in some cases.
test "$TEST_VERBOSE" = 1 && verbose=t

# assert the `ipfs` we're using is the right one.
if test `which ipfs` != $(pwd)/bin/ipfs; then
	echo >&2 "Cannot find the tests' local ipfs tool."
	echo >&2 "Please check test and ipfs tool installation."
	exit 1
fi

# source the common hashes first.
. lib/test-lib-hashes.sh

SHARNESS_LIB="lib/sharness/sharness.sh"

. "$SHARNESS_LIB" || {
	echo >&2 "Cannot source: $SHARNESS_LIB"
	echo >&2 "Please check Sharness installation."
	exit 1
}

# Please put go-ipfs specific shell functions below

# grab + output options
test "$TEST_NO_FUSE" != 1 && test_set_prereq FUSE
test "$TEST_EXPENSIVE" = 1 && test_set_prereq EXPENSIVE

if test "$TEST_VERBOSE" = 1; then
	echo '# TEST_VERBOSE='"$TEST_VERBOSE"
	echo '# TEST_NO_FUSE='"$TEST_NO_FUSE"
	echo '# TEST_EXPENSIVE='"$TEST_EXPENSIVE"
fi

# source our generic test lib
. ../../ipfs-test-lib.sh

test_cmp_repeat_10_sec() {
	for i in 1 2 3 4 5 6 7 8 9 10
	do
		test_cmp "$1" "$2" >/dev/null && return
		sleep 1
	done
	test_cmp "$1" "$2"
}

test_run_repeat_60_sec() {
	for i in 1 2 3 4 5 6
	do
		for i in 1 2 3 4 5 6 7 8 9 10
		do
			(test_eval_ "$1") && return
			sleep 1
		done
	done
	return 1 # failed
}

test_wait_output_n_lines_60_sec() {
	for i in 1 2 3 4 5 6
	do
		for i in 1 2 3 4 5 6 7 8 9 10
		do
			test $(cat "$1" | wc -l | tr -d " ") -ge $2 && return
			sleep 1
		done
	done
	actual=$(cat "$1" | wc -l | tr -d " ")
	test_fsh "expected $2 lines of output. got $actual"
}

test_wait_open_tcp_port_10_sec() {
	for i in 1 2 3 4 5 6 7 8 9 10; do
		# this is not a perfect check, but it's portable.
		# cant count on ss. not installed everywhere.
		# cant count on netstat using : or . as port delim. differ across platforms.
		echo $(netstat -aln | egrep "^tcp.*LISTEN" | egrep "[.:]$1" | wc -l) -gt 0
		if [ $(netstat -aln | egrep "^tcp.*LISTEN" | egrep "[.:]$1" | wc -l) -gt 0 ]; then
			return 0
		fi
		sleep 1
	done
	return 1
}

# test_config_set helps us make sure _we really did set_ a config value.
# it sets it and then tests it. This became elaborate because ipfs config
# was setting really weird things and am not sure why.
test_config_set() {

	# grab flags (like -bool in "ipfs config -bool")
	test_cfg_flags="" # unset in case.
	test "$#" = 3 && { test_cfg_flags=$1; shift; }

	test_cfg_key=$1
	test_cfg_val=$2

	# when verbose, tell the user what config values are being set
	test_cfg_cmd="ipfs config $test_cfg_flags \"$test_cfg_key\" \"$test_cfg_val\""
	test "$TEST_VERBOSE" = 1 && echo "$test_cfg_cmd"

	# ok try setting the config key/val pair.
	ipfs config $test_cfg_flags "$test_cfg_key" "$test_cfg_val"
	echo "$test_cfg_val" >cfg_set_expected
	ipfs config "$test_cfg_key" >cfg_set_actual
	test_cmp cfg_set_expected cfg_set_actual
}

test_init_ipfs() {

	# we have a problem where initializing daemons with the same api port
	# often fails-- it hangs indefinitely. The proper solution is to make
	# ipfs pick an unused port for the api on startup, and then use that.
	# Unfortunately, ipfs doesnt yet know how to do this-- the api port
	# must be specified. Until ipfs learns how to do this, we must use
	# specific port numbers, which may still fail but less frequently
	# if we at least use different ones.

	# Using RANDOM like this is clearly wrong-- it samples with replacement
	# and it doesnt even check the port is unused. this is a trivial stop gap
	# until the proper solution is implemented.
	RANDOM=$$
	PORT_API=$((RANDOM % 3000 + 5100))
	ADDR_API="/ip4/127.0.0.1/tcp/$PORT_API"

	PORT_GWAY=$((RANDOM % 3000 + 8100))
	ADDR_GWAY="/ip4/127.0.0.1/tcp/$PORT_GWAY"

	# we set the Addresses.API config variable.
	# the cli client knows to use it, so only need to set.
	# todo: in the future, use env?

	test_expect_success "ipfs init succeeds" '
		export IPFS_PATH="$(pwd)/.ipfs" &&
		ipfs init -b=1024 > /dev/null
	'

	test_expect_success "prepare config -- mounting and bootstrap rm" '
		mkdir mountdir ipfs ipns &&
		test_config_set Mounts.IPFS "$(pwd)/ipfs" &&
		test_config_set Mounts.IPNS "$(pwd)/ipns" &&
		test_config_set Addresses.API "$ADDR_API" &&
		test_config_set Addresses.Gateway "$ADDR_GWAY" &&
		ipfs bootstrap rm --all ||
		test_fsh cat "\"$IPFS_PATH/config\""
	'

}

test_config_ipfs_gateway_readonly() {
	ADDR_GWAY=$1
	test_expect_success "prepare config -- gateway address" '
		test "$ADDR_GWAY" != "" &&
		test_config_set "Addresses.Gateway" "$ADDR_GWAY"
	'

	# tell the user what's going on if they messed up the call.
	if test "$#" = 0; then
		echo "#			Error: must call with an address, for example:"
		echo '#			test_config_ipfs_gateway_readonly "/ip4/0.0.0.0/tcp/5002"'
		echo '#'
	fi
}

test_config_ipfs_gateway_writable() {

	test_config_ipfs_gateway_readonly $1

	test_expect_success "prepare config -- gateway writable" '
		test_config_set -bool Gateway.Writable true ||
		test_fsh cat "\"$IPFS_PATH/config\""
	'
}

test_launch_ipfs_daemon() {

	test_expect_success "'ipfs daemon' succeeds" '
		ipfs daemon >actual_daemon 2>daemon_err &
	'

	# we say the daemon is ready when the API server is ready.
	test_expect_success "'ipfs daemon' is ready" '
		IPFS_PID=$! &&
		pollEndpoint -ep=/version -host=$ADDR_API -v -tout=1s -tries=60 2>poll_apierr > poll_apiout ||
		test_fsh cat actual_daemon || test_fsh cat daemon_err || test_fsh cat poll_apierr || test_fsh cat poll_apiout
	'

	if test "$ADDR_GWAY" != ""; then
		test_expect_success "'ipfs daemon' output includes Gateway address" '
			pollEndpoint -ep=/version -host=$ADDR_GWAY -v -tout=1s -tries=60 2>poll_gwerr > poll_gwout ||
			test_fsh cat daemon_err || test_fsh cat poll_gwerr || test_fsh cat poll_gwout
		'
	fi
}

test_mount_ipfs() {

	# make sure stuff is unmounted first.
	test_expect_success FUSE "'ipfs mount' succeeds" '
		umount $(pwd)/ipfs || true &&
		umount $(pwd)/ipns || true &&
		ipfs mount >actual
	'

	test_expect_success FUSE "'ipfs mount' output looks good" '
		echo "IPFS mounted at: $(pwd)/ipfs" >expected &&
		echo "IPNS mounted at: $(pwd)/ipns" >>expected &&
		test_cmp expected actual
	'

}

test_launch_ipfs_daemon_and_mount() {

	test_init_ipfs
	test_launch_ipfs_daemon
	test_mount_ipfs

}

test_kill_repeat_10_sec() {
	# try to shut down once + wait for graceful exit
	kill $1
	for i in 1 2 3 4 5 6 7 8 9 10
	do
		sleep 1
		! kill -0 $1 2>/dev/null && return
	done

	# if not, try once more, which will skip graceful exit
	kill $1
	sleep 1
	! kill -0 $1 2>/dev/null && return

	# ok, no hope. kill it to prevent it messing with other tests
	kill -9 $1 2>/dev/null
	return 1
}

test_kill_ipfs_daemon() {

	test_expect_success "'ipfs daemon' is still running" '
		kill -0 $IPFS_PID
	'

	test_expect_success "'ipfs daemon' can be killed" '
		test_kill_repeat_10_sec $IPFS_PID
	'
}

test_curl_resp_http_code() {
	curl -I "$1" >curl_output || {
		echo "curl error with url: '$1'"
		echo "curl output was:"
		cat curl_output
		return 1
	}
	shift &&
	RESP=$(head -1 curl_output) &&
	while test "$#" -gt 0
	do
		expr "$RESP" : "$1" >/dev/null && return
		shift
	done
	echo "curl response didn't match!"
	echo "curl response was: '$RESP'"
	echo "curl output was:"
	cat curl_output
	return 1
}

test_must_be_empty() {
	if test -s "$1"
	then
		echo "'$1' is not empty, it contains:"
		cat "$1"
		return 1
	fi
}

test_should_contain() {
	test "$#" = 2 || error "bug in the test script: not 2 parameters to test_should_contain"
	if ! grep -q "$1" "$2"
	then
		echo "'$2' does not contain '$1', it contains:"
		cat "$2"
		return 1
	fi
}

test_str_contains() {
	find=$1
	shift
	echo "$@" | grep "$find" >/dev/null
}


initial commit

initial commit

#!/bin/sh

XCDANGER_PROJECT="${1}"

# swap file separator characters to keep files with spaces in paths from breaking to two items as find output
OIFS="$IFS"
IFS=$'\n'

XCDANGER_SCHEMES=`find "${XCDANGER_PROJECT}"/xcshareddata -name "*.xcscheme"`

XCDANGER_OUTPUT_PATH="${XCDANGER_PROJECT}/../.xcdanger/"
mkdir "${XCDANGER_OUTPUT_PATH}"

for XCDANGER_SCHEME_PATH in ${XCDANGER_SCHEMES[@]}; do

    # replace spaces in name with escape-quoted space characters, so that basename doesn't break the to new lines either
    XCDANGER_SCHEME_NAME=`echo "${XCDANGER_SCHEME_PATH}" | sed s/' '/'\"\ \"'/g | xargs basename | sed s/'.xcscheme'//g`

    sh -c "xcodebuild -project \"${XCDANGER_PROJECT}\" -scheme \"${XCDANGER_SCHEME_NAME}\" -showBuildSettings > \"${XCDANGER_OUTPUT_PATH}/${XCDANGER_SCHEME_NAME}\".settings.lock"
done

# replace the old file separator character
IFS="$OIFS"

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


added a regexp to strip out non-standard characters at the end of the username, tested successfully

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/Comradephate/bash-scripts.git/'


Added build_release_zip.sh

Added build_release_zip.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/pauldardeau/apigee-ios-sdk.git/'


Add ab-testing request generator

Add ab-testing request generator

#/bin/bash

let iCount=0
while [ $iCount -lt 80 ]
do
  curl http://shop.microservice.io/partials/cart.html
  let iCount++
done

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


added permissions script (cache, logs)

added permissions script (cache, logs)

#!/bin/bash

mkdir -p application/cache
chmod 777 application/cache

mkdir -p application/logs
chmod 777 application/logs

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


Local backup script

Local backup script

#!/usr/bin/env bash

# Backup Shells file
rsync -a /etc/shells /Volumes/Other/Backup/etc
# Backup Git configuration
rsync -a ~/.gitconfig /Volumes/Other/Backup/Users/pmullins/
# Backup Ansible
rsync -a ~/.ansible /Volumes/Other/Backup/Users/pmullins/
# Backup Bash profile settings
rsync -a ~/.bash_profile /Volumes/Other/Backup/Users/pmullins/
# Backup GNUPG keys and settings
rsync -a ~/.gnupg /Volumes/Other/Backup/Users/pmullins/
# Backup Chef settings
rsync -a ~/.chef /Volumes/Other/Backup/Users/pmullins/
# Backup SSH keys and configuration
rsync -a ~/.ssh /Volumes/Other/Backup/Users/pmullins/
# Backup Vim folder
rsync -a ~/.vim /Volumes/Other/Backup/Users/pmullins/
# Backup Vim settings
rsync -a ~/.vimrc /Volumes/Other/Backup/Users/pmullins/
# Backup Xcode Fonts and Color Themes
rsync -a ~/Library/Developer/Xcode/UserData/FontAndColorThemes /Volumes/Other/Backup/Users/pmullins/Library/Developer/Xcode/UserData/FontAndColorThemes/

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


Create zsh.install.sh

Create zsh.install.sh

# Install Zsh
sudo apt-get install -y zsh
# Install Oh-my-zsh
wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sudo sh
# change sh
sudo chsh -s /bin/zsh vagrant
# copy .zshrc
cp /root/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
# Configuration
sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="wezm"/g' ~/.zshrc
sed -i 's/plugins=(git)/plugins=(git command-not-found node npm nvm)/g' ~/.zshrc

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


add pebble.zsh

add pebble.zsh

# waf
alias waf="pypy ./waf"
alias wcon="pypy ./waf configure --board=snowy_bb2 --lowpowerdebug --nowatchdog"
alias wi="pypy ./waf image_resources"
alias wf="pypy ./waf flash"
alias wb="pypy ./waf build"
alias wbf="pypy ./waf build flash"
alias wcbf="pypy ./waf configure --lowpowerdebug --nowatchdog build flash"
alias wt="pypy ./waf test"
alias wco="pypy ./waf console"

# QEMU
alias qcon="pypy ./waf configure --board=snowy_bb2 --lowpowerdebug --nowatchdog --nosleep --qemu --gdb --release"
alias qconm="pypy ./waf configure --board=snowy_bb2 --lowpowerdebug --nowatchdog --nosleep --qemu --gdb --release --malloc_instrumentation"
alias q="pypy ./waf qemu"
alias qco="pypy ./waf qemu_console"
alias qgdb="pypy ./waf qemu_gdb"
alias qspi="pypy ./waf qemu_image_spi"

# Pebble
alias pb='pebble build'
alias pi='pebble install'
alias pbi='pebble build && pebble install'

# Get info on an app
pblapp() {
  curl -s https://dev-portal.getpebble.com/api/applications/$1 | json
}

pblappjs() {
  local pbw_file=$(curl -s https://dev-portal.getpebble.com/api/applications/$1 | jq -r '.applications[] .pbw_file')
  partialzip $pbw_file pebble-js-app.js -- 2>&1 >/dev/null
}

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


Fixed syslinux

Fixed syslinux

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/FluidIdeas/parsers.git/'


Add reset script for raspberry pi (#171)

* Add raspi reset script

* Remove chown duplicate

#!/bin/bash

# Stop on the first sign of trouble
set -e

function info {
    echo -e "\033[0;36m${1}\033[0m"
}

function error {
    echo -e "\033[0;31m${1}\033[0m"
}

if [ $UID != 0 ]; then
    error "ERROR: Only root is allowed to execute the reset script. Forgot sudo?"
    exit 1
fi

if [ ! -f /proc/device-tree/model ]; then
    error "ERROR: This reset script is only intended to run on a Raspberry Pi."
    exit 2
fi

PI_MODEL=$(tr -d '\0' </proc/device-tree/model)

if [[ $PI_MODEL != Raspberry* ]]; then
    error "ERROR: This reset script is only intended to run on a Raspberry Pi."
    exit 3
fi

info "### The Photobooth reset script for your Raspberry Pi."

echo -e "\033[0;33m### Do you want to reset to factory settings?"
read -p "### Warning: This will remove EVERY data (pictures, qr codes) and admin settings! [y/N] " -n 1 -r factoryReset
echo -e "\033[0m"

if [ "$factoryReset" != "${factoryReset#[Yy]}" ] ;then
    info "### Ok, lets go and remove some things."

    info "### Remove your data ..."
    rm -rf data
    mkdir data
    chown -R www-data:www-data data

    info "### Remove your config file ..."
    rm -rf config/my.config.inc.php

    info "### Successful removed your data."
else
    echo -e "\033[0;33m### Do you want to only remove your data (picturey, qr codes)?"
    read -p "### Your configuration file (admin settigns) will be preserved! [y/N] " -n 1 -r dataReset
    echo -e "\033[0m"

    if [ "$dataReset" != "${dataReset#[Yy]}" ] ;then
        info "### Ok, lets go and remove your data."
        rm -rf data
        mkdir data
        chown -R www-data:www-data data

        info "### Successful removed your data."
    fi
fi

info "### Congratulations you finished the reset process."
info "### Have fun with your resetted booth."

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


M  docker/docker.zsh

M  docker/docker.zsh

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/'


realpath helper

realpath helper

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/cronfy/experience.git/'


Initial Commit

Initial Commit

#!/bin/bash
#
# Name: updaterepos.sh
# Auth: Frank Cass
# Date: 20181011
# Desc: Quickly update repositories you have cloned.
#	Works best if all of your tools are stored in a single directory.
#
###

clear

echo "[*] Updating repositories stored in $PWD"
echo "[*] Starting in 3...2...1..."; sleep 3

for i in $(ls -lrt -d -1 $PWD/* | grep "^d" | awk '{$1=$1}{ print }' | cut -d " " -f 9)
do
	cd $i
	echo "[*] Updating $i."
	git -q pull 2> /dev/null
	cd ../
done

echo "[*] Done."

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


Create auto-bbr2.sh

Create auto-bbr2.sh

#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH

# Check if user is root
if [ $(id -u) != "0" ]; then
    echo "Error: You must be root to run this script, please use root to install BBR"
    exit
fi

clear
echo "+------------------------------------------------------------------------+"
echo "|                          GooGle TCP BBR                                |"
echo "+------------------------------------------------------------------------+"
echo "|        A tool to auto-compile & install BBR on CentOS                  |"
echo "+------------------------------------------------------------------------+"
echo "|                 Welcome to  http://github.com/52fancy                  |"
echo "+------------------------------------------------------------------------+"

Get_RHEL_Version()
{
    if grep -Eqi "release 5." /etc/redhat-release; then
        RHEL_Version='5'
    elif grep -Eqi "release 6." /etc/redhat-release; then
        RHEL_Version='6'
    elif grep -Eqi "release 7." /etc/redhat-release; then
        RHEL_Version='7'
    fi
}

Get_RHEL_Version
if [ $RHEL_Version != "6" ]; then
    echo "Error: You must be CentOS 6 to run this script, please use CentOS 6 to install BBR"
	exit
fi

Get_OS_Bit()
{
    if [[ `getconf WORD_BIT` = '32' && `getconf LONG_BIT` = '64' ]] ; then
        OS_Bit='64'
    else
        OS_Bit='32'
    fi
}

Install()
{
    Get_OS_Bit
    if uname -r | grep -Eqi "4.10."; then
	    if lsmod | grep -Eqi "bbr"; then
		    echo "您已经成功安装BBR"
		    exit
		else
		    if [ ! `cat /etc/sysctl.conf | grep -i -E "net.core.default_qdisc=fq"` ]; then
		        echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
		    fi
		    if [ ! `cat /etc/sysctl.conf | grep -i -E "net.ipv4.tcp_congestion_control=bbr"` ]; then
		        echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
		    fi
		    sysctl -p
		fi
	else
	    if [ ! -f "/boot/grub/grub.conf" ];then
			echo "不支持当前系统，即将退出程序！"
			exit
		fi

	    echo -n "内核不一致，即将替换内核 [y or n]："
		read code
		if [ $code = "y" -o $code = "Y" ]; then
		    if [ $OS_Bit = "64" ]; then
		        rpm -ivh https://github.com/52fancy/GooGle-BBR/raw/master/kernel/kernel-4.10.el6.x86_64.rpm --force
			fi
			if [ $OS_Bit = "32" ]; then
		        rpm -ivh https://github.com/52fancy/GooGle-BBR/raw/master/kernel/kernel-4.10.el6.i686.rpm --force
			fi

			kernel_default=`grep '^title ' /boot/grub/grub.conf | awk -F'title ' '{print i++ " : " $2}' | grep "4.10." | grep -v debug | cut -d' ' -f1`
			sed -i "s/^default.*/default=${kernel_default}/" /boot/grub/grub.conf

			if [ ! `cat /etc/sysctl.conf | grep -i -E "net.core.default_qdisc=fq"` ]; then
		        echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
		    fi
		    if [ ! `cat /etc/sysctl.conf | grep -i -E "net.ipv4.tcp_congestion_control=bbr"` ]; then
		        echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
		    fi
		    sysctl -p >/dev/null 2>&1

			rm -f $0
			read -p "重启后生效，是否重启？[y]：" is_reboot
			if [[ ${is_reboot} == "y" || ${is_reboot} == "Y" ]]; then
			    reboot
			else
			    exit
			fi
		else
		    echo "程序即将退出安装"
            exit
		fi
	fi
}

Install
exit

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


specify dataset

specify dataset

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/JonnyCE/project-platform.git/'


Adding a helper shell script to invoke tests

#!/bin/bash

$(dirname $0)/vendor/bin/phpunit

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


script that converts from RPM to .tgz

script that converts from RPM to .tgz

#!/bin/sh
cd $(dirname $0)
install -d files
rm -rf tmp
for name
do
  DESTFILE=files/$(basename $name .rpm).tgz
  mkdir tmp
  rpm2cpio $name | (cd tmp ; cpio -i -d )
  tar cvf $DESTFILE -C tmp .
  rm -rf tmp
done

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


add build.sh for gmaps examples

add build.sh for gmaps examples

#!/bin/sh
# you will need to read the top level README, and run boostrap.py
# and buildout in order to make pyjsbuild

options="$*"
#if [ -z $options ] ; then options="-O";fi
../../bin/pyjsbuild --print-statements $options MapSimple.py
../../bin/pyjsbuild --print-statements $options ControlDisableUI.py
../../bin/pyjsbuild --print-statements $options ControlOptions.py
../../bin/pyjsbuild --print-statements $options ControlSimple.py
../../bin/pyjsbuild --print-statements $options DirectionsSimple.py
../../bin/pyjsbuild --print-statements $options EventArguments.py
../../bin/pyjsbuild --print-statements $options EventClosure.py
../../bin/pyjsbuild --print-statements $options EventProperties.py
../../bin/pyjsbuild --print-statements $options EventSimple.py
../../bin/pyjsbuild --print-statements $options GeocodingSimple.py
../../bin/pyjsbuild --print-statements $options MapSimple.py
../../bin/pyjsbuild --print-statements $options oldExample.py

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


gen script

gen script

error: pathspec 'src/Graph/genGraph.sh' did not match any file(s) known to git


Fix bugs: - make files readable by all in S3 bucket - other misc. cleanups.

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/LPM-HMS/GenomeKey.git/'


Add tmux aliases file

Add tmux aliases 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/centosGit/dotfiles.git/'


Add very simple REPL looper that restarts Julia if it dies

#!/usr/bin/env sh
while true
do
	julia repl.jl
done

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


Removendo arquivos nao usados

Removendo arquivos nao usados

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/filipesimoes/ds-api.git/'


Ajout d'un script de lancement de l'indexation

Génère automatiquement un fichier de log.

#!/bin/bash -e

logfile=indexation-$(date +%Y%m%d_%H%M%d).log

ln -sf "$logfile" indexation.log

(
 make --debug=b "$@" 2>&1|awk '{ print strftime("%Y-%m-%d %H:%M:%S"), $0; fflush(); }'
) >> "$logfile"

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


Create isolate-instance-from-outsite.sh

Create isolate-instance-from-outsite.sh

#!/bin/sh

#Create a security group to isolate your instance, note the difference between EC2-Classic and EC2-VPC, take note of Group-ID
aws ec2 create-security-group --group-name isolation-sg --description “Security group to isolate EC2-Classic instances"
aws ec2 create-security-group --group-name isolation-sg --description “Security group to isolate a EC2-VPC instance" --vpc-id vpc-1a2b3c4d
# where vpc-1a2b3c4d is the VPC ID that the instance is member of

#Set a rule to allow SSH access from your public IP only, but first we have to know our public IP:
dig +short myip.opendns.com @resolver1.opendns.com
aws ec2 authorize-security-group-ingress --group-name isolation-sg --protocol tcp --port 22 --cidr YOUR.IP.ADDRESS.HERE/32
aws ec2 authorize-security-group-ingress --group-id sg-BLOCK-ID --protocol tcp --port 22 --cidr YOUR.IP.ADDRESS.HERE/32
# note the difference between both commands in group-name and group-id, sg-BLOCK-ID is the ID of your isolation-sg

#In EC2-Classic Security Groups don’t support outbound rules, I provide a script below to totally block outbound traffic within the instance. However, for EC2-VPC Security Groups, outbound rules can be set with these commands:
aws ec2 revoke-security-group-egress --group-id sg-BLOCK-ID --protocol '-1' --port all --cidr '0.0.0.0/0’
# removed rule that allows all outbound traffic
aws ec2 authorize-security-group-egress --group-id sg-BLOCK-ID --protocol 'tcp' --port 80 --cidr '0.0.0.0/0’
# place a port or IP if you want to enable some other outbound traffic otherwise do not execute this command.

#Apply that Security Group to the compromised instance:
aws ec2 modify-instance-attribute --instance-id i-INSTANCE-ID --groups sg-BLOCK-ID
# where sg-BLOCK-ID is the ID of your isolation-sg

error: pathspec 'isolate-instance-from-outsite.sh' did not match any file(s) known to git


apparently sometimes OSTYPE is gone. Fall back to `uname` then

#!/bin/sh

#
# Build a LDNS distribution tar from the SVN repository.
# Ripped from NSD. Adapted by Miek
#

# Abort script on unexpected errors.
set -e

# Remember the current working directory.
cwd=`pwd`

# Utility functions.
usage () {
    cat >&2 <<EOF
Usage $0: [-h] [-s] [-d SVN_root]
Generate a distribution tar file for libdns.

    -h           This usage information.
    -s           Build a snapshot distribution file.  The current date is
                 automatically appended to the current ldns version number.
    -rc <nr>     Build a release candidate, the given string will be added
                 to the version number
                 (which will then be ldns-<version>rc<number>)
    -d SVN_root  Retrieve the libdns source from the specified repository.
EOF
    exit 1
}

info () {
    echo "$0: info: $1"
}

error () {
    echo "$0: error: $1" >&2
    exit 1
}

question () {
    printf "%s (y/n) " "$*"
    read answer
    case "$answer" in
        [Yy]|[Yy][Ee][Ss])
            return 0
            ;;
        *)
            return 1
            ;;
    esac
}

# Only use cleanup and error_cleanup after generating the temporary
# working directory.
cleanup () {
    info "Deleting temporary working directory."
    cd $cwd && rm -rf $temp_dir
}

error_cleanup () {
    echo "$0: error: $1" >&2
    cleanup
    exit 1
}

replace_text () {
    (cp "$1" "$1".orig && \
        sed -e "s/$2/$3/g" < "$1".orig > "$1" && \
        rm "$1".orig) || error_cleanup "Replacement for $1 failed."
}

replace_all () {
    info "Updating '$1' with the version number."
    replace_text "$1" "@version@" "$version"
    info "Updating '$1' with today's date."
    replace_text "$1" "@date@" "`date +'%b %e, %Y'`"
}

SNAPSHOT="no"
RC="no"

# Parse the command line arguments.
while [ "$1" ]; do
    case "$1" in
        "-h")
            usage
            ;;
        "-d")
            SVNROOT="$2"
            shift
            ;;
        "-s")
            SNAPSHOT="yes"
            ;;
        "-rc")
            RC="$2"
            shift
            ;;
        *)
            error "Unrecognized argument -- $1"
            ;;
    esac
    shift
done

# Check if SVNROOT is specified.
if [ -z "$SVNROOT" ]; then
    error "SVNROOT must be specified (using -d)"
fi

# Start the packaging process.
info "SVNROOT  is $SVNROOT"
info "SNAPSHOT is $SNAPSHOT"

#question "Do you wish to continue with these settings?" || error "User abort."

# Creating temp directory
info "Creating temporary working directory"
temp_dir=`mktemp -d ldns-dist-XXXXXX`
info "Directory '$temp_dir' created."
cd $temp_dir

info "Exporting source from SVN."
svn export "$SVNROOT" ldns || error_cleanup "SVN command failed"

cd ldns || error_cleanup "LDNS not exported correctly from SVN"

info "Running  Libtoolize script (libtoolize)."
libtoolize -c --install || libtoolize -c || error_cleanup "Libtoolize failed."

info "Building configure script (autoconf)."
autoreconf || error_cleanup "Autoconf failed."

info "Building configure script for examples (autoconf)."
cd examples && autoreconf && cd .. || error_cleanup "Autoconf failed."

info "Building configure script for drill (autoconf)."
cd drill && autoreconf && cd .. || error_cleanup "Autoconf failed."

rm -r autom4te* drill/autom4te* examples/autom4te* || error_cleanup "Failed to remove autoconf cache directory."

# custom removes
find . -name .c-mode-rc.el -exec rm {} \;
find . -name .cvsignore -exec rm {} \;
rm -rf lua
rm -rf masterdont
rm makedist.sh || error_cleanup "Failed to remove makedist.sh."

info "Determining LDNS version."
version=`./configure --version | head -1 | awk '{ print $3 }'` || \
    error_cleanup "Cannot determine version number."

info "LDNS version: $version"

RECONFIGURE="no"

if [ "$RC" != "no" ]; then
    info "Building LDNS release candidate $RC."
    version2="${version}rc$RC"
    info "Version number: $version2"

    replace_text "configure.ac" "AC_INIT(ldns, $version" "AC_INIT(ldns, $version2"
    replace_text "drill/configure.ac" "AC_INIT(ldns, $version" "AC_INIT(ldns, $version2"
    replace_text "examples/configure.ac" "AC_INIT(ldns, $version" "AC_INIT(ldns, $version2"
    version="$version2"
    RECONFIGURE="yes"
fi

if [ "$SNAPSHOT" = "yes" ]; then
    info "Building LDNS snapshot."
    version2="${version}_`date +%Y%m%d`"
    info "Snapshot version number: $version2"

    replace_text "configure.ac" "AC_INIT(ldns, $version" "AC_INIT(ldns, $version2"
    replace_text "drill/configure.ac" "AC_INIT(ldns, $version" "AC_INIT(ldns, $version2"
    replace_text "examples/configure.ac" "AC_INIT(ldns, $version" "AC_INIT(ldns, $version2"
    version="$version2"
    RECONFIGURE="yes"
fi

if [ "$RECONFIGURE" = "yes" ]; then
    info "Rebuilding configure script (autoconf)."
    autoreconf || error_cleanup "Autoconf failed."

    info "Rebuilding configure script for examples (autoconf)."
    cd examples && autoreconf && cd .. || error_cleanup "Autoconf failed."

    info "Rebuilding configure script for drill (autoconf)."
    cd drill && autoreconf && cd .. || error_cleanup "Autoconf failed."

    rm -r autom4te* drill/autom4te* examples/autom4te* || error_cleanup "Failed to remove autoconf cache directory."
fi

info "Renaming LDNS directory to ldns-$version."
cd ..
mv ldns ldns-$version || error_cleanup "Failed to rename LDNS directory."

tarfile="../ldns-$version.tar.gz"

if [ -f $tarfile ]; then
    (question "The file $tarfile already exists.  Overwrite?" \
        && rm -f $tarfile) || error_cleanup "User abort."
fi

info "Deleting the test directory"
rm -rf ldns-$version/test/

info "Deleting the pcat directory"
rm -rf ldns-$version/pcat/

info "Deleting the nsd-test directory"
rm -rf ldns-$version/examples/nsd-test/

info "Creating tar ldns-$version.tar.gz"
tar czf ../ldns-$version.tar.gz ldns-$version || error_cleanup "Failed to create tar file."

cleanup

echo "ostype $OSTYPE"
case $OSTYPE in
        linux*)
                sha=`sha1sum ldns-$version.tar.gz |  awk '{ print $1 }'`
                ;;
        freebsd*)
                sha=`sha1  ldns$version.tar.gz |  awk '{ print $5 }'`
                ;;
        *)
        	uname=`uname`
        	case $uname in
        		Linux*)
                        	sha=`sha1sum ldns-$version.tar.gz |  awk '{ print $1 }'`
                        	;;
		        FreeBSD*)
                		sha=`sha1  ldns$version.tar.gz |  awk '{ print $5 }'`
		                ;;
		esac
        	;;
esac
echo $sha > ldns-$version.tar.gz.sha1

info "LDNS distribution created successfully."
info "SHA1sum: $sha"

#!/bin/sh

#
# Build a LDNS distribution tar from the SVN repository.
# Ripped from NSD. Adapted by Miek
#

# Abort script on unexpected errors.
set -e

# Remember the current working directory.
cwd=`pwd`

# Utility functions.
usage () {
    cat >&2 <<EOF
Usage $0: [-h] [-s] [-d SVN_root]
Generate a distribution tar file for libdns.

    -h           This usage information.
    -s           Build a snapshot distribution file.  The current date is
                 automatically appended to the current ldns version number.
    -rc <nr>     Build a release candidate, the given string will be added
                 to the version number
                 (which will then be ldns-<version>rc<number>)
    -d SVN_root  Retrieve the libdns source from the specified repository.
EOF
    exit 1
}

info () {
    echo "$0: info: $1"
}

error () {
    echo "$0: error: $1" >&2
    exit 1
}

question () {
    printf "%s (y/n) " "$*"
    read answer
    case "$answer" in
        [Yy]|[Yy][Ee][Ss])
            return 0
            ;;
        *)
            return 1
            ;;
    esac
}

# Only use cleanup and error_cleanup after generating the temporary
# working directory.
cleanup () {
    info "Deleting temporary working directory."
    cd $cwd && rm -rf $temp_dir
}

error_cleanup () {
    echo "$0: error: $1" >&2
    cleanup
    exit 1
}

replace_text () {
    (cp "$1" "$1".orig && \
        sed -e "s/$2/$3/g" < "$1".orig > "$1" && \
        rm "$1".orig) || error_cleanup "Replacement for $1 failed."
}

replace_all () {
    info "Updating '$1' with the version number."
    replace_text "$1" "@version@" "$version"
    info "Updating '$1' with today's date."
    replace_text "$1" "@date@" "`date +'%b %e, %Y'`"
}

SNAPSHOT="no"
RC="no"

# Parse the command line arguments.
while [ "$1" ]; do
    case "$1" in
        "-h")
            usage
            ;;
        "-d")
            SVNROOT="$2"
            shift
            ;;
        "-s")
            SNAPSHOT="yes"
            ;;
        "-rc")
            RC="$2"
            shift
            ;;
        *)
            error "Unrecognized argument -- $1"
            ;;
    esac
    shift
done

# Check if SVNROOT is specified.
if [ -z "$SVNROOT" ]; then
    error "SVNROOT must be specified (using -d)"
fi

# Start the packaging process.
info "SVNROOT  is $SVNROOT"
info "SNAPSHOT is $SNAPSHOT"

#question "Do you wish to continue with these settings?" || error "User abort."

# Creating temp directory
info "Creating temporary working directory"
temp_dir=`mktemp -d ldns-dist-XXXXXX`
info "Directory '$temp_dir' created."
cd $temp_dir

info "Exporting source from SVN."
svn export "$SVNROOT" ldns || error_cleanup "SVN command failed"

cd ldns || error_cleanup "LDNS not exported correctly from SVN"

info "Running  Libtoolize script (libtoolize)."
libtoolize -c --install || libtoolize -c || error_cleanup "Libtoolize failed."

info "Building configure script (autoconf)."
autoreconf || error_cleanup "Autoconf failed."

info "Building configure script for examples (autoconf)."
cd examples && autoreconf && cd .. || error_cleanup "Autoconf failed."

info "Building configure script for drill (autoconf)."
cd drill && autoreconf && cd .. || error_cleanup "Autoconf failed."

rm -r autom4te* drill/autom4te* examples/autom4te* || error_cleanup "Failed to remove autoconf cache directory."

# custom removes
find . -name .c-mode-rc.el -exec rm {} \;
find . -name .cvsignore -exec rm {} \;
rm -rf lua
rm -rf masterdont
rm makedist.sh || error_cleanup "Failed to remove makedist.sh."

info "Determining LDNS version."
version=`./configure --version | head -1 | awk '{ print $3 }'` || \
    error_cleanup "Cannot determine version number."

info "LDNS version: $version"

RECONFIGURE="no"

if [ "$RC" != "no" ]; then
    info "Building LDNS release candidate $RC."
    version2="${version}rc$RC"
    info "Version number: $version2"

    replace_text "configure.ac" "AC_INIT(ldns, $version" "AC_INIT(ldns, $version2"
    replace_text "drill/configure.ac" "AC_INIT(ldns, $version" "AC_INIT(ldns, $version2"
    replace_text "examples/configure.ac" "AC_INIT(ldns, $version" "AC_INIT(ldns, $version2"
    version="$version2"
    RECONFIGURE="yes"
fi

if [ "$SNAPSHOT" = "yes" ]; then
    info "Building LDNS snapshot."
    version2="${version}_`date +%Y%m%d`"
    info "Snapshot version number: $version2"

    replace_text "configure.ac" "AC_INIT(ldns, $version" "AC_INIT(ldns, $version2"
    replace_text "drill/configure.ac" "AC_INIT(ldns, $version" "AC_INIT(ldns, $version2"
    replace_text "examples/configure.ac" "AC_INIT(ldns, $version" "AC_INIT(ldns, $version2"
    version="$version2"
    RECONFIGURE="yes"
fi

if [ "$RECONFIGURE" = "yes" ]; then
    info "Rebuilding configure script (autoconf)."
    autoreconf || error_cleanup "Autoconf failed."

    info "Rebuilding configure script for examples (autoconf)."
    cd examples && autoreconf && cd .. || error_cleanup "Autoconf failed."

    info "Rebuilding configure script for drill (autoconf)."
    cd drill && autoreconf && cd .. || error_cleanup "Autoconf failed."

    rm -r autom4te* drill/autom4te* examples/autom4te* || error_cleanup "Failed to remove autoconf cache directory."
fi

info "Renaming LDNS directory to ldns-$version."
cd ..
mv ldns ldns-$version || error_cleanup "Failed to rename LDNS directory."

tarfile="../ldns-$version.tar.gz"

if [ -f $tarfile ]; then
    (question "The file $tarfile already exists.  Overwrite?" \
        && rm -f $tarfile) || error_cleanup "User abort."
fi

info "Deleting the test directory"
rm -rf ldns-$version/test/

info "Deleting the pcat directory"
rm -rf ldns-$version/pcat/

info "Deleting the nsd-test directory"
rm -rf ldns-$version/examples/nsd-test/

info "Creating tar ldns-$version.tar.gz"
tar czf ../ldns-$version.tar.gz ldns-$version || error_cleanup "Failed to create tar file."

cleanup

case $OSTYPE in
        linux*)
                sha=`sha1sum ldns-$version.tar.gz |  awk '{ print $1 }'`
                ;;
        freebsd*)
                sha=`sha1  ldns$version.tar.gz |  awk '{ print $5 }'`
                ;;
esac
echo $sha > ldns-$version.tar.gz.sha1

info "LDNS distribution created successfully."
info "SHA1sum: $sha"


testing looping constructs

testing looping constructs

#!/bin/bash

RETRY_COUNTER=0
RESULT=1
while [ "$RETRY_COUNTER" -lt 5 ] && [ "$RESULT" -ne "0" ]
do
    echo $RETRY_COUNTER
    RETRY_COUNTER=$((RETRY_COUNTER+1))
    sleep 1
    RESULT=1
done

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


Add alias file for syncronisation jobs

Add alias file for syncronisation jobs

alias dir-sync="rsync -a -v --progress"

alias sync-bitcoin-int-ext="rsync -a -v --progress ${HOME}/.bitcoin/internal_mount_point/ ${HOME}/.bitcoin/external_mount_point/"

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


contrib: Add script to run cilium monitor on all k8s nodes

Signed-off-by: Thomas Graf <5f50a84c1fa3bcff146405017f36aec1a10a9e38@cilium.io>

#!/bin/bash

trap 'kill $(jobs -p)' EXIT

while read -r p; do
	kubectl -n kube-system exec -ti $p -- cilium monitor $*&
done <<< "$(kubectl -n kube-system get pods -l k8s-app=cilium | awk '{print $1}' | grep cilium)"

wait

error: pathspec 'contrib/k8s/k8s-monitor.sh' did not match any file(s) known to git


Create repo for testing hg status

Create repo for testing hg status

#!/bin/bash
set -x
set -e

SCRIPT_DIR=${PWD}

REPO=${TMPDIR:? set TMPDIR}/test-hg-repo-status

rm -rf ${TMPDIR:? set TMPDIR}/test-hg-repo-status

mkdir ${REPO}

hg init ${REPO}
cd ${REPO}

hg status

mkdir Folder1
mkdir Folder2

echo 1 deleted-sh-rm.txt >Folder1/deleted-sh-rm.txt
echo 1 deleted-git-rm.txt >Folder1/deleted-git-rm.txt
echo 1 renamed.txt >Folder1/renamed.txt
echo 1 changed-staged.txt >Folder1/changed-staged.txt
echo 1 changed-working.txt >Folder1/changed-working.txt
echo 1 changed-staged-and-working.txt >Folder1/changed-staged-and-working.txt

hg add \
    Folder1/deleted-sh-rm.txt \
    Folder1/deleted-git-rm.txt \
    Folder1/renamed.txt \
    Folder1/changed-staged.txt \
    Folder1/changed-working.txt \
    Folder1/changed-staged-and-working.txt \
    ;

hg commit -m "commit 1"

# delete file
rm Folder1/deleted-sh-rm.txt
hg rm Folder1/deleted-git-rm.txt

# rename file
hg mv Folder1/renamed.txt Folder2/renamed2.txt

# modify files
echo 2 staged change >> Folder1/changed-staged.txt
hg add Folder1/changed-staged.txt

echo 2 working chage >> Folder1/changed-working.txt

echo 2 staged change >> Folder1/changed-staged-and-working.txt
hg add Folder1/changed-staged-and-working.txt

echo 3 working change >> Folder1/changed-staged-and-working.txt

# new files
echo 3 new-working.txt > Folder1/new-working.txt

echo 3 new-staged.txt > Folder1/new-staged.txt
hg add Folder1/new-staged.txt

# status
hg status

# allow Source/Git modules to be tested
export PYTHONPATH=${BUILDER_TOP_DIR}/Source/Git

python3 ${SCRIPT_DIR}/hg_python_status.py ${REPO} $1
python3 ${SCRIPT_DIR}/hg_wb_project_status.py ${REPO} $1

error: pathspec 'Source/Hg/Experiments/make-status-test-repo.sh' did not match any file(s) known to git


[~] fix plugin pj

[~] fix plugin pj

https://github.com/robbyrussell/oh-my-zsh/commit/bce74975d055529cbd186782e2fd99e6da840460

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/takady/oh-my-zsh.git/'


Fix directory specs, and add some notes.

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/'


added script to update pgp key

added script to update pgp key

gpg --export --export-options export-minimal -a EF55302141210EA0 > stefan.asc

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


script to upload images to s3

script to upload images to s3

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/participedia/data-transport.git/'


Add a simple script to start the server in debug mode

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


fixed some issues

fixed some issues

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/fscherwi/tf-utility.git/'


Add build.sh script to build with docker

#!/bin/bash
docker run -it --rm --name my-maven-project -v "$PWD":/usr/src/app  -v "$HOME"/.m2:/root/.m2 -w /usr/src/app maven:3.6-jdk-8 mvn clean package

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


Added setup script.

Added setup script.

#!/usr/bin/bash

echo "Setting up the GunnApps environment."
echo "Assumes you are in the GunnApps root directory."

echo "sudo pip install virtualenv"
sudo pip install virtualenv
virtualenv venv
source venv/bin/activate
echo "pip install -r requirements.txt"
echo "Setup complete."

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


Adding smear.sh script.

Adding smear.sh script.

smear.sh clear the screen in a nice way to use between two calls to
commands with too much output, like a make or gcc execution, so there is
a noticeable space before the start of the output of a command.

#!/bin/bash

RED='\e[31m'
GREEN='\e[32m'
YELLOW='\e[33m'
BLUE='\e[34m'
MAGENTA='\e[35m'
CYAN='\e[36m'
DEFAULT='\e[39m'
RESET='\e[0m'

BOLD='\e[1m'
DIM='\e[2m'
ITALIC='\e[3m'       # seems like only rxvt.
UNDERLINE='\e[4m'
BLINK='\e[5m'
REVERSE='\e[7m'
HIDDEN='\e[8m'

color=$DEFAULT

lines=${LINES:-$(tput lines)}
columns=${COLUMNS:-$(tput cols)}
sep=' '
reverse='false'
newline=''

skipnext=0
# $ARG -> argument to be processed.
# $1 -> next argument.
# $skipnext -> next X param were consumed in an argument handling, so skip them
# shift command -> keep $@ in sync with the "$@" passed to the for function, so
#     $1 aways points to the next param.
for ARG in "$@" ; do
    shift
    if (( skipnext > 0 )) ; then
        (( skipnext-- ))
        continue
    fi

     case "$ARG" in
         -l | --lines )
             lines=$1
             skipnext=1
         ;;

         -c | --columns )
             columns=$1
             skipnext=1
         ;;

         -n | --no-newline )
             newline='-n'
         ;;

	 -r | --reverse )
             reverse='true'
         ;;

         --color )
             #COLOR=$1
             echo "Option not implemented. Ignoring."
             skipnext=1
         ;;

         -? )
             sep=${ARG: -1}
         ;;

         * )
             echo "Invalid argument: $ARG"
             exit 1
         ;;
    esac
done

if [ $reverse == 'true' ] ; then
    color=$REVERSE
fi

eval printf -v linetoprint "%0.s${sep}" {1..${columns}}

echo -en "${color}"
for (( i = 0; i < lines; i++ )) ; do
    echo $newline $linetoprint
done
echo -e "${RESET}"

exit 0

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


Make it possible again to use alternative sync server

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/Jumpscale/jumpscale6_core.git/'