Update and Build

Update and Build

#!/bin/bash
#!/home/naarad/.conda/envs/Naarad_VirtualENV/bin/python3
python3 fbscraper.py
#python3 frontend.py

# Commit changes
echo "commiting.."
git add -A
git commit -m 'Update and Build'

# Create the subtree, push changes to gh-pages
# git subtree split --prefix output -b gh-pages

echo "deploying.."
git push origin master
# git push -f origin gh-pages:gh-pages

# echo "cleaning..."
# git branch -D gh-pages

#!/bin/bash
python3 fbscraper.py
#python3 frontend.py

# Commit changes
echo "commiting.."
git add -A
git commit -m 'Update and Build'

# Create the subtree, push changes to gh-pages
# git subtree split --prefix output -b gh-pages

echo "deploying.."
git push origin master
# git push -f origin gh-pages:gh-pages

# echo "cleaning..."
# git branch -D gh-pages


Create usb-copy-tool.sh

Create usb-copy-tool.sh

#!/bin/bash
# The MIT License (MIT)
#
#Copyright (c) 2015 JP Senior jp.senior@gmail.com
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
#furnished to do so, subject to the following conditions:
#
#The above copyright notice and this permission notice shall be included in all
#copies or substantial portions of the Software.
#
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
#SOFTWARE.

#Super cool file copy thing by JP
#instructions
#put the 'master data' in the location $master points to
#set the $devices variable to a list of valid USB devices [trial and error]
#run!

#requires lsscsi binary for convenience
#
# I have had a few cases where I have needed to quickly copy a bunch of data to a number of
# usb devices really fast.
# To use:
# a) Copy master data to /mnt/master
# b) plug in USB flash drive(s)
# c) Run script -- press 'enter' when all of the copying is done, and keep going.

master="/mnt/master"

## Do not edit below this line

makeit ()
{
  if [ -b /dev/$1 ]
  then
    echo "Formatting /dev/$1"
    umount -f /dev/$1 > /dev/null 2>&1
    rm -rf /mnt/$1
    sleep 2
    mkdosfs -F 32 -I /dev/$1
    sleep 2
    mkdir -p /mnt/$1
    mount /dev/$1 /mnt/$1
    if [ $? -eq 0 ]
    then
      sleep 2
      cp -vr $master/. /mnt/$1/
    else
      echo "Experienced an error $?"
    fi
    sleep 2
  else
    echo "Something may be missing for /dev/$1"
  fi

}

while [ 1 -eq 1 ]
do

devices=$(lsscsi | egrep "UDisk" | awk -F"/" '{print $3}')
count=$(echo $devices | wc -w )
echo $count
n=0
for i in $devices

do
  n=$((n+1))
  #checking
  #Create the mount point, why not. :)
  mkdir -p /mnt/$i
  #check md5
  #empty string
  nullmd5=$(md5sum /dev/null | awk '{ print $1 }')
  #master copy of files
  md5master=$(find $master -type f -exec md5sum {} + | awk '{ print $1 }' | sort | md5sum | awk '{ print $1 }')
  #unmount it...
  umount -f /dev/$i > /dev/null 2>&1
  #Attempt to mount the device
  mount /dev/$i /mnt/$i
  if [ $? -eq 0 ]
  then
    #echo "Mount OK"
    md5=$(find /mnt/$i -type f -exec md5sum {} + | awk '{ print $1 }' | sort | md5sum | awk '{ print $1 }')
    if [ $md5 = $md5master ]
    then
      echo "***GOOD***  $i is good $n"
    else
      echo "Copy NOT good on $i $n"
      makeit $i &
    fi
    #clean up silently
    umount -f /dev/$i > /dev/null 2>&1
  else
    echo "Copy NOT good on $i $n"
    makeit $i &
  fi
  #cleanup
  umount -f /dev/$i > /dev/null 2>&1
  rm -rf /mnt/$i
done

read -n1 -p "Hit a key dude" key
done

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


Add runme2.sh

Add runme2.sh

Signed-off-by: Gianpaolo Macario <f8885408b8c3d931b330bae3c3a28a3af912c463@gmail.com>

#!/bin/sh

set -x
set -e

dnf update

dnf install -y openssh-clients

# Prereq for getting systemd sources
dnf install -y git
# Prereq for building systemd
dnf install -y gperf intltool libcap-devel libgcrypt-devel libmount-devel libtool
dnf install -y libxslt make

cd /shared
[ ! -e systemd ] && git clone https://github.com/gmacario/systemd.git
cd /shared/systemd
git checkout bootchart-hackme

./autogen.sh

./configure CFLAGS='-g -O0 -ftrapv' \
    --enable-compat-libs \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --libdir=/usr/lib64
# --enable-kdbus \

make

# TODO

# EOF

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


tests: add integration test for shim-eth

#!/bin/bash

# Create a veth pair
ip link add rina.veth0 type veth peer name rina.veth1
ip link set rina.veth0 up
ip link set rina.veth1 up

# Create a shim-eth for each end of the pair. DIF should be
# the same, but we'll cheat only for the purpose of testing.
rlite-ctl ipcp-create s0 shim-eth d0 || exit 1
rlite-ctl ipcp-create s1 shim-eth d1 || exit 1
rlite-ctl ipcp-config s0 netdev rina.veth0 || exit 1
rlite-ctl ipcp-config s1 netdev rina.veth1 || exit 1

# Register an application on the first shim-eth
rina-echo-async -lw -z rpinstance4 -d d0 || exit 1
# Run some clients on the other shim-eth
rina-echo-async -z rpinstance4 -d d1 || exit 1

# Cleanup
pkill rina-echo-async
rlite-ctl reset || exit 1
ip link del rina.veth0 || exit 1

error: pathspec 'tests/integration/0004-shim-eth.sh' did not match any file(s) known to git


Add verbose flag to s3_sync

Add verbose flag to s3_sync

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/brad2014/puppet-utils.git/'


Add kurento_npm_publish.sh

Add kurento_npm_publish.sh

Change-Id: Ie3c4c90c0521eb2181b77c3c4c12dcb3e4b07e71

#!/bin/bash -x

echo "##################### EXECUTE: npm-publish #####################"

env

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

# Get project data
projectName=$(jshon -e name -u < package.json)  || exit 1
localVersion=$(jshon -e version -u < package.json ) || exit 1
pubVersion=$(npm info --json $projectName| jshon -e version -u || echo "0.0.0") || exit 1

localRelease=$(echo $localVersion | awk -F"-" '{print $1}') || exit 1
pubRelease=$(echo $pubVersion | awk -F"-" '{print $1}') || exit 1

echo "Local version found, V: $localVersion, R: $localRelease"
echo "Public version found, V: $pubVersion, R: $pubRelease"

# Publish release only if greater than published
vercomp $localRelease $pubRelease
different=$?
if [ $different -eq 1 ]; then
  echo "Publishing to npm $projectName version $localVersion"
	#npm publish || exit 1
else
	echo "Do not publish as public version is already greater or equal than local"
fi

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


initial install of auto-install prezto script

echo "Prezto — Instantly Awesome Zsh"
echo "https://github.com/sorin-ionescu/prezto"
echo "---------------------------------------"

cd ~
mkdir .zsh-old
mv .z* oh-my* .zsh-old

git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"

setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
  ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done

chsh -s /bin/zsh

echo "close terminal and reopen to use prezto"

exit 0

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


Install file for npm modules

Install file for npm modules

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


Created multichain_vanilla.sh

Created multichain_vanilla.sh

This is an option to install only the multichain and hashchain. This will NOT install the yobiapps like Contract, Vault, Wallet.

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/Primechain/yobichain.git/'


Fixed multichain version issue

Fixed multichain version issue


baixa as musica que serão utilizadas pelo algoritmo de identificiação

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/felipeband/calvin.git/'


Seattle: add dynamic inventory sourced from portal.

#!/bin/sh
curl -k https://encrypted.hamwan.org/host/ansible.json

error: pathspec 'locales/seattle/hosts.sh' did not match any file(s) known to git


ZSH has built-in regex support; use it!

ZSH has built-in regex support; use it!

# get the name of the branch we are on
function git_prompt_info() {
  ref=$(git symbolic-ref HEAD 2> /dev/null) || return
  echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX"
}

# Checks if working tree is dirty
parse_git_dirty() {
  if [[ -n $(git status -s 2> /dev/null) ]]; then
    echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
  else
    echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
  fi
}

# Checks if there are commits ahead from remote
function git_prompt_ahead() {
  if $(echo "$(git log origin/$(current_branch)..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
    echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
  fi
}

# Formats prompt string for current git commit short SHA
function git_prompt_short_sha() {
  SHA=$(git rev-parse --short HEAD 2> /dev/null) && echo "$ZSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$ZSH_THEME_GIT_PROMPT_SHA_AFTER"
}

# Formats prompt string for current git commit long SHA
function git_prompt_long_sha() {
  SHA=$(git rev-parse HEAD 2> /dev/null) && echo "$ZSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$ZSH_THEME_GIT_PROMPT_SHA_AFTER"
}

# Get the status of the working tree
git_prompt_status() {
  local indicators line untracked added modified renamed deleted
  while IFS=$'\n' read line; do
    if [[ "$line" =~ '^\?\? ' ]]; then
      [[ -n $untracked ]] && continue || untracked='yes'
      indicators="${ZSH_THEME_GIT_PROMPT_UNTRACKED}${indicators}"
    fi
    if [[ "$line" =~ '^(((A|M|D|T) )|(AD|AM|AT|MM)) ' ]]; then
      [[ -n $added ]] && continue || added='yes'
      indicators="${ZSH_THEME_GIT_PROMPT_ADDED}${indicators}"
    fi
    if [[ "$line" =~ '^(( (M|T))|(AM|AT|MM)) ' ]]; then
      [[ -n $modified ]] && continue || modified='yes'
      indicators="${ZSH_THEME_GIT_PROMPT_MODIFIED}${indicators}"
    fi
    if [[ "$line" =~ '^R  ' ]]; then
      [[ -n $renamed ]] && continue || renamed='yes'
      indicators="${ZSH_THEME_GIT_PROMPT_RENAMED}${indicators}"
    fi
    if [[ "$line" =~ '^( D|AD) ' ]]; then
      [[ -n $deleted ]] && continue || deleted='yes'
      indicators="${ZSH_THEME_GIT_PROMPT_DELETED}${indicators}"
    fi
    if [[ "$line" =~ '^UU ' ]]; then
      [[ -n $unmerged ]] && continue || unmerged='yes'
      indicators="${ZSH_THEME_GIT_PROMPT_UNMERGED}${indicators}"
    fi
  done < <(git status --porcelain 2> /dev/null)
  echo $indicators
}

# get the name of the branch we are on
function git_prompt_info() {
  ref=$(git symbolic-ref HEAD 2> /dev/null) || return
  echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX"
}

# Checks if working tree is dirty
parse_git_dirty() {
  if [[ -n $(git status -s 2> /dev/null) ]]; then
    echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
  else
    echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
  fi
}

# Checks if there are commits ahead from remote
function git_prompt_ahead() {
  if $(echo "$(git log origin/$(current_branch)..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
    echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
  fi
}

# Formats prompt string for current git commit short SHA
function git_prompt_short_sha() {
  SHA=$(git rev-parse --short HEAD 2> /dev/null) && echo "$ZSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$ZSH_THEME_GIT_PROMPT_SHA_AFTER"
}

# Formats prompt string for current git commit long SHA
function git_prompt_long_sha() {
  SHA=$(git rev-parse HEAD 2> /dev/null) && echo "$ZSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$ZSH_THEME_GIT_PROMPT_SHA_AFTER"
}

# Get the status of the working tree
git_prompt_status() {
  INDEX=$(git status --porcelain 2> /dev/null)
  STATUS=""
  if $(echo "$INDEX" | grep '^?? ' &> /dev/null); then
    STATUS="$ZSH_THEME_GIT_PROMPT_UNTRACKED$STATUS"
  fi
  if $(echo "$INDEX" | grep '^A  ' &> /dev/null); then
    STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS"
  elif $(echo "$INDEX" | grep '^M  ' &> /dev/null); then
    STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS"
  fi
  if $(echo "$INDEX" | grep '^ M ' &> /dev/null); then
    STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
  elif $(echo "$INDEX" | grep '^AM ' &> /dev/null); then
    STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
  elif $(echo "$INDEX" | grep '^ T ' &> /dev/null); then
    STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
  fi
  if $(echo "$INDEX" | grep '^R  ' &> /dev/null); then
    STATUS="$ZSH_THEME_GIT_PROMPT_RENAMED$STATUS"
  fi
  if $(echo "$INDEX" | grep '^D ' &> /dev/null); then
    STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS"
  fi
  if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then
    STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS"
  fi
  echo $STATUS
}


Adding build.sh file

Adding build.sh file

apt install build-essential

mkdir ~/src
cd ~/src
git clone https://github.com/matrix-profile-foundation/matrixprofile.git
cd matrixprofile

pip install -r requirements.txt

pip install -e .

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


Improved the socket detection function.

Improved the socket detection function.

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/Ofenhed/virt-start.git/'


Added the ability to automatically locate the LLVM tools when it's not immediately clear.

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/bricehulse/dieselc.git/'


adding tests

adding tests

License: MIT
Signed-off-by: Michael Pfister <e2f24bfe93462858227d6542e87d233e91031ea8@gmail.com>

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/llawall/go-ipfs.git/'


makeinitrd using browserify script

makeinitrd using browserify script

#!/bin/bash

browserify js > build/system/kernel.js && ./mkinitrd -c disk/boot/initrd build

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


Add basic media archiver we can run weekly

#!/bin/bash
#
# This script will generate an archive of all uploaded media files.
MEDIADIR=`dirname $0`/../static/uploads
EXPORTDIR=`dirname $0`/../static/downloads/media
ISODATE=`date +"%Y-%m-%d"`
EXPORTPATH="$EXPORTDIR/media-$ISODATE.tgz"
tar cvfz $EXPORTPATH $MEDIADIR

error: pathspec 'maintenance/archive-media.sh' did not match any file(s) known to git


Working on sending queries to AWS instance

# See if we can find the above record by searching for a square that intersects it
curl -XGET 'http://localhost:9200/alerts/alert/_search' -d '
{
    "query":{
        "bool": {
            "must": {
                "match_all": {}
            },
            "filter": {
                "geo_shape": {
                    "alertShape": {
                        "shape": {
                            "type": "polygon",
                            "coordinates" : [ [-109.5297,40.4554],
                                              [-109.5298,40.4556],
                                              [-109.5299,40.4556],
                                              [-109.5299,40.4554],
                                              [-109.5297,40.4554] ]
                        }
                    }
                }
            }
        }
    }
}
'

# Lets see if we can find by intersecting circle
curl -XGET 'http://localhost:9200/alerts/alert/_search' -d '
{
    "query":{
        "bool": {
            "must": {
                "match_all": {}
            },
            "filter": {
                "geo_shape": {
                    "alertShape": {
                        "shape": {
                            "type": "circle",
                            "coordinates" : [-109.5288,40.4555],
                            "radius" : "1000m"

                        }
                    }
                }
            }
        }
    }
}
'

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


Add a func to use fzf and gh to find issues

fzf-gh-issues() {
  local FZF_GH_ISSUES_BASE_CMD=(gh issue list --limit 100)

  local res=$($FZF_GH_ISSUES_BASE_CMD | fzf \
    --ansi \
    --prompt='Open issue list>' \
    --bind "ctrl-a:reload($FZF_GH_ISSUES_BASE_CMD --state all)"    \
    --bind "ctrl-o:reload($FZF_GH_ISSUES_BASE_CMD --state open)"   \
    --bind "ctrl-x:reload($FZF_GH_ISSUES_BASE_CMD --state closed)" \
    --header='C-a: all, C-o: opened, C-x: closed' \
    --preview "gh issue view {1}")

  local issue_id=$(echo $res | awk '{ print $1 }')
  gh issue view --web $issue_id
}

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


Add new file

Add new file

 install() {
wget "https://valtman.name/files/telegram-cli-1222"
mv telegram-cli-1222 tg
sudo apt-get install libreadline-dev
sudo apt install libreadline-dev
sudo apt-get install libreadline6
sudo apt-get install libreadline6-dev
sudo apt-get install libconfig-dev
sudo apt-get install libssl-dev
sudo apt-get install lua5.2
sudo apt-get install liblua5.2-dev
sudo apt-get install lua-socket
sudo apt-get install lua-sec
sudo apt-get install lua-expat
sudo apt-get install libevent-dev
sudo apt-get install make
sudo apt-get install unzip
sudo apt-get install git
sudo apt-get install redis-server
sudo apt-get install autoconf
sudo apt-get install g++
sudo apt-get install libjansson-dev
sudo apt-get install libpython-dev
sudo apt-get install expat libexpat1-dev
sudo apt-get install ppa-purge
sudo apt-get install python3-pip
sudo apt-get install python3-dev
sudo apt-get install software-properties-common
sudo apt-get install python-software-properties
sudo apt-get install gcc-6
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo ppa-purge
sudo pip3 install redis
sudo service redis-server restart
chmod 777 tg
RED='\033[0;31m'
NC='\033[0m'
CYAN='\033[0;36m'
echo -e "-${RED} SelfBot installed ! ${NC}Now run ${CYAN}./launch.sh ${NC}command"
}
 if [ "$1" = "install" ]; then
  install
  fi
 if [ ! -f ./tg ]; then
    echo "tg binary not found"
    echo "Run $0 install"
    exit 1
  fi
./tg -s ./bot.lua

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


chore: Added helper script to make all import statements for a qml file the same

Closes #304

#!/bin/bash

ROOT=$1
VERSION=$2

for F in  $(grep -rl "${ROOT}" .)
do
    sed -i -r "s:import ${ROOT} [0-9]+.[0-9]+:import ${ROOT} ${VERSION}:g" $F
done

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


simplify radio script

simplify radio 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/lbischof/ansible-playbooks.git/'


wget -> curl

wget -> curl

wget이 설치되지 않은 경우 대응

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


Fixed issues on branch named other than master

-

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/flowinho/GIT_PlistUpdater.git/'


hack: add script to make tarball

hack: add script to make tarball

#!/usr/bin/env bash

tar czvf vault-operator.tar.gz README.md doc/ example/ hack/tls-gen.sh hack/playbook/vault.hcl

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


Add quick and dirty script for gluster volume resizing

#!/bin/bash

# Environment definition
## Define logical/gluster volumes to be resized
gluster_volume[0]="gluster_vol_88"
gluster_volume[1]="gluster_vol_86"

## Define OpenShift persistent volumes to be resized
persistent_volume[0]="gluster-pv88"
persistent_volume[1]="gluster-pv86"

## Define volume group containing the logical/gluster volumes
volume_group="vg_gluster"

## Define new volume size in gigabytes
new_volume_size=2

## Define deploymentConfigs to scale down
deploymentconfig[0]=""
#deploymentconfig[1]=""

## Define project
project=""

## Define gluster nodes (hostnames or IPs)
gluster_node[0]=""
gluster_node[1]=""

## Initialize variables
dc_replicas=()

# Rock'n'roll
## Reset timer
SECONDS=0

## Scale down applications
for ((i=0; i<${#deploymentconfig[@]}; i++)); do
  echo "Scaling down ${deploymentconfig[$i]}"
  dc_replicas[$i]=$(oc get dc ${deploymentconfig[$i]} --output jsonpath='{.status.replicas}' -n $project)
  oc scale --replicas=0 dc ${deploymentconfig[$i]} -n $project
done

## Resize logical volumes
for node in "${gluster_node[@]}"; do
  for vol in "${gluster_volume[@]}"; do
    echo "Resizing gluster volume $vol on node $node"
    ssh $node "lvresize --size ${new_volume_size}g --resizefs /dev/${volume_group}/${vol}"
  done
done

## Resize persistent volume in OpenShift
for pv in "${persistent_volume[@]}"; do
  echo "Patching persistent volume"
  oc patch pv $pv --patch="{\"spec\":{\"capacity\":{\"storage\":\"${new_volume_size}Gi\"}}}"
done

## Scale up applications
for ((i=0; i<${#deploymentconfig[@]}; i++)); do
  echo "Scaling up ${deploymentconfig[$i]} to ${dc_replicas[$i]}"
  oc scale --replicas=${dc_replicas[$i]} dc ${deploymentconfig[$i]} -n $project
done

## Calculate run duration
duration=$SECONDS
echo "Duration was $(($duration / 60)) minutes $(($duration % 60)) seconds"

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


serve build/pull script

serve build/pull script

#!/bin/sh
git pull
backend/bin/console cache:clear
chmod -R 777 backend/var/cache

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


Minor.

Minor.

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


feat: install oh-my-zsh

feat: install oh-my-zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

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


Adding installation script.

Adding installation script.

#!/bin/bash

# $1=numErrors
errorExit() {
  echo
  echo "$1 errors have been found above. Please correct the errors and try again."
  exit 1
}

# $1=component
hasComponent() {
  which $1 > /dev/null 2>&1 || rc=$?
  if [ ! -z $rc ]; then
    echo "ERROR: $1 could not be found. Please install $1 and try again."
    return 1
  fi
}

checkPreReqs() {
  hasComponent vagrant || ((errors++))
  hasComponent virtualbox || ((errors++))

  if [ ! -z $errors ]; then
    errorExit $errors
  fi
}

prepare() {
  mkdir sirf-dev
  mkdir sirf-dev/opensirf-server
  mkdir sirf-dev/opensirf-swift
  mkdir sirf-dev/opensirf-fs

  cat <<-EOF > sirf-dev/opensirf-server/Vagrantfile
    Vagrant.configure("2") do |config|
      config.vm.box = "opensirf/opensirf-server"
      config.ssh.insert_key = false
      config.vm.provider "virtualbox" do |v|
        config.vm.network "private_network", :type => 'dhcp', :name => 'vboxnet0', :adapter => 2
      end
    end
	EOF

  cat <<-EOF > sirf-dev/opensirf-swift/Vagrantfile
	Vagrant.configure("2") do |config|
			config.vm.box = "opensirf/opensirf-ident-swift"
			config.ssh.insert_key = false
			config.vm.provider "virtualbox" do |v|
				v.memory = 4096
				v.cpus = 4
				config.vm.network "private_network", :type => 'dhcp', :name => 'vboxnet0', :adapter => 2
			end
		end
	EOF

  cat <<-EOF > sirf-dev/opensirf-fs/Vagrantfile
		Vagrant.configure("2") do |config|
			config.vm.box = "opensirf/opensirf-base"
			config.ssh.insert_key = false
			config.vm.provider "virtualbox" do |v|
				config.vm.network "private_network", :type => 'dhcp', :name => 'vboxnet0', :adapter => 2
			end
		end
	EOF

}

provisionSirfServer() {
  oldDir=$(pwd)
  cd sirf-dev/opensirf-server
  vagrant up
  cd $oldDir
}

provisionSwiftServer() {
  oldDir=$(pwd)
  cd sirf-dev/opensirf-swift
  vagrant up
  cd $oldDir
}

provisionFsServer() {
  oldDir=$(pwd)
  cd sirf-dev/opensirf-fs
  vagrant up
  cd $oldDir
}

checkPreReqs
prepare
provisionSirfServer
provisionSwiftServer
provisionFsServer

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


Update ruby to v2.5

Update ruby to v2.5

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


Update `update.sh` URL to use the now preferred URL

#!/bin/bash

(
	set -e

	JRUBY_VERSION=$(< VERSION)
	SHA="$(curl -SLfs https://repo1.maven.org/maven2/org/jruby/jruby-dist/${JRUBY_VERSION}/jruby-dist-${JRUBY_VERSION}-bin.tar.gz.sha256)"
	SHA=$(printf '%s' ${SHA})

	for i in $(ls); do
		if [ -d "$i" ]; then
			echo setting version on "$i/Dockerfile"
			sed -i "s/ENV\ JRUBY_VERSION.*/ENV JRUBY_VERSION ${JRUBY_VERSION}/" "$i/Dockerfile"
			sed -i "s/ENV\ JRUBY_SHA256.*/ENV JRUBY_SHA256 ${SHA}/" "$i/Dockerfile"
		fi
	done

	echo versions updated to $JRUBY_VERSION @ $SHA
)

#!/bin/bash

(
	set -e

	JRUBY_VERSION=$(< VERSION)
	SHA="$(curl -SLfs https://s3.amazonaws.com/jruby.org/downloads/${JRUBY_VERSION}/jruby-bin-${JRUBY_VERSION}.tar.gz.sha256)"
	SHA=$(printf '%s' ${SHA})

	for i in $(ls); do
		if [ -d "$i" ]; then
			echo setting version on "$i/Dockerfile"
			sed -i "s/ENV\ JRUBY_VERSION.*/ENV JRUBY_VERSION ${JRUBY_VERSION}/" "$i/Dockerfile"
			sed -i "s/ENV\ JRUBY_SHA256.*/ENV JRUBY_SHA256 ${SHA}/" "$i/Dockerfile"
		fi
	done

	echo versions updated to $JRUBY_VERSION @ $SHA
)


add diff checking script

add diff checking script

#!/bin/bash
version=$1

#cleanup
rm -rf openjdk-git openjdk-hg

git clone -b master "https://github.com/AdoptOpenJDK/openjdk-$version.git" openjdk-git || exit 1
hg clone "http://hg.openjdk.java.net/$version/$version" openjdk-hg || exit 1

cd openjdk-hg
bash get_source.sh
cd -

diffNum=`diff -rq openjdk-git openjdk-hg -x '.git' -x '.hg' -x '.hgtags' | grep 'only in' | wc -l`

if [ $diffNum -gt 0 ]; then
  echo "ERROR - THE DIFF HAS DETECTED UNKNOWN FILES"
  diff -rq openjdk-git openjdk-hg -x '.git' -x '.hg' -x '.hgtags' | grep 'only in' || exit 1
  exit 1
fi

# get latest git tag

cd openjdk-git
gitTag=`git describe --abbrev=0 --tags` || exit 1
cd -

cd openjdk-hg
hgTag=`hg log -r "." --template "{latesttag}\n"` || exit 1
cd -

if [ $gitTag == $hgTag ]; then
  echo "Tags are in sync"
else
  echo "ERROR - THE TAGS ARE NOT IN SYNC"
  exit 1
fi

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


a couple tweaks to the deploy script

a couple tweaks to the deploy script

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


Simple script to generate epydoc in html/

#!/bin/sh

#$@ allows insertion of extra options, e.g --pdf
epydoc -v --name Certain $@ certain

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


added certificate creation helper script

#!/bin/bash
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout karma.shack.key -out karma.shack.crt

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


Muximux configs

Muximux configs

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/cloudy-brain/mediabox.git/'


Initial commit. Taken from working jenkins job for ubuntu 12.04.

#!/bin/bash

function clone_and_update {
    set -x
    if [ ! -d "$2" ]; then
        git clone "$1"
    fi
    cd $2
    git remote update
    git checkout $3
    git pull origin $3
    cd ..
}

# Clone fresh repos
clone_and_update https://github.com/openstack/diskimage-builder.git diskimage-builder master
clone_and_update https://github.com/openstack/dib-utils dib-utils master
clone_and_update https://github.com/openstack/heat-templates heat-templates master
clone_and_update https://github.com/openstack/tripleo-image-elements.git tripleo-image-elements stable/icehouse

# Where to find dib-run-parts
export PATH="$PATH:${PWD}/dib-utils/bin"

# Where to find elements that do not come with diskimage-builder
export ELEMENTS_PATH="${PWD}/tripleo-image-elements/elements:${PWD}/heat-templates/hot/software-config/elements"

# Indicate data should come from ConfigDrive
export DIB_CLOUD_INIT_DATASOURCES="ConfigDrive"

# Indicate what release
export DIB_RELEASE="precise"

echo "Elements Path: ${ELEMENTS_PATH}"

diskimage-builder/bin/disk-image-create vm \
  ubuntu \
  heat-config \
  cloud-init-datasources \
  os-collect-config \
  os-refresh-config \
  os-apply-config \
  heat-config-cfn-init \
  heat-config-script \
 -o images/ubuntu-${DIB_RELEASE}-heat-elements.qcow2


Upgrade to newer source-map (same as what node-source-map-support uses).

#!/bin/bash

set -e
set -u

UNAME=$(uname)
ARCH=$(uname -m)

if [ "$UNAME" == "Linux" ] ; then
    if [ "$ARCH" != "i686" -a "$ARCH" != "x86_64" ] ; then
        echo "Unsupported architecture: $ARCH"
        echo "Meteor only supports i686 and x86_64 for now."
        exit 1
    fi

    MONGO_OS="linux"

    stripBinary() {
        strip --remove-section=.comment --remove-section=.note $1
    }
elif [ "$UNAME" == "Darwin" ] ; then
    SYSCTL_64BIT=$(sysctl -n hw.cpu64bit_capable 2>/dev/null || echo 0)
    if [ "$ARCH" == "i386" -a "1" != "$SYSCTL_64BIT" ] ; then
        # some older macos returns i386 but can run 64 bit binaries.
        # Probably should distribute binaries built on these machines,
        # but it should be OK for users to run.
        ARCH="x86_64"
    fi

    if [ "$ARCH" != "x86_64" ] ; then
        echo "Unsupported architecture: $ARCH"
        echo "Meteor only supports x86_64 for now."
        exit 1
    fi

    MONGO_OS="osx"

    # We don't strip on Mac because we don't know a safe command. (Can't strip
    # too much because we do need node to be able to load objects like
    # fibers.node.)
    stripBinary() {
        true
    }
else
    echo "This OS not yet supported"
    exit 1
fi

PLATFORM="${UNAME}_${ARCH}"

# save off meteor checkout dir as final target
cd `dirname $0`/..
TARGET_DIR=`pwd`

# Read the bundle version from the meteor shell script.
BUNDLE_VERSION=$(perl -ne 'print $1 if /BUNDLE_VERSION=(\S+)/' meteor)
if [ -z "$BUNDLE_VERSION" ]; then
    echo "BUNDLE_VERSION not found"
    exit 1
fi
echo "Building dev bundle $BUNDLE_VERSION"

DIR=`mktemp -d -t generate-dev-bundle-XXXXXXXX`
trap 'rm -rf "$DIR" >/dev/null 2>&1' 0

echo BUILDING IN "$DIR"

cd "$DIR"
chmod 755 .
umask 022
mkdir build
cd build

git clone git://github.com/joyent/node.git
cd node
# When upgrading node versions, also update the values of MIN_NODE_VERSION at
# the top of tools/meteor.js and tools/server/server.js.
git checkout v0.8.24

./configure --prefix="$DIR"
make -j4
make install PORTABLE=1
# PORTABLE=1 is a node hack to make npm look relative to itself instead
# of hard coding the PREFIX.

# export path so we use our new node for later builds
export PATH="$DIR/bin:$PATH"

which node

which npm

# When adding new node modules (or any software) to the dev bundle,
# remember to update LICENSE.txt! Also note that we include all the
# packages that these depend on, so watch out for new dependencies when
# you update version numbers.

cd "$DIR/lib/node_modules"
npm install optimist@0.3.5
npm install semver@1.1.0
npm install handlebars@1.0.7
npm install clean-css@0.8.3
npm install request@2.12.0
npm install keypress@0.1.0
npm install http-proxy@0.10.1  # not 0.10.2, which contains a sketchy websocket change
npm install underscore@1.4.4
npm install fstream@0.1.21
npm install tar@0.1.14
npm install kexec@0.1.1
npm install shell-quote@0.0.1
npm install byline@2.0.3
npm install source-map@0.1.24

# Fork of node-source-map-support which allows us to specify our own
# retrieveSourceMap function.
# XXX send a pull request
npm install https://github.com/meteor/node-source-map-support/tarball/3b90243e6b51a2ff8705acd74b62c09df05a6199

# uglify-js has a bug which drops 'undefined' in arrays:
# https://github.com/mishoo/UglifyJS2/pull/97
npm install https://github.com/meteor/UglifyJS2/tarball/aa5abd14d3

# progress 0.1.0 has a regression where it opens stdin and thus does not
# allow the node process to exit cleanly. See
# https://github.com/visionmedia/node-progress/issues/19
npm install progress@0.0.5

# If you update the version of fibers in the dev bundle, also update the "npm
# install" command in docs/client/concepts.html and in the README in
# app/lib/bundler.js.
npm install fibers@1.0.0
# Fibers ships with compiled versions of its C code for a dozen platforms. This
# bloats our dev bundle, and confuses dpkg-buildpackage and rpmbuild into
# thinking that the packages need to depend on both 32- and 64-bit versions of
# libstd++. Remove all the ones other than our architecture. (Expression based
# on build.js in fibers source.)
FIBERS_ARCH=$(node -p -e 'process.platform + "-" + process.arch + "-v8-" + /[0-9]+\.[0-9]+/.exec(process.versions.v8)[0]')
cd fibers/bin
mv $FIBERS_ARCH ..
rm -rf *
mv ../$FIBERS_ARCH .
cd ../..

# Checkout and build mongodb.
# We want to build a binary that includes SSL support but does not depend on a
# particular version of openssl on the host system.

cd "$DIR/build"
OPENSSL="openssl-1.0.1e"
OPENSSL_URL="http://www.openssl.org/source/$OPENSSL.tar.gz"
wget $OPENSSL_URL || curl -O $OPENSSL_URL
tar xzf $OPENSSL.tar.gz

cd $OPENSSL
if [ "$UNAME" == "Linux" ]; then
    ./config --prefix="$DIR/build/openssl-out" no-shared
else
    # This configuration line is taken from Homebrew formula:
    # https://github.com/mxcl/homebrew/blob/master/Library/Formula/openssl.rb
    ./Configure no-shared zlib-dynamic --prefix="$DIR/build/openssl-out" darwin64-x86_64-cc enable-ec_nistp_64_gcc_128
fi
make install

# To see the mongo changelog, go to http://www.mongodb.org/downloads,
# click 'changelog' under the current version, then 'release notes' in
# the upper right.
cd "$DIR/build"
MONGO_VERSION="2.4.4"

# We use Meteor fork since we added some changes to the building script.
# Our patches allow us to link most of the libraries statically.
git clone git://github.com/meteor/mongo.git
cd mongo
git checkout ssl-r$MONGO_VERSION

# Compile

MONGO_FLAGS="--ssl --release "
MONGO_FLAGS+="--cpppath $DIR/build/openssl-out/include --libpath $DIR/build/openssl-out/lib "

if [ "$MONGO_OS" == "osx" ]; then
    # NOTE: '--64' option breaks the compilation, even it is on by default on x64 mac: https://jira.mongodb.org/browse/SERVER-5575
    MONGO_FLAGS+="-j4 "
    MONGO_FLAGS+="--openssl $DIR/build/openssl-out/lib "
    /usr/local/bin/scons $MONGO_FLAGS mongo mongod
elif [ "$MONGO_OS" == "linux" ]; then
    MONGO_FLAGS+="-j2 --no-glibc-check --prefix=./ "
    if [ "$ARCH" == "x86_64" ]; then
      MONGO_FLAGS+="--64"
    fi
    scons $MONGO_FLAGS mongo mongod
else
    echo "We don't know how to compile mongo for this platform"
    exit 1
fi

# Copy binaries
mkdir -p "$DIR/mongodb/bin"
cp mongo "$DIR/mongodb/bin/"
cp mongod "$DIR/mongodb/bin/"

# Copy mongodb distribution information
find ./distsrc -maxdepth 1 -type f -exec cp '{}' ../mongodb \;

cd "$DIR"
stripBinary bin/node
stripBinary mongodb/bin/mongo
stripBinary mongodb/bin/mongod

echo BUNDLING

cd "$DIR"
echo "${BUNDLE_VERSION}" > .bundle_version.txt
rm -rf build

tar czf "${TARGET_DIR}/dev_bundle_${PLATFORM}_${BUNDLE_VERSION}.tar.gz" .

echo DONE

#!/bin/bash

set -e
set -u

UNAME=$(uname)
ARCH=$(uname -m)

if [ "$UNAME" == "Linux" ] ; then
    if [ "$ARCH" != "i686" -a "$ARCH" != "x86_64" ] ; then
        echo "Unsupported architecture: $ARCH"
        echo "Meteor only supports i686 and x86_64 for now."
        exit 1
    fi

    MONGO_OS="linux"

    stripBinary() {
        strip --remove-section=.comment --remove-section=.note $1
    }
elif [ "$UNAME" == "Darwin" ] ; then
    SYSCTL_64BIT=$(sysctl -n hw.cpu64bit_capable 2>/dev/null || echo 0)
    if [ "$ARCH" == "i386" -a "1" != "$SYSCTL_64BIT" ] ; then
        # some older macos returns i386 but can run 64 bit binaries.
        # Probably should distribute binaries built on these machines,
        # but it should be OK for users to run.
        ARCH="x86_64"
    fi

    if [ "$ARCH" != "x86_64" ] ; then
        echo "Unsupported architecture: $ARCH"
        echo "Meteor only supports x86_64 for now."
        exit 1
    fi

    MONGO_OS="osx"

    # We don't strip on Mac because we don't know a safe command. (Can't strip
    # too much because we do need node to be able to load objects like
    # fibers.node.)
    stripBinary() {
        true
    }
else
    echo "This OS not yet supported"
    exit 1
fi

PLATFORM="${UNAME}_${ARCH}"

# save off meteor checkout dir as final target
cd `dirname $0`/..
TARGET_DIR=`pwd`

# Read the bundle version from the meteor shell script.
BUNDLE_VERSION=$(perl -ne 'print $1 if /BUNDLE_VERSION=(\S+)/' meteor)
if [ -z "$BUNDLE_VERSION" ]; then
    echo "BUNDLE_VERSION not found"
    exit 1
fi
echo "Building dev bundle $BUNDLE_VERSION"

DIR=`mktemp -d -t generate-dev-bundle-XXXXXXXX`
trap 'rm -rf "$DIR" >/dev/null 2>&1' 0

echo BUILDING IN "$DIR"

cd "$DIR"
chmod 755 .
umask 022
mkdir build
cd build

git clone git://github.com/joyent/node.git
cd node
# When upgrading node versions, also update the values of MIN_NODE_VERSION at
# the top of tools/meteor.js and tools/server/server.js.
git checkout v0.8.24

./configure --prefix="$DIR"
make -j4
make install PORTABLE=1
# PORTABLE=1 is a node hack to make npm look relative to itself instead
# of hard coding the PREFIX.

# export path so we use our new node for later builds
export PATH="$DIR/bin:$PATH"

which node

which npm

# When adding new node modules (or any software) to the dev bundle,
# remember to update LICENSE.txt! Also note that we include all the
# packages that these depend on, so watch out for new dependencies when
# you update version numbers.

cd "$DIR/lib/node_modules"
npm install optimist@0.3.5
npm install semver@1.1.0
npm install handlebars@1.0.7
npm install clean-css@0.8.3
npm install request@2.12.0
npm install keypress@0.1.0
npm install http-proxy@0.10.1  # not 0.10.2, which contains a sketchy websocket change
npm install underscore@1.4.4
npm install fstream@0.1.21
npm install tar@0.1.14
npm install kexec@0.1.1
npm install shell-quote@0.0.1
npm install byline@2.0.3
npm install source-map@0.1.22

# Fork of node-source-map-support which allows us to specify our own
# retrieveSourceMap function.
# XXX send a pull request
npm install https://github.com/meteor/node-source-map-support/tarball/3b90243e6b51a2ff8705acd74b62c09df05a6199

# uglify-js has a bug which drops 'undefined' in arrays:
# https://github.com/mishoo/UglifyJS2/pull/97
npm install https://github.com/meteor/UglifyJS2/tarball/aa5abd14d3

# progress 0.1.0 has a regression where it opens stdin and thus does not
# allow the node process to exit cleanly. See
# https://github.com/visionmedia/node-progress/issues/19
npm install progress@0.0.5

# If you update the version of fibers in the dev bundle, also update the "npm
# install" command in docs/client/concepts.html and in the README in
# app/lib/bundler.js.
npm install fibers@1.0.0
# Fibers ships with compiled versions of its C code for a dozen platforms. This
# bloats our dev bundle, and confuses dpkg-buildpackage and rpmbuild into
# thinking that the packages need to depend on both 32- and 64-bit versions of
# libstd++. Remove all the ones other than our architecture. (Expression based
# on build.js in fibers source.)
FIBERS_ARCH=$(node -p -e 'process.platform + "-" + process.arch + "-v8-" + /[0-9]+\.[0-9]+/.exec(process.versions.v8)[0]')
cd fibers/bin
mv $FIBERS_ARCH ..
rm -rf *
mv ../$FIBERS_ARCH .
cd ../..

# Checkout and build mongodb.
# We want to build a binary that includes SSL support but does not depend on a
# particular version of openssl on the host system.

cd "$DIR/build"
OPENSSL="openssl-1.0.1e"
OPENSSL_URL="http://www.openssl.org/source/$OPENSSL.tar.gz"
wget $OPENSSL_URL || curl -O $OPENSSL_URL
tar xzf $OPENSSL.tar.gz

cd $OPENSSL
if [ "$UNAME" == "Linux" ]; then
    ./config --prefix="$DIR/build/openssl-out" no-shared
else
    # This configuration line is taken from Homebrew formula:
    # https://github.com/mxcl/homebrew/blob/master/Library/Formula/openssl.rb
    ./Configure no-shared zlib-dynamic --prefix="$DIR/build/openssl-out" darwin64-x86_64-cc enable-ec_nistp_64_gcc_128
fi
make install

# To see the mongo changelog, go to http://www.mongodb.org/downloads,
# click 'changelog' under the current version, then 'release notes' in
# the upper right.
cd "$DIR/build"
MONGO_VERSION="2.4.4"

# We use Meteor fork since we added some changes to the building script.
# Our patches allow us to link most of the libraries statically.
git clone git://github.com/meteor/mongo.git
cd mongo
git checkout ssl-r$MONGO_VERSION

# Compile

MONGO_FLAGS="--ssl --release "
MONGO_FLAGS+="--cpppath $DIR/build/openssl-out/include --libpath $DIR/build/openssl-out/lib "

if [ "$MONGO_OS" == "osx" ]; then
    # NOTE: '--64' option breaks the compilation, even it is on by default on x64 mac: https://jira.mongodb.org/browse/SERVER-5575
    MONGO_FLAGS+="-j4 "
    MONGO_FLAGS+="--openssl $DIR/build/openssl-out/lib "
    /usr/local/bin/scons $MONGO_FLAGS mongo mongod
elif [ "$MONGO_OS" == "linux" ]; then
    MONGO_FLAGS+="-j2 --no-glibc-check --prefix=./ "
    if [ "$ARCH" == "x86_64" ]; then
      MONGO_FLAGS+="--64"
    fi
    scons $MONGO_FLAGS mongo mongod
else
    echo "We don't know how to compile mongo for this platform"
    exit 1
fi

# Copy binaries
mkdir -p "$DIR/mongodb/bin"
cp mongo "$DIR/mongodb/bin/"
cp mongod "$DIR/mongodb/bin/"

# Copy mongodb distribution information
find ./distsrc -maxdepth 1 -type f -exec cp '{}' ../mongodb \;

cd "$DIR"
stripBinary bin/node
stripBinary mongodb/bin/mongo
stripBinary mongodb/bin/mongod

echo BUNDLING

cd "$DIR"
echo "${BUNDLE_VERSION}" > .bundle_version.txt
rm -rf build

tar czf "${TARGET_DIR}/dev_bundle_${PLATFORM}_${BUNDLE_VERSION}.tar.gz" .

echo DONE


Add script.

Add script.

#!/bin/sh
# Open a LUKS device, activate an LVM volume group if there is one, and mount a partition.
# If partition is already mounted, unmount, deactivate and close the device.
# Partition is assumed to be in /etc/fstab and mount point in /mnt/name.

name="$1" # Name of mountpoint and LUKS mapping.
md_uuid="$2" # UUID of the md device.
vg_name="$3" # Optional name of LVM volume group.

if [ "$(mount | grep $name)" ] || [ "$(dmsetup ls | grep $name)" ];
then
    umount /mnt/$name 2>/dev/null || echo Nothing to unmount.
    [ ! "$vg_name" ] || vgchange -an $vg_name 2>/dev/null || echo Volume group $vg_name not found, nothing to deactivate.
    cryptsetup close $name && echo Removed LUKS mapping $name.
    exit
fi

dev=$(blkid /dev/md/* | grep $md_uuid | cut -f 1 -d ':')
[ ! "$dev" ] && echo "Device not found." && exit 1

keyopts=""
keyfile=/mnt/"$name"_key
[ -e $keyfile ] && keyopts="--key-file $keyfile"
cryptsetup open $dev $name $keyopts && echo Created LUKS mapping $name.
[ "$vg_name" ] && pvscan --cache --activate ay $(realpath /dev/mapper/$name) && echo Activated volume group $vg_name.
mount /mnt/$name && [ "$(mount | grep $name)" ] && echo Mounted $name. || echo Failed to mount $name.

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


Removed the force flag.

Removed the force flag.

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/altamiracorp/honeycomb.git/'


Fixed detection functions display for SecurePlatform

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/seiruss/policy-debug.git/'


Create build-server.sh

Create build-server.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/mplusmuseum/mplusmuseum-stories.git/'


Update alias to use nvim

Update alias to use nvim

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


Added policystat zsh file

Added policystat zsh file

# PolicyStat env variables and aliases
#

export PSTAT_DEPLOY=~/Documents/deployment_data
export VAGRANT_VBOX_GUI=1
export PSTAT_DIR=~/Documents/PolicyStat
export VAGRANT_DEFAULT_PROVIDER='docker'

alias vserver="cd $POLICY_STAT_DIR && vagrant ssh dev -c 'gnome-terminal -x ~/PolicyStat/pstat/manage.py runserver'"
alias vcelery="cd $POLICY_STAT_DIR; vagrant ssh dev -c 'gnome-terminal -x ~/PolicyStat/pstat/manage.py celeryd -Q celery_medium --concurrency 2 --loglevel=DEBUG'"
alias vssh="cd $POLICY_STAT_DIR && vagrant ssh dev"
alias vcd="cd $POLICY_STAT_DIR"
alias vup="vcd; vagrant up dev"
alias vhalt="vcd; vagrant halt dev"

alias vbash="docker run -t -i --link mysql:mysql --link redis:redis -v $POLICY_STAT_DIR:/home/vagrant/PolicyStat cshinaver/policystat:dev_base bash"
source virtualenvwrapper.sh

vcmd () {
    python $PSTAT_DIR/docker/vcmd.py $*
}

vtest () {
    vssh -c "~/PolicyStat/scripts/run_tests.py --django-sqlite $1"
}
vstest () {
    vssh -c "~/PolicyStat/scripts/run_selenium_tests.py $1"
}
vworkflow () {
    vssh -c "cd ~/PolicyStat; ~/PolicyStat/scripts/workflow.py $1 $2"
}
alias current_test='vtest pstat.administration.tests.test_views:CategoryCSVDownloadTestCase.test_round_trip_with_data'
vrdb () {
    vssh -c "telnet localhost $1"
}
vdeploybeta () {
    vssh -c "cd ~/PolicyStat/pstat; fab deploy:beta active up"
}

docker_clean_containers () {
    # Stop and remove all docker containers
    docker stop $(docker ps -a -q)

    # Remove Docker containers
    sudo docker ps -a -q | xargs -n 1 -I {} sudo docker rm {}
}

docker_clean_all () {

    # Stop and remove all docker containers
    docker stop $(docker ps -a -q)

    # Remove Docker containers
    sudo docker ps -a -q | xargs -n 1 -I {} sudo docker rm {}

    # Remove Docker images
    sudo docker rmi $( sudo docker images | grep '<none>' | tr -s ' ' | cut -d ' ' -f 3)
}

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


commit only for graph_opt

commit only for graph_opt

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/ildoonet/tf-openpose.git/'


Add deployment script ned to replace with puppet

#!/usr/bin/env bash
branch="tornado-backend"

echo "Deploying for production..."
git status
git pull origin ${branch}
webpack --context ./map_system/static/map_system/local/libraries/  --config ./map_system/static/map_system/local/libraries/webpack.config.js
python3.5 manage.py collectstatic --noinput -i node_modules
sudo systemctl restart apache2.service
echo "All done"

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


Align 6-week cycle check with beta promotion instead of stable release.

The regression check is to make beta promotion easier, so it makes more
sense to use the Tuesday of the release week (T-2) as the end point of the
regression prevention, instead of Thursday (T-0). But since the beta
promotion PR is sent at Tuesday evening at UTC, the protection should
include the whole Tuesday as well, meaning the 6-week cycle will start from
Wednesdays.

This will also move the start of the regression protection week one day
earlier.

#!/bin/sh

# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.

set -eu

X_PY="$1"
TOOLSTATE_FILE="$(realpath $2)"
OS="$3"
COMMIT="$(git rev-parse HEAD)"
CHANGED_FILES="$(git diff --name-status HEAD HEAD^)"
SIX_WEEK_CYCLE="$(( ($(date +%s) / 86400 - 20) % 42 ))"
# ^ Number of days after the last promotion of beta.
#   Its value is 41 on the Tuesday where "Promote master to beta (T-2)" happens.
#   The Wednesday after this has value 0.
#   We track this value to prevent regressing tools in the last week of the 6-week cycle.

touch "$TOOLSTATE_FILE"

# Try to test all the tools and store the build/test success in the TOOLSTATE_FILE

set +e
python2.7 "$X_PY" test --no-fail-fast \
    src/doc/book \
    src/doc/nomicon \
    src/doc/reference \
    src/doc/rust-by-example \
    src/tools/clippy \
    src/tools/rls \
    src/tools/rustfmt \
    src/tools/miri \

set -e

cat "$TOOLSTATE_FILE"
echo

# This function checks that if a tool's submodule changed, the tool's state must improve
verify_status() {
    echo "Verifying status of $1..."
    if echo "$CHANGED_FILES" | grep -q "^M[[:blank:]]$2$"; then
        echo "This PR updated '$2', verifying if status is 'test-pass'..."
        if grep -vq '"'"$1"'":"test-pass"' "$TOOLSTATE_FILE"; then
            echo
            echo "⚠ We detected that this PR updated '$1', but its tests failed."
            echo
            echo "If you do intend to update '$1', please check the error messages above and"
            echo "commit another update."
            echo
            echo "If you do NOT intend to update '$1', please ensure you did not accidentally"
            echo "change the submodule at '$2'. You may ask your reviewer for the"
            echo "proper steps."
            exit 3
        fi
    fi
}

# deduplicates the submodule check and the assertion that on beta some tools MUST be passing
check_dispatch() {
    if [ "$1" = submodule_changed ]; then
        # ignore $2 (branch id)
        verify_status $3 $4
    elif [ "$2" = beta ]; then
        echo "Requiring test passing for $3..."
        if grep -q '"'"$3"'":"\(test\|build\)-fail"' "$TOOLSTATE_FILE"; then
            exit 4
        fi
    fi
}

# list all tools here
status_check() {
    check_dispatch $1 beta book src/doc/book
    check_dispatch $1 beta nomicon src/doc/nomicon
    check_dispatch $1 beta reference src/doc/reference
    check_dispatch $1 beta rust-by-example src/doc/rust-by-example
    check_dispatch $1 beta rls src/tools/rls
    check_dispatch $1 beta rustfmt src/tools/rustfmt
    check_dispatch $1 beta clippy-driver src/tools/clippy
    # these tools are not required for beta to successfully branch
    check_dispatch $1 nightly miri src/tools/miri
}

# If this PR is intended to update one of these tools, do not let the build pass
# when they do not test-pass.

status_check "submodule_changed"

CHECK_NOT="$(readlink -f "$(dirname $0)/checkregression.py")"
change_toolstate() {
    # only update the history
    if python2.7 "$CHECK_NOT" "$OS" "$TOOLSTATE_FILE" "_data/latest.json" changed; then
        echo 'Toolstate is not changed. Not updating.'
    else
        if [ $SIX_WEEK_CYCLE -ge 35 ]; then
            python2.7 "$CHECK_NOT" "$OS" "$TOOLSTATE_FILE" "_data/latest.json" regressed
        fi
        sed -i "1 a\\
$COMMIT\t$(cat "$TOOLSTATE_FILE")
" "history/$OS.tsv"
    fi
}

if [ "$RUST_RELEASE_CHANNEL" = nightly ]; then
    if [ -n "${TOOLSTATE_REPO_ACCESS_TOKEN+is_set}" ]; then
        . "$(dirname $0)/repo.sh"
        MESSAGE_FILE=$(mktemp -t msg.XXXXXX)
        echo "($OS CI update)" > "$MESSAGE_FILE"
        commit_toolstate_change "$MESSAGE_FILE" change_toolstate
        rm -f "$MESSAGE_FILE"
    fi
    exit 0
fi

# abort compilation if an important tool doesn't build
# (this code is reachable if not on the nightly channel)
status_check "beta_required"

#!/bin/sh

# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.

set -eu

X_PY="$1"
TOOLSTATE_FILE="$(realpath $2)"
OS="$3"
COMMIT="$(git rev-parse HEAD)"
CHANGED_FILES="$(git diff --name-status HEAD HEAD^)"
SIX_WEEK_CYCLE="$(( ($(date +%s) / 604800 - 3) % 6 ))"
# ^ 1970 Jan 1st is a Thursday, and our release dates are also on Thursdays,
#   thus we could divide by 604800 (7 days in seconds) directly.

touch "$TOOLSTATE_FILE"

# Try to test all the tools and store the build/test success in the TOOLSTATE_FILE

set +e
python2.7 "$X_PY" test --no-fail-fast \
    src/doc/book \
    src/doc/nomicon \
    src/doc/reference \
    src/doc/rust-by-example \
    src/tools/clippy \
    src/tools/rls \
    src/tools/rustfmt \
    src/tools/miri \

set -e

cat "$TOOLSTATE_FILE"
echo

# This function checks that if a tool's submodule changed, the tool's state must improve
verify_status() {
    echo "Verifying status of $1..."
    if echo "$CHANGED_FILES" | grep -q "^M[[:blank:]]$2$"; then
        echo "This PR updated '$2', verifying if status is 'test-pass'..."
        if grep -vq '"'"$1"'":"test-pass"' "$TOOLSTATE_FILE"; then
            echo
            echo "⚠ We detected that this PR updated '$1', but its tests failed."
            echo
            echo "If you do intend to update '$1', please check the error messages above and"
            echo "commit another update."
            echo
            echo "If you do NOT intend to update '$1', please ensure you did not accidentally"
            echo "change the submodule at '$2'. You may ask your reviewer for the"
            echo "proper steps."
            exit 3
        fi
    fi
}

# deduplicates the submodule check and the assertion that on beta some tools MUST be passing
check_dispatch() {
    if [ "$1" = submodule_changed ]; then
        # ignore $2 (branch id)
        verify_status $3 $4
    elif [ "$2" = beta ]; then
        echo "Requiring test passing for $3..."
        if grep -q '"'"$3"'":"\(test\|build\)-fail"' "$TOOLSTATE_FILE"; then
            exit 4
        fi
    fi
}

# list all tools here
status_check() {
    check_dispatch $1 beta book src/doc/book
    check_dispatch $1 beta nomicon src/doc/nomicon
    check_dispatch $1 beta reference src/doc/reference
    check_dispatch $1 beta rust-by-example src/doc/rust-by-example
    check_dispatch $1 beta rls src/tools/rls
    check_dispatch $1 beta rustfmt src/tools/rustfmt
    check_dispatch $1 beta clippy-driver src/tools/clippy
    # these tools are not required for beta to successfully branch
    check_dispatch $1 nightly miri src/tools/miri
}

# If this PR is intended to update one of these tools, do not let the build pass
# when they do not test-pass.

status_check "submodule_changed"

CHECK_NOT="$(readlink -f "$(dirname $0)/checkregression.py")"
change_toolstate() {
    # only update the history
    if python2.7 "$CHECK_NOT" "$OS" "$TOOLSTATE_FILE" "_data/latest.json" changed; then
        echo 'Toolstate is not changed. Not updating.'
    else
        if [ $SIX_WEEK_CYCLE -eq 5 ]; then
            python2.7 "$CHECK_NOT" "$OS" "$TOOLSTATE_FILE" "_data/latest.json" regressed
        fi
        sed -i "1 a\\
$COMMIT\t$(cat "$TOOLSTATE_FILE")
" "history/$OS.tsv"
    fi
}

if [ "$RUST_RELEASE_CHANNEL" = nightly ]; then
    if [ -n "${TOOLSTATE_REPO_ACCESS_TOKEN+is_set}" ]; then
        . "$(dirname $0)/repo.sh"
        MESSAGE_FILE=$(mktemp -t msg.XXXXXX)
        echo "($OS CI update)" > "$MESSAGE_FILE"
        commit_toolstate_change "$MESSAGE_FILE" change_toolstate
        rm -f "$MESSAGE_FILE"
    fi
    exit 0
fi

# abort compilation if an important tool doesn't build
# (this code is reachable if not on the nightly channel)
status_check "beta_required"