#!/bin/bash

set -eu

# installers
# setup HomeBrew
echo "setup homebrew"
./installers/homebrew.sh

# restore via mackfile
if [ ! -e "~/.mackup.cfg" ]; then
  echo 'Setup Mackup'
  cat <<EOF > ~/.mackup.cfg
[storage]
engine = icloud
[applications_to_ignore]
ssh
EOF
fi
cd $HOME
mackup restore -f

# rbenv
echo "setup ruby"
RUBYS=(2.0.0-p481 2.3.6 2.4.0 2.4.2 2.5.3 2.6.3 2.6.5)
for item in ${RUBYS[@]}; do
  rbenv install $item
done

# nodebrew
echo "setup node"
curl -L git.io/nodebrew | perl - setup
export PATH=$HOME/.nodebrew/current/bin:$PATH
NODES=(v5.10.0 v6.1.0 v6.9.5 v6.15.0 v12.3.1 v12.11.1 v12.12.0 v13.9.0 )
for item in ${NODES[@]}; do
  nodebrew install $item
done

# python系
echo "setup python"
#PYTHONS=(3.7.0)
#for item in ${PYTHONS[@]}; do
#  pyenv install $item
#done

# 時計アイコンクリック時にOSやホスト名ipを表示する
sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName

# Bluetoothヘッドフォン/ヘッドセットの音質を向上させる
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40

# デフォルトで隠しファイルを表示する
defaults write com.apple.finder AppleShowAllFiles -bool true

# ステータスバーを表示
defaults write com.apple.finder ShowStatusBar -bool true

# パスバーを表示
defaults write com.apple.finder ShowPathbar -bool true

# 拡張子変更時の警告を無効化
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false

# 全ての拡張子のファイルを表示
defaults write NSGlobalDomain AppleShowAllExtensions -bool true

# USBやネットワークストレージに.DS_Storeファイルを作成しない
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true

# Show the ~/Library folder
chflags nohidden ~/Library

# 検索クエリをAppleへ送信しない
defaults write com.apple.Safari UniversalSearchEnabled -bool false
defaults write com.apple.Safari SuppressSearchSuggestions -bool true

# アドレスバーに表示されるURLを全表示
defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true

# ファイルのダウンロード後に自動でファイルを開くのを無効化
defaults write com.apple.Safari AutoOpenSafeDownloads -bool false

# 追跡を無効化
defaults write com.apple.Safari SendDoNotTrackHTTPHeader -bool true

# ターミナル終了時のプロンプトを非表示にする
defaults write com.googlecode.iterm2 PromptOnQuit -bool false

# Dockで開いているアプリケーションのインジケータライトを表示する
defaults write com.apple.dock show-process-indicators -bool true

# 開いているアプリケーションのみをdockに表示
defaults write com.apple.dock static-only -bool true

# アプリケーション起動時のアニメーションを無効化
defaults write com.apple.dock launchanim -bool false

# すべての（デフォルトの）アプリアイコンをDockから消去する
defaults write com.apple.dock persistent-apps -array

# 自動で
defaults write com.apple.dock autohide -bool true

# ゴミ箱を空にする前の警告の無効化
defaults write com.apple.finder WarnOnEmptyTrash -bool false

# メインディスクのインデックスの有効化
sudo mdutil -i on / > /dev/null

# インデックスの再構築
sudo mdutil -E / > /dev/null

# tabキーでWebページの項目の強調
defaults write com.apple.Safari WebKitTabToLinksPreferenceKey -bool true
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks -bool true

# Safariのデバッグメニューを有効化
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true

# 自動修正の無効化
defaults write com.apple.Safari WebAutomaticSpellingCorrectionEnabled -bool false

# ステータスバー
defaults write com.apple.Safari ShowStatusBar -boolean YES

# UTF-8のみを使用する
defaults write com.apple.terminal StringEncodings -array 4

# WebKitデベロッパーツールを有効にする
defaults write com.apple.appstore WebKitDeveloperExtras -bool true

# デバッグメニューを有効にする
defaults write com.apple.appstore ShowDebugMenu -bool true

# 自動更新チェックを有効にする
defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true

# 毎日アプリケーションのアップデートを確認する
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1

# AUDIO MIDI 設定でスピーカーを96Khzにする
/usr/libexec/PlistBuddy -c "set BuiltInSpeakerDevice:'output streams':0:'sample rate' 96000.000000" /Library/Preferences/Audio/com.apple.audio.DeviceSettings.plist

# iPhone接続時にPhotosが自動で開くのをやめる
defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true

# TimeMachineのCPUプライオリティを上げる
sudo sysctl debug.lowpri_throttle_enabled=0

# Disable the warning when changing a file extension
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false

# show column view as default
defaults write com.apple.Finder FXPreferredViewStyle -string "clmv"

# Allow text selection in Quick Look/Preview
defaults write com.apple.finder QLEnableTextSelection -bool true

# Show Path bar in Finder
defaults write com.apple.finder ShowPathbar -bool true

# Show the ~/Library folder
chflags nohidden ~/Library

# Enabling the Develop menu and the Web Inspector in Safari
defaults write com.apple.Safari IncludeDevelopMenu -bool true
defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true
defaults write com.apple.Safari "com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" -bool true

# Adding a context menu item for showing the Web Inspector in web views
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true

# disable guest user
sudo defaults write /Library/Preferences/com.apple.AppleFileServer guestAccess -bool false
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server AllowGuestAccess -bool false

# show remaining battery time
defaults write com.apple.menuextra.battery ShowPercent -string "YES"

# Set home as the default location for new Finder windows
defaults write com.apple.finder NewWindowTarget -string "PfHm"
defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/"

# Automatically open a new Finder window when a volume is mounted
defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true
defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true
defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true

# Hot corners
# Possible values:
#  0: no-op
#  2: Mission Control
#  3: Show application windows
#  4: Desktop
#  5: Start screen saver
#  6: Disable screen saver
#  7: Dashboard
# 10: Put display to sleep
# 11: Launchpad
# 12: Notification Center
# 13: Lock Screen
# Top left screen corner → Mission Control
# defaults write com.apple.dock wvous-tl-corner -int 2
# defaults write com.apple.dock wvous-tl-modifier -int 0
# # Top right screen corner → Desktop
# defaults write com.apple.dock wvous-tr-corner -int 4
# defaults write com.apple.dock wvous-tr-modifier -int 0
# Bottom left screen corner → Start screen saver
# defaults write com.apple.dock wvous-bl-corner -int 5
# defaults write com.apple.dock wvous-bl-modifier -int 0

# Bottom left screen corner → Desktop
defaults write com.apple.dock wvous-bl-corner -int 4
defaults write com.apple.dock wvous-bl-modifier -int 0

# Privacy: don’t send search queries to Apple
defaults write com.apple.Safari UniversalSearchEnabled -bool false
defaults write com.apple.Safari SuppressSearchSuggestions -bool true

# Press Tab to highlight each item on a web page
defaults write com.apple.Safari WebKitTabToLinksPreferenceKey -bool true
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks -bool true

# Show the full URL in the address bar (note: this still hides the scheme)
defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true

# Disable Safari’s thumbnail cache for History and Top Sites
defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2

# Enable Safari’s debug menu
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true

# Enable the Develop menu and the Web Inspector in Safari
defaults write com.apple.Safari IncludeDevelopMenu -bool true
defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true

# Add a context menu item for showing the Web Inspector in web views
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true

# Enable “Do Not Track”
defaults write com.apple.Safari SendDoNotTrackHTTPHeader -bool true
# Only use UTF-8 in Terminal.app
defaults write com.apple.terminal StringEncodings -array 4

cat << END

**************************************************
DOTFILES SETUP FINISHED! bye.
**************************************************

END


#!/bin/bash -e
${INIT_DEBUG,,} && set -x

# drop files to /init
cp -r /files/* /init

# configure each component
echo "* This pod name is ${THIS_POD_NAME}"
if [[ "${THIS_POD_NAME}" =~ -etcd-[0-9]+$ ]]; then
    echo "* Initialize etcd"
    /init/bin/init-etcd.sh
elif [[ "${THIS_POD_NAME}" =~ -controller-[0-9a-z]+-[0-9a-z]+$ ]]; then
    echo "* Initialize controller"
    /init/bin/init-controller.sh
elif [[ "${THIS_POD_NAME}" =~ -node-[0-9a-z]+$ ]]; then
    echo "* Initialize node"
    /init/bin/init-node.sh
else
    echo "* Failed to identify the component"
    exit 1
fi


#!/bin/bash

bold() {
  echo ". $(tput bold)" "$*" "$(tput sgr0)";
}

err() {
  echo "$*" >&2;
}

bold "Set all vars..."
set -a
  source ./properties
  set +a
set -a
  source .env
  set +a

bold "Starting the setup process in project $PROJECT_ID..."
bold "Enable APIs..."
gcloud services enable \
  appengineflex.googleapis.com \
  containerregistry.googleapis.com \
  cloudbuild.googleapis.com \
  run.googleapis.com \
  cloudtrace.googleapis.com \
  dialogflow.googleapis.com \
  logging.googleapis.com \
  monitoring.googleapis.com \
  sourcerepo.googleapis.com \
  speech.googleapis.com \
  texttospeech.googleapis.com \
  translate.googleapis.com

bold "Creating a service account $SERVICE_ACCOUNT_NAME..."

gcloud iam service-accounts create \
  $SERVICE_ACCOUNT_NAME \
  --display-name $SERVICE_ACCOUNT_NAME

SA_EMAIL=$(gcloud iam service-accounts list --filter="displayName:$SERVICE_ACCOUNT_NAME" --format='value(email)')

if [ -z "$SA_EMAIL" ]; then
  err "Service Account email is empty. Exiting."
fi

bold "Adding policy binding to $SERVICE_ACCOUNT_NAME email: $SA_EMAIL..."
gcloud projects add-iam-policy-binding $PROJECT_ID \
  --member serviceAccount:$SA_EMAIL \
  --role roles/clouddebugger.agent
gcloud projects add-iam-policy-binding $PROJECT_ID \
  --member serviceAccount:$SA_EMAIL \
  --role roles/dialogflow.admin
gcloud projects add-iam-policy-binding $PROJECT_ID \
  --member serviceAccount:$SA_EMAIL \
  --role roles/dialogflow.reader
gcloud projects add-iam-policy-binding $PROJECT_ID \
  --member serviceAccount:$SA_EMAIL \
  --role roles/cloudtranslate.admin
gcloud projects add-iam-policy-binding $PROJECT_ID \
  --member serviceAccount:$SA_EMAIL \
  --role roles/errorreporting.admin
gcloud projects add-iam-policy-binding $PROJECT_ID \
  --member serviceAccount:$SA_EMAIL \
  --role roles/logging.logWriter
gcloud projects add-iam-policy-binding $PROJECT_ID \
  --member serviceAccount:$SA_EMAIL \
  --role roles/iam.serviceAccountKeyAdmin
gcloud projects add-iam-policy-binding $PROJECT_ID \
  --member serviceAccount:$SA_EMAIL \
  --role roles/dns.admin

bold "Saving the key..."
gcloud iam service-accounts keys create ../master.json \
  --iam-account $SERVICE_ACCOUNT_NAME@$PROJECT_ID.iam.gserviceaccount.com

GOOGLE_APPLICATION_CREDENTIALS=../master.json
ACCESS_TOKEN="$(gcloud auth application-default print-access-token)"

bold "Creating Storage bucket..."
gsutil mb gs://$GCLOUD_STORAGE_BUCKET_NAME/

bold "Zipping Intents..."
zip -r dialogflow/airportagent/agent.zip dialogflow/airportagent

bold "Uploading Intents to $GCLOUD_STORAGE_BUCKET_NAME..."
gsutil cp dialogflow/agent/agent.zip gs://$GCLOUD_STORAGE_BUCKET_NAME/

bold "Create a Dialogflow Agent..."
echo $ACCESS_TOKEN

JSONPROD="{\"defaultLanguageCode\":\"en\",\"displayName\":\"$PROD_AGENT_NAME\",\"parent\":\"projects/$PROJECT_ID\",\"timeZone\":\"Europe/Madrid\"}"
curl -H "Content-Type: application/json; charset=utf-8"  \
-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
-d $JSONPROD "https://dialogflow.googleapis.com/v2/projects/$PROJECT_ID/agent"

IMPORTFILES="{\"agentUri\":\"gs://$GCLOUD_STORAGE_BUCKET_NAME/agent.zip\"}"

bold "Import Intents to Prod"
curl -X POST \
-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
-H "Content-Type: application/json; charset=utf-8" \
-d $IMPORTFILES \
https://dialogflow.googleapis.com/v2/projects/$PROJECT_ID/agent:import

KBAIRPORTS = "{\"displayName\": \"Airports\" }"

bold "Caution: Knowledge connector settings are not currently included when exporting, importing, or restoring agents."
curl -X POST \
-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
-H "Content-Type: application/json; charset=utf-8" \
-d $KBAIRPORTS \
https://dialogflow.googleapis.com/v2beta1/projects/$PROJECT_ID/knowledgeBases

bold "Add knowledge bases"
SCHIPHOL = { \"displayName\": \"Airports\", \"mimeType": \"text/html\", \"knowledgeTypes\": \"FAQ\", \"contentUri\": \"https://cloud.google.com/storage/docs/faq\" }"
JFK = { \"displayName\": \"Airports\", \"mimeType": \"text/html\", \"knowledgeTypes\": \"FAQ\", \"contentUri\": \"https://cloud.google.com/storage/docs/faq\" }"
SFO = { \"displayName\": \"Airports\", \"mimeType": \"text/html\", \"knowledgeTypes\": \"FAQ\", \"contentUri\": \"https://cloud.google.com/storage/docs/faq\" }"

bold "Add knowledge bases:"
bold "CAUTION! TODO REQUIRES KB id from previous request!"
curl -X POST \
-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
-H "Content-Type: application/json; charset=utf-8" \
-d $SCHIPHOL \
https://dialogflow.googleapis.com/v2beta1/projects/$PROJECT_ID/knowledgeBases/knowledge-base-id/documents
curl -X POST \
-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
-H "Content-Type: application/json; charset=utf-8" \
-d $JFK \
https://dialogflow.googleapis.com/v2beta1/projects/$PROJECT_ID/knowledgeBases/knowledge-base-id/documents
curl -X POST \
-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
-H "Content-Type: application/json; charset=utf-8" \
-d $SFO \
https://dialogflow.googleapis.com/v2beta1/projects/$PROJECT_ID/knowledgeBases/knowledge-base-id/documents

bold "Deploy with App Engine Flex"
gcloud app deploy

bold "Setup & Deployment complete!"


<reponame>Coreyok96/JB-Topic-Bot
#!/bin/bash

. bot.properties
input=".bot.cfg"
echo "Starting session: $(date "+[%y:%m:%d %T]")">$log
echo "NICK $nick" > $input
echo "USER $user" >> $input

tail -f $input | telnet $server 6667 | while read res
do
  # log the session
  echo "$(date "+[%y:%m:%d %T]")$res" >> $log
  # do things when you see output
  case "$res" in
    # respond to ping requests from the server
    PING*)
      echo "$res" | sed "s/I/O/" >> $input
    ;;
    # for pings on nick/user
    *"005"*)
	  echo "PRIVMSG NickServ :IDENTIFY $password" >> $input
      echo "JOIN #$channel" >> $input
	  sleep 3
	  ./topic.sh &
    ;;
    *)
    ;;
  esac

done


#!/bin/bash

# Default Configuration, You Can Change This.

# Input Your Name / Fansub / Fanshare
default_fansub="SEKAI DOT ID"

# CRF (Constant Rate Factor)
default_quality="25"

# Video Bit
# 8-Bit : yuv444p
# 10-Bit : yuv444p10le
# 12-Bit : yuv444p12le
# 14-Bit : yuv444p14le
# 16-Bit : yuv444p16le
default_pix_fmt="yuv444p"

# ISO 639-2 Language Code
default_lang="ind"

######################################################################
# Warning!. not recommended to change the code below, unless you understand what you are doing
######################################################################

prog="FFSUKI"
ver="Version 0.7"
motto="Make Hardsub Its Easy!"

fansub=$(whiptail --nocancel --title "$prog - $ver" --inputbox \
  "Input Your Name / Your Fansub Name" 20 70 "$default_fansub" \
3>&1 1>&2 2>&3)

vid=$(whiptail --nocancel --title "$prog - $ver" --menu \
  "Choose Video Format" 20 70 10 \
  "libx264" "H264 Video Format. Safest choice for compatibility" \
  "libx265" "H265 Video Format. Next generation video format" \
3>&1 1>&2 2>&3)

res=$(whiptail --nocancel --title "$prog - $ver" --menu \
  "Choose Video Resolution" 20 70 10 \
  "640:360" "nHD" \
  "960:540" "qHD" \
  "1280:720" "HD" \
  "1920:1080" "FHD" \
  "2560:1440" "WQHD" \
  "3840:2160" "UHD" \
3>&1 1>&2 2>&3)

for i in *.mkv; do

echo "make hardsub"
ffmpeg -i "$i" -filter_complex "scale=$res,subtitles='$i'" -c:v $vid -preset veryslow -crf $default_quality -pix_fmt $default_pix_fmt -c:a aac -b:a 384k "$prog-${i%.*}.mp4"
echo "generate crc32 for .mp4"
crc=$(crc32 "$prog-${i%.*}.mp4")
mv "$prog-${i%.*}.mp4" "[${fansub}]-${i%.*}-[$res][$vid][$default_pix_fmt][${crc::8}].mp4"
echo "Add to .tar.xz archive"
tar cf - "[${fansub}]-${i%.*}-[$res][$vid][$default_pix_fmt][${crc::8}].mp4" | xz -z -9 - > "$prog-${i%.*}.tar.xz"
echo "generate crc32 for .tar.xz"
crcxz=$(crc32 "$prog-${i%.*}.tar.xz")
echo "move to output folder"
mv "[${fansub}]-${i%.*}-[$res][$vid][$default_pix_fmt][${crc::8}].mp4" output/"[${fansub}]-${i%.*}-[$res][$vid][$default_pix_fmt][${crc::8}].mp4"
mv "$prog-${i%.*}.tar.xz" output/"[${fansub}]-${i%.*}-[$res][$vid][$default_pix_fmt][${crcxz::8}].tar.xz"
echo "Thank You For Using $prog"
done


<filename>test/greenplum/spouse_example_incremental.bats
../postgresql/spouse_example_incremental.bats


<reponame>RachelKes/Unix-Linux
#!/bin/bash
#
# Prints the value of the variable foo

echo Inside this script, the value of foo is $foo
echo Inside this script, the value of bar is $bar


#!/bin/bash
url=$1
while [ true ]
do
  code=`curl -sL -w "%{http_code}\\n" "$url" -o /dev/null`
  echo "Found code $code"
  if [ "x$code" = "x200" ]
  then
    break
  fi
  sleep 2
done


<reponame>escrichov/dotfiles
#!/usr/bin/env bash

export POSTGRES_CONF="/usr/local/var/postgres/postgresql.conf"
export POSTGRES_LOGS="/usr/local/var/log/postgres.log"
export POSTGRES_LOGS_DIR="/usr/local/var/log"

alias postgres_logs='tail -f ${POSTGRES_LOGS}'
alias postgres_logs_clear='echo -n "" > ${POSTGRES_LOGS}'

# Require install npm install pg.log -g
alias postgres_logs_server='pg.log -p 3000 -d ${POSTGRES_LOGS_DIR}'


<filename>scripts/cleanup.sh<gh_stars>1-10
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'

# -e: immediately exit if any command has a non-zero exit status
# -o: prevents errors in a pipeline from being masked
# IFS new value is less likely to cause confusing bugs when looping arrays or arguments (e.g. $@)

usage() { echo "Usage: $0 -s <subscriptionId> -g <resourceGroupName> -k <aksClusterName>" 1>&2; exit 1; }

declare subscriptionId=""
declare resourceGroupName="dapr"
declare aksClusterName="dapr-aks"
declare servicePrincipalName="<PASSWORD>-spn"

if [ -f "logs/aks.json" ]; then
	echo "Loading Azure Kubernetes Service from file..."
	resourceGroupName=$(jq -r '.resourceGroup' logs/aks.json)
	aksClusterName=$(jq -r '.name' logs/aks.json)
fi

if [ -f "logs/spn.json" ]; then
	echo "Loading Service Principal from file..."
	servicePrincipalName=$(jq -r '.displayName' logs/spn.json)
fi

# Initialize parameters specified from command line
while getopts ":s:g:k:" arg; do
	case "${arg}" in
		s)
			subscriptionId=${OPTARG}
			;;
		g)
			resourceGroupName=${OPTARG}
			;;
		k)
			aksClusterName=${OPTARG}
			;;
		esac
done
shift $((OPTIND-1))

#Prompt for parameters is some required parameters are missing
if [[ -z "$subscriptionId" ]]; then
	echo "Your subscription ID can be looked up with the CLI using: az account show --out json "
	echo "Enter your subscription ID:"
	read subscriptionId
	[[ "${subscriptionId:?}" ]]
fi

if [[ -z "$resourceGroupName" ]]; then
	echo "This script will look for an existing resource group, otherwise a new one will be created "
	echo "You can create new resource groups with the CLI using: az group create "
	echo "Enter a resource group name"
	read resourceGroupName
	[[ "${resourceGroupName:?}" ]]
fi

if [[ -z "$aksClusterName" ]]; then
	echo "This script will remove the Azure Kubernetes Service cluster from kubectl "
	echo "Enter a name for the AKS cluster:"
	read aksClusterName
	[[ "${aksClusterName:?}" ]]
fi

if [ -z "$subscriptionId" ] || [ -z "$resourceGroupName" ] || [ -z "$aksClusterName" ]; then
	echo "Either one of subscriptionId, resourceGroupName, aksClusterName is empty"
	usage
fi

#login to azure using your credentials
az account show 1> /dev/null

if [ $? != 0 ];
then
	az login
fi

#set the default subscription id
az account set --subscription $subscriptionId

set +e

#Check for existing RG
az group show --name $resourceGroupName 1> /dev/null

if [ $? != 0 ]; then
	echo "Resource group with name" $resourceGroupName "could not be found. Aborting..."
	exit 1
fi

echo "Removing resource group..."
az group delete -g "$resourceGroupName" --yes

if [ -f "logs/spn.json" ]; then
	echo "Removing Service Principal..."
	servicePrincipalObjectId=$(az ad sp list --filter "displayName eq '$servicePrincipalName'" --query "[].{objectId:objectId}" -o tsv)
	az ad sp delete --id "$servicePrincipalObjectId"
	rm -rf logs/spn.json
fi

echo "Removing kubectl config..."
kubectl config delete-cluster "$aksClusterName"
kubectl config delete-context "$aksClusterName"
kubectl config unset "users.clusterUser_$resourceGroupName""_""$aksClusterName"

echo "Removing logs folder..."
rm -rf logs


<filename>node-aws-lambda/awsTest.sh
cd /build
npm install ${JENKINS_AGENT_WORKDIR}/${rookNodeVersion}.tgz
zip -r /dist/rookout_lambda_test_regression.zip .

if aws lambda list-functions --region us-east-2 | grep "node_aws_lambda_regression_test"; then
aws lambda update-function-code \
            --function-name node_aws_lambda_regression_test \
            --zip-file fileb:///dist/rookout_lambda_test_regression.zip \
            --region us-east-2 ; \

else
aws lambda create-function \
            --region us-east-2 \
            --function-name node_aws_lambda_regression_test \
            --zip-file fileb:///dist/rookout_lambda_test_regression.zip \
            --role arn:aws:iam::032275105219:role/rookout-lambda-role \
            --handler index.handler \
            --runtime nodejs8.10 \
            --environment Variables="{ROOKOUT_TOKEN=$ROOKOUT_TOKEN,ROOKOUT_ROOK_TAGS=node_aws_lambda_regression_test,ROOKOUT_LOG_TO_STDERR=1,ROOKOUT_DEBUG=1}" \
            --timeout 25 \
            --tags "type=regression_test" ; \
fi


<gh_stars>1-10
#!/bin/sh

set -eum
trap 'kill 0' INT HUP TERM

: "${SYSTEM:?unknown system}"

test "${TRACE:-0}" = "1" && set -x
test "${VERBOSE:-0}" = "1" && set -v

test "${SYSTEM}" = "darwin" || exit 0

printf "\e[1;33mCleanup\e[0m\n"

printf "removing broken binary links from /usr/local/bin...\n" "/usr/local/bin"
find -L /usr/local/bin/ -type l -exec rm -- {} +


<reponame>Abdennebi/kubernetes-from-scratch
#!/bin/bash

. docker.sh
. etcd.sh
. master.sh
. worker.sh

install_etcd
install_master_components
install_docker
install_worker_components


<filename>gameserver/shell/status.sh
#!/bin/sh
PID_ROOT=../log
pidfile=$PID_ROOT/skynet.pid
if ! [ -f $pidfile ]; then
	echo "stop"
	exit;
fi
pid=`cat $pidfile`
if ps -p $pid >/dev/null 2>&1; then
	echo "start"
else
	# unsafe stop
	echo "killed"
fi


<reponame>gitter-badger/FlexNeuART<gh_stars>100-1000
# This should be consistent with common_proc.sh and config.py

# Point COLLECT_ROOT to the location you want to use as
# the root directory for all collections/indices.

if [ "$COLLECT_ROOT" = "" ] ; then
  echo "Specify the collection root location using the environment variable COLLECT_ROOT!"
  exit 1
fi
echo "Using collection root: $COLLECT_ROOT"

# Setting path for Java-binary-calling scripts
# These scripts should be copied to ./bin by either
# a build or an installation script.
export PATH=./bin/:$PATH

# The structure of sub-directories is outlined below

#
# Each collection is supposed to be stored in respective sub-directories.
# See a description/location of sub-directories below, which are assumed
# to exist (by many scripts).
#
# $COLLECT_ROOT
#     <Collection sub-directory>
#         $INPUT_RAW_SUBDIR (optional)
#         $INPUT_DATA_SUBDIR
#             $DEFAULT_TRAIN_SUBDIR (can be overriden)
#             $DEV_SUBDIR (optional)
#             $DEV1_SUBDIR (optional)
#             $DEV2_SUBDIR (optional)
#             $BITEXT_SUBDIR (optional)
#
#         $DERIVED_DATA_SUBDIR
#             $IR_MODELS_SUBDIR (optional)
#             $BITEXT_SUBDIR (optional)
#             $MODEL1_SUBDIR (optional)
#             $EMBED_SUBDIR (optional)
#
#         $EXPER_SUBDIR
#
#         $FWD_INDEX_SUBDIR (default location)
#         $LUCENE_INDEX_SUBDIR (default location)
#

# Original input data directory
INPUT_RAW_SUBDIR="input_raw"

# Processed multi-field input data (possibly compressed question and/or answer JSONs)
INPUT_DATA_SUBDIR="input_data"
# Derived data subdirectory
DERIVED_DATA_SUBDIR="derived_data"

# This keeps data generated by experiments (results, models, etc)
EXPER_SUBDIR="results"

# Index directories.
FWD_INDEX_SUBDIR="forward_index"
LUCENE_INDEX_SUBDIR="lucene_index"

# Word embeddings are (historically) stored within the derived-data sub-directory
EMBED_SUBDIR="embeddings"

# This is a bunch of sub-directories for input data
DEFAULT_TRAIN_SUBDIR="train_fusion" # This only a default that can be overriden
# The dev* directories can be optional, there can be, e.g., dev1, dev2 or just a single dev
DEV_SUBDIR="dev"
DEV1_SUBDIR="dev1"
DEV2_SUBDIR="dev2"

# A directory to store trained models
IR_MODELS_SUBDIR="ir_models"

# Parallel corpora sub-directory
BITEXT_SUBDIR="bitext"
# Parameters to train Model 1
MODEL1_SUBDIR="giza"
GIZA_ITER_QTY=5

# Coordinate ascent (LETOR algorithm) training parameters
DEFAULT_METRIC_TYPE="NDCG@20"
DEFAULT_NUM_RAND_RESTART=10
DEFAULT_NUM_TREES=100

# QREL file name
QREL_FILE="qrels.txt"
# The default run id for TREC-like run files
FAKE_RUN_ID="fake_run"

# This value should match Lucene's query field
DEFAULT_QUERY_FIELD_NAME=text

DEFAULT_CAND_PROV_QTY=1000
DEFAULT_TRAIN_CAND_QTY=20
DEFAULT_TEST_CAND_QTY_LIST=10,50,100,250,500,1000

# Report/trec_run sub-dirs and files
LETOR_SUBDIR="letor"
TRECRUNS_SUBDIR="trec_runs"
REP_SUBDIR="rep"

STAT_FILE="stat_file"

SEP_DEBUG_LINE="================================================================================"

TEST_PART_PARAM="testPart"
TRAIN_PART_PARAM="trainPart"
EXPER_SUBDIR_PARAM="experSubdir"
TEST_ONLY_PARAM="testOnly"
TRAIN_ONLY_PARAM="trainOnly"


<reponame>mcsheaj/aws-wordpress-high-availability-blog<filename>scripts/bootstrap-bastion.sh
#!/bin/bash -xe

cd /tmp

# Populate some variables from meta-data
INSTANCE_ID=$(curl http://169.254.169.254/latest/meta-data/instance-id)
REGION=$(curl http://169.254.169.254/latest/dynamic/instance-identity/document|grep region|awk -F\" '{print $4}')

# Create a bootstrap tag
BOOTSTRAP=$(date +"BEGIN: %Y-%m-%d %H:%M:%S %Z")
aws ec2 create-tags --resources ${INSTANCE_ID} --tags "Key=Bootstrap,Value=${BOOTSTRAP}" --region ${REGION}

# Create user accounts for administrators
wget --no-cache https://raw.githubusercontent.com/mcsheaj/aws-ec2-ssh/master/install.sh
chmod 755 install.sh
yum -y install git
if ! [ -z "${ADMIN_GROUP}" ]
then
    ./install.sh -i ${ADMIN_GROUP} -s ${ADMIN_GROUP}
else
    ./install.sh -s '##ALL##'
fi
BOOTSTRAP=$(date +"${BOOTSTRAP}; SSHEC2: %Y-%m-%d %H:%M:%S %Z")
aws ec2 create-tags --resources ${INSTANCE_ID} --tags "Key=Bootstrap,Value=${BOOTSTRAP}" --region ${REGION}

# Install jq
yum -y install jq

# Populate some variables from CLI (need jq first)
NAME=$(aws ec2 describe-tags --region us-east-1 --filters "Name=key,Values=Name" "Name=resource-id,Values=${INSTANCE_ID}" | jq .Tags[0].Value -r)
STACK_NAME=$(aws ec2 describe-tags --region us-east-1 --filters "Name=key,Values=StackName" "Name=resource-id,Values=${INSTANCE_ID}" | jq .Tags[0].Value -r)

# Update the motd banner
if ! [ -z "${MOTD_BANNER}" ]
then
    wget --no-cache -O /etc/update-motd.d/30-banner ${MOTD_BANNER}
    update-motd --force
    update-motd --disable
else
    echo "No MOTD_BANNER specified, skipping motd configuration"
fi

# Update the instance name to include the stack name
if [[ ${NAME} != *-${STACK_NAME} ]]
then
    NEW_NAME="${NAME}-${STACK_NAME}"
    aws ec2 create-tags --resources ${INSTANCE_ID} --tags "Key=Name,Value=$NEW_NAME" --region ${REGION}
else
    NEW_NAME=${NAME}
fi

# Install the RedHat epel yum repo
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

# Install iptables-service and fail2ban from the epel repo
yum -y install iptables-services fail2ban

# Enable iptables to start on boot, and start it now
systemctl enable iptables
systemctl start iptables

# Flush iptables
iptables -F

# Move sshd to port 443
sed -i "s/#Port 22/Port 443/" /etc/ssh/sshd_config
systemctl restart sshd

# Configure iptables:
# 1. accept anything on the loopback adapter
# 2. accept incoming packets that belong to a connection that has already been established (using the state module)
# 3. accept udp on ports 67:68 (DHCP)
# 3. accept tcp on port 443 (where we're running sshd)
# 4. drop anything else
# and persist the config
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -p udp --dport 67:68 --sport 67:68 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
iptables -A INPUT -j DROP
iptables-save > /etc/sysconfig/iptables

# Shutdown RPC bind (used for NFS, not need on this server)
systemctl stop rpcbind
systemctl disable rpcbind

# Enable fail2ban to start on boot, and start it now
systemctl enable fail2ban
systemctl start fail2ban

# Configure fail2ban by copying jail.conf to jail.local and:
# 1. lower maxretry to 3 in the jail.local file
# 2. enable the sshd-iptables in the jail.local file
# 3. change the ssh port to 443 in the jail.local file
# and restart fail2ban
cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
sed -i "s/maxretry = 5/maxretry = 3/" /etc/fail2ban/jail.local
sed -i "s/^\[sshd\]/[sshd]\nenabled=true/" /etc/fail2ban/jail.local
sed -i "s/port *= *ssh/port    = 443/" /etc/fail2ban/jail.local
systemctl restart fail2ban

# Run system updates
yum -y update

# Call cfn-init, which reads the launch configration metadata and uses it to
# configure and runs cfn-hup as a service, so we can get a script run on updates to the metadata
/opt/aws/bin/cfn-init -v --stack ${STACK_NAME} --resource LaunchConfig --configsets cfn_install --region ${REGION}

# Send a signal indicating we're done
/opt/aws/bin/cfn-signal -e $? --stack ${STACK_NAME} --resource BastionScalingGroup --region ${REGION} || true

# Update the bootstrap tag
BOOTSTRAP=$(date +"${BOOTSTRAP}; END: %Y-%m-%d %H:%M:%S %Z")
aws ec2 create-tags --resources ${INSTANCE_ID} --tags "Key=Bootstrap,Value=${BOOTSTRAP}" --region ${REGION}


<filename>build.sh
./configure --prefix=~/nginx --with-ld-opt="-Wl" --with-stream --add-module=./stream-scheme


<reponame>Who8MyLunch/ffmpeg_build_scripts
#!/bin/bash

# See instructions on these pages
# http://yasm.tortall.net/Download.html
# http://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu

NAME_PACKAGE="vid.stab"

PATH_PROJECT="$HOME/Projects/ffmpeg"

#################################################

PATH_SOURCES="$PATH_PROJECT/sources"
PATH_BUILD="$PATH_PROJECT/build"

PATH_BIN="$HOME/bin"

export PKG_CONFIG_PATH="$PATH_BUILD/lib/pkgconfig"
export PATH="$PATH_BIN:$PATH"

#################################################

cd $PATH_SOURCES

# Package folder.
if [ -d "$PATH_SOURCES/$NAME_PACKAGE" ]; then
    # already exists
    cd $NAME_PACKAGE

    # uncomment this to update repository
    git pull
else
    # Does not exist.  Clone the repo.
    # https://github.com/georgmartius/vid.stab
    git clone https://github.com/georgmartius/vid.stab

    cd $NAME_PACKAGE
fi

#################################################

# IMPORTANT:
# Disable shared & enable static by setting BUILD_SHARED_LIBS to OFF.
# Simplest to make this change at command line settings below, but can also make this
# change in CMakeList.txt in the source folder.
# http://stackoverflow.com/questions/18435516/how-to-set-a-cmake-option-at-command-line
# Note: CMake will cache its settings in the file CMakeCache.txt. Clobber that file if it
# looks like changing settings has no impact.

cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX:PATH="$PATH_BUILD"

make
make install
make clean


#!/bin/bash
if ping -c1 -W1 $1 >/dev/null 2>&1; then
    printf " %5s $2\n" $(ping -c1 -W1 $1 | awk -F'=' '/time/{print $4}'|cut -f 1 -d ' ')
fi


#!/usr/bin/env bash

#Keep all Go packages that we want globally installed here.
go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
go get -u golang.org/x/tools/cmd/gopls

echo "Golang tools installed!"


#!/bin/bash

pnp_root=~/.pnp
pnp_vault_debug=0
pnp_always_replace=1
lock_fd=8

#
# helper
#

function get_seed() {
    local privacy="$1"

    local seed_script=$(echo $(hostname -f)$0$(stat -c %i%g $0) | sha256sum | cut -f1 -d' ')
    local seed_user=$(echo $(hostname -f)$(whoami)$(stat -c %i%g ~) | sha256sum | cut -f1 -d' ')
    local seed_host=$(echo $(hostname -f)$(stat -c %i%g /etc)  | sha256sum | cut -f1 -d' ')

    case $privacy in
        script)
            if [ -f $0 ]; then
                local seed=$seed_host$seed_script
            else
                >&2 echo 'Warning. Script level privacy chosen, but running from shell. Falling to user level privacy.'
                local seed=$seed_host$seed_user
            fi
            ;;
        user)
            local seed=$seed_host$seed_user
            ;;
        host)
            local seed=$seed_host
            ;;
        *)
            >&2 echo 'Error. Privacy level not known. Falling to user level privacy.'
            local seed=$seed_host$seed_user
            ;;
    esac
    [ $pnp_vault_debug -gt 0 ] && echo "$privacy, $seed"

    echo $seed
}

function rollback_work() {

    exec 8>$pnp_root/secret.lock
    flock -x -w 5 $lock_fd

    if [ -d $pnp_root/secret.prev ]; then
        rm -rf $pnp_root/secret
        mv $pnp_root/secret.prev $pnp_root/secret

        rm -rf $pnp_root/secret.tx
        rm -rf $pnp_root/secret.delete
    fi

    # remove lock
    flock -u $lock_fd
    rm $pnp_root/secret.lock
}

#
# main
#

function read_secret() {
    local key="$1"
    local privacy="$2"

    if [ -z "$key" ]; then
        >&2 echo "usage: read_secret key user|host|script"
        return 1
    fi

    umask 077

    [ ! -d $pnp_root ] && mkdir -p $pnp_root

    if [ -z "$internal_read" ]; then
        # rollback broken work
        rollback_work

        # lock dataset for changes
        exec 8>$pnp_root/secret.lock
        flock -x -w 5 $lock_fd
        if [ $? -ne 0 ]; then
            echo "Error. Other process keeps dataset."
            return 127
        fi
    fi

    : ${privacy:=user}

    #
    local seed=$(get_seed $privacy)

    local lookup_code=$(echo $(hostname)\_$key | sha256sum | cut -f1 -d' ')
    [ $pnp_vault_debug -gt 0 ] && echo $lookup_code

    local element_pos=0
    local lookup_code_element=.
    local lookup_result=true
    unset value
    while [ ! -z "$lookup_code_element" ]; do

        local lookup_code_element=${lookup_code:$element_pos:1}
        if [ ! -z "$lookup_code_element" ]; then
            local lookup_code_element_value=$((16#$lookup_code_element))
            local seed_element=${seed:$lookup_code_element_value:1}
            [ $pnp_vault_debug -gt 0 ] && echo $element_pos, $lookup_code_element, $lookup_code_element_value, $seed_element

            local lookup_code_seed=$(echo $seed_element$element_pos$lookup_code | sha256sum | cut -f1 -d' ')
            [ $pnp_vault_debug -gt 0 ] && echo $lookup_code_seed

            if [ -z "$internal_read" ]; then
                local secret_repo=$pnp_root/secret
            else
                local secret_repo=$internal_read
            fi

            if [ $pnp_always_replace -eq 1 ]; then
                local kv=$(grep $lookup_code_seed $secret_repo/$seed_element 2>/dev/null | head -1)
            else
                local kv=$(grep $lookup_code_seed $secret_repo/$seed_element 2>/dev/null | tail -1)
            fi

            if [ -z "$kv" ]; then
                if [ -z "$value" ]; then
                    [ $pnp_vault_debug -gt 0 ] && echo "Not found"
                    lookup_result=false
                else
                    lookup_result=true
                    [ $pnp_vault_debug -gt 0 ] && echo "Value: $value"
                fi
                break
            else
                local value_element=$(echo "$kv" | cut -d' ' -f2)
                local value="$value$value_element"
            fi
            element_pos=$(( $element_pos + 1 ))
        fi
    done

    if [ -z "$internal_read" ]; then
        # remove lock
        flock -u $lock_fd
        rm $pnp_root/secret.lock
    fi

    if [ "$lookup_result" = "true" ]; then
        echo "$value"
        return 0
    else
        echo ''
        return 1
    fi
}

function save_secret() {
    local key="$1"
    local value="$2"
    local privacy="$3"

    if [ -z "$key" ]; then
        >&2  echo "usage: save_secret key value user|host|script"
        return 1
    fi

    if [ -z "$value" ]; then
        >&2 echo "usage: save_secret key value user|host|script"
        return 1
    fi

    umask 077

    [ ! -d $pnp_root ] && mkdir -p $pnp_root

    if [ ! -d $pnp_root ]; then
        >&2 echo "Note: cfg directory does not exist. Creating $pnp_root"
        mkdir $pnp_root
    fi

    if [ "$(stat -c %a $pnp_root)" != "700" ]; then
        >&2 echo "Note: Wrong cfg directory access rights. Fixing $pnp_root to 0700"
        chmod 0700 $pnp_root
    fi

    if [ ! -d $pnp_root/secret ]; then
        mkdir -p $pnp_root/secret
    fi

    # rollback broken work
    rollback_work

    # lock dataset for changes
    exec 8>$pnp_root/secret.lock
    flock -x -w 5 $lock_fd
    if [ $? -ne 0 ]; then
        echo "Error. Other process keeps dataset."
        return 127
    fi

    rm -rf $pnp_root/secret.tx
    mkdir -p $pnp_root/secret.tx

    if [ -d $pnp_root/secret ]; then
        if [ $(ls $pnp_root/secret | wc -l) -gt 0 ]; then
            cp $pnp_root/secret/* $pnp_root/secret.tx
        fi

        rm -rf $pnp_root/secret.prev
        mv $pnp_root/secret $pnp_root/secret.prev
    fi

    : ${privacy:=user}

    if [ $pnp_always_replace -eq 1 ]; then
        internal_read=$pnp_root/secret.tx
        delete_secret $key $privacy
        unset internal_read
    fi

    local seed=$(get_seed $privacy)

    local lookup_code=$(echo $(hostname)\_$key | sha256sum | cut -f1 -d' ')
    [ $pnp_vault_debug -gt 0 ] && echo $lookup_code

    local element_pos=0
    local lookup_code_element=.
    while [ ! -z "$lookup_code_element" ]; do
        local lookup_code_element=${lookup_code:$element_pos:1}
        if [ ! -z "$lookup_code_element" ]; then
            local lookup_code_element_value=$((16#$lookup_code_element))
            local seed_element=${seed:$lookup_code_element_value:1}

            [ $pnp_vault_debug -gt 0 ] && echo $element_pos, $lookup_code_element, $lookup_code_element_value, $seed_element

            local lookup_code_seed=$(echo $seed_element$element_pos$lookup_code | sha256sum | cut -f1 -d' ')
            local value_element=${value:$element_pos:1}

            [ $pnp_vault_debug -gt 0 ] && echo $value_element

            if [ ! -z "$value_element" ]; then
                echo "$lookup_code_seed $value_element" >> $pnp_root/secret.tx/$seed_element
            else
                break
            fi
            element_pos=$(( $element_pos + 1 ))
        fi
    done

    #
    # verification
    #
    internal_read=$pnp_root/secret.tx
    local read_value=$(read_secret $key $privacy)
    unset internal_read
    if [ "$value" != "$read_value" ]; then
        echo "Error writing key due to low entropy. Retry with different key. This key is lost."

        echo "$key : $value vs. $read_value"

        rm -rf $pnp_root/secret.tx
        rm -rf $pnp_root/secret
        mv $pnp_root/secret.prev $pnp_root/secret

        # remove lock
        flock -u $lock_fd
        rm $pnp_root/secret.lock
        return 10
    else

        rm -rf $pnp_root/secret.prev
        rm -rf $pnp_root/secret
        mv $pnp_root/secret.tx $pnp_root/secret

        # shuffle entries to eliminate entry order
        if [ $pnp_always_replace -eq 1 ]; then

            rm -rf $pnp_root/secret.shuffle
            mkdir $pnp_root/secret.shuffle

            for secret_file in $pnp_root/secret/*; do
                shuf $secret_file > $pnp_root/secret.shuffle/$(basename $secret_file)
            done
            rm -rf $pnp_root/secret
            mv $pnp_root/secret.shuffle $pnp_root/secret

        fi

        # remove lock
        flock -u $lock_fd
        rm $pnp_root/secret.lock
    fi

}

function delete_secret() {
    local key="$1"
    local privacy="$2"

    if [ -z "$key" ]; then
        >&2  echo "usage: delete_secret key  user|host|script"
        return 1
    fi

    umask 077

    [ ! -d $pnp_root ] && mkdir -p $pnp_root

    if [ ! -d $pnp_root ]; then
        >&2 echo "Note: cfg directory does not exist. Creating $pnp_root"
        mkdir $pnp_root
    fi

    if [ "$(stat -c %a $pnp_root)" != "700" ]; then
        >&2 echo "Note: Wrong cfg directory access rights. Fixing $pnp_root to 0700"
        chmod 0700 $pnp_root
    fi

    if [ ! -d $pnp_root/secret ]; then
        mkdir -p $pnp_root/secret
    fi

    if [ -z "$internal_read" ]; then

        # rollback broken work
        rollback_work

        # lock dataset for changes
        exec 8>$pnp_root/secret.lock
        flock -x -w 5 $lock_fd
        if [ $? -ne 0 ]; then
            echo "Error. Other process keeps dataset."
            return 127
        fi
    fi

    : ${privacy:=user}

    local seed=$(get_seed $privacy)

    local lookup_code=$(echo $(hostname)\_$key | sha256sum | cut -f1 -d' ')
    [ $pnp_vault_debug -gt 0 ] && echo $lookup_code

    rm -rf $pnp_root/secret.delete
    mkdir $pnp_root/secret.delete
    if [ -z "$internal_read" ]; then
        secret_repo=$pnp_root/secret
    else
        secret_repo=$internal_read
    fi

    if [ -d $secret_repo ]; then
        if [ $(ls $secret_repo | wc -l) -gt 0 ]; then
            cp $secret_repo/* $pnp_root/secret.delete
        fi
    fi

    local element_pos=0
    local lookup_code_element=.
    while [ ! -z "$lookup_code_element" ]; do
        local lookup_code_element=${lookup_code:$element_pos:1}

        if [ ! -z "$lookup_code_element" ]; then
            local lookup_code_element_value=$((16#$lookup_code_element))
            local seed_element=${seed:$lookup_code_element_value:1}

            [ $pnp_vault_debug -gt 0 ] && echo $element_pos, $lookup_code_element, $lookup_code_element_value, $seed_element

            local lookup_code_seed=$(echo $seed_element$element_pos$lookup_code | sha256sum | cut -f1 -d' ')

            if [ -f $pnp_root/secret.delete/$seed_element ]; then
                cat $pnp_root/secret.delete/$seed_element | sed "/^$lookup_code_seed/d"  > $pnp_root/secret.delete/$seed_element.new
                mv $pnp_root/secret.delete/$seed_element.new $pnp_root/secret.delete/$seed_element
            fi

            element_pos=$(( $element_pos + 1 ))
        fi
    done

    rm -rf $secret_repo
    mv $pnp_root/secret.delete $secret_repo

    if [ -z "$internal_read" ]; then
        # remove lock
        flock -u $lock_fd
        rm $pnp_root/secret.lock
    fi
}

#
#
#
function usage() {
    cat <<EOF
usage: pnp_vault save|read|delete key [value] [privacy]

, where
privacy user|host|script with default user

EOF
}

function __main__() {
    operation=$1; shift

    case $operation in
        save)
            save_secret $@
            ;;
        read)
            read_secret $@
            ;;
        delete)
            delete_secret $@
            ;;
        *)
            usage
            exit 1
            ;;
    esac
}

# prevent from staring main in source mode
[ -f $0 ] && __main__ $@


#!/usr/bin/env bash

# Files will be created with these permissions:
# files 644 -rw-r--r-- (666 minus 022)
# dirs  755 drwxr-xr-x (777 minus 022)
umask 022

# Fast directory switching
if [[ -r ~/.dotfiles/vendor/z/z.sh ]]; then
    export _Z_NO_PROMPT_COMMAND=1
    export _Z_DATA="${HOME}/.z/cache"
    mkdir -p "${_Z_DATA}"
    source ~/.dotfiles/vendor/z/z.sh
fi


#!/bin/bash

cd public

echo "Creación de carpeta storage"
mkdir storage

cd storage

echo "Creación de carpetas PSG"
mkdir PSG

echo "Creación de carpetas GSE"
mkdir GSE
cd GSE
mkdir CSR
mkdir CSA
mkdir CRM
mkdir ADE
cd ..

echo "Creación de carpetas GEA"
mkdir GEA
cd GEA
mkdir CSE
mkdir EA
cd ..

echo "Creación de carpetas VI"
mkdir VI
cd VI
mkdir CSV
mkdir SVI
cd ..

echo "Creación de carpetas GR"
mkdir GR
cd GR
mkdir GCH
mkdir RF
mkdir INF
mkdir AME
mkdir AP
cd ..

echo "Creación de carpetas EDM"
mkdir EDM
cd EDM
mkdir EDS
cd ..

echo "Creación de carpetas ME"
mkdir ME
cd ME
mkdir MC
cd ..

echo "Creación de carpetas PGC"
mkdir PGC
echo "Creación de carpetas GCE"
mkdir GCE
echo "Creación de carpetas DDE"
mkdir DDE

echo "Creación de carpetas FEA"
mkdir FEA
echo "Creación de carpetas EC"
mkdir EC
echo "Creación de carpetas SEF"
mkdir SEF
echo "Creación de carpetas STC"
mkdir STC
echo "Creación de carpetas VN"
mkdir VN
echo "Creación de carpetas PVI"
mkdir PVI
echo "Creación de carpetas CP"
mkdir CP
echo "Creación de carpetas RF"
mkdir RF
echo "Creación de carpetas IS"
mkdir IS
echo "Creación de carpetas TI"
mkdir TI

echo "Creación de carpetas AP"
mkdir AP
echo "Creación de carpetas IIE"
mkdir IIE
echo "Creación de carpetas CI"
mkdir CI
echo "Creación de carpetas ESG"
mkdir ESG
echo "Creación de carpetas MC"
mkdir MC
echo "Creación de carpetas SI"
mkdir SI
echo "Creación de carpetas MA"
mkdir MA
echo "Creación de carpetas PS"
mkdir PS


#!/bin/bash
echo "Running T cut layer"
for i in 1.0 0.5 0.2 0.1 0.05 0.02 0.01 0.005
do
  for j in 0 2 6 7 11
  do
    for k in $(seq 0 2)
    do
      python Argv_MainTransfer_Cut.py $i $k $j >> logTlayer.txt
    done
  done
done
echo "Done!"


docker run \
  -p 5000:5000 \
  -e "AUTOAPI_NAME=$AUTOAPI_NAME" \
  -e "AWS_ACCESS_KEY_ID=$ACCESS_KEY_ID" \
  -e "AWS_SECRET_ACCESS_KEY=$SECRET_ACCESS_KEY" \
  -e "AUTOAPI_BUCKET=$AUTOAPI_BUCKET" \
  -v `pwd`/data_sources:/data_sources \
  --rm -it 18fgsa/autoapi "$@"


<reponame>qiffang/tcptracer-bpf
#! /bin/bash
# shellcheck disable=SC1090,SC1091
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/config.sh"

set -e

whitely echo Ping each host from the other
for host in $HOSTS; do
    for other in $HOSTS; do
        [ "$host" = "$other" ] || run_on "$host" "$PING" "$other"
    done
done

whitely echo Check we can reach docker

for host in $HOSTS; do
    echo
    echo "Host Version Info: $host"
    echo "====================================="
    echo "# docker version"
    docker_on "$host" version
    echo "# docker info"
    docker_on "$host" info
    echo "# weave version"
    weave_on "$host" version
done


<reponame>lukebakken/rabbitmq-server-4229<gh_stars>0
#!/usr/bin/env bash

set -o errexit
set -o nounset

readonly dir="$(cd -- "$(dirname "$0")" >/dev/null 2>&1; pwd -P)"

readonly consul_ver='1.11.4'
readonly consul_bin="$dir/consul"

readonly rmq_ver='3.9.13'
readonly rmq_dir="$dir/rabbitmq_server-$rmq_ver"
readonly rmq_conf="$dir/rabbitmq.conf"

readonly rabbitmqctl_cmd="$rmq_dir/sbin/rabbitmqctl"
readonly rabbitmq_plugins_cmd="$rmq_dir/sbin/rabbitmq-plugins"
readonly rabbitmq_server_cmd="$rmq_dir/sbin/rabbitmq-server"

declare -i IDX=0

set +o errexit
for IDX in 0 1 2
do
    rmq_host_name="rabbit$IDX-host"
    rmq_node_name="rabbit@$rmq_host_name"
    "$rabbitmqctl_cmd" -n "$rmq_node_name" shutdown --no-wait
done


<gh_stars>0
#!/bin/bash
set -ex

function init_variables {
    APTLINE_DOCKER=0
    DIR_BASE=/tmp
}

function process_options {
    local max
    local i
    max=$#
    i=1
    while [ $i -le $max ]; do
        case "$1" in
            -a|--add-docker-aptline)
                APTLINE_DOCKER=1
                ;;
            -d|--download-dir)
                shift; ((i++))
                DIR_BASE=$1
                ;;
        esac
        shift; ((i++))
    done
}

function install_pipework {
    if ! which /usr/local/bin/pipework >/dev/null
    then
        sudo rm -rf $DIR_BASE/pipework
        git clone https://github.com/jpetazzo/pipework.git $DIR_BASE/pipework
        sudo install -m 0755 $DIR_BASE/pipework/pipework /usr/local/bin/pipework
    fi
}

function install_depends_pkg {
    install_pipework
}


<reponame>raktim00/Prometheus-Grafana-Ubuntu-Shell-Script<gh_stars>0
#!/bin/bash

apt-get -y install git
git clone https://github.com/raktim00/Prometheus-Grafana-Ubuntu-Shell-Script.git
chmod +x ./Prometheus-Grafana-Ubuntu-Shell-Script/*.sh
./Prometheus-Grafana-Ubuntu-Shell-Script/prometheus-ubuntu.sh
./Prometheus-Grafana-Ubuntu-Shell-Script/node-exporter-ubuntu.sh
./Prometheus-Grafana-Ubuntu-Shell-Script/grafana-ubuntu.sh
./Prometheus-Grafana-Ubuntu-Shell-Script/nginx-ubuntu.sh


#!/bin/bash

INPUT_FOLDER=$1
INPUT_FOLDER_1080="$1/1080p"
INPUT_FOLDER_720="$1/720p"
INPUT_FOLDER_480="$1/480p"
INPUT_FOLDER_360="$1/360p"
INPUT_FOLDER_240="$1/240p"
INPUT_FOLDER_144="$1/144p"
OUTPUT_SUFFIX=".out"

INPUT_FOLDER_1080_WATERMARK="$1/1080p_watermark"
INPUT_FOLDER_720_WATERMARK="$1/720p_watermark"
INPUT_FOLDER_480_WATERMARK="$1/480p_watermark"
INPUT_FOLDER_360_WATERMARK="$1/360p_watermark"
INPUT_FOLDER_240_WATERMARK="$1/240p_watermark"
INPUT_FOLDER_144_WATERMARK="$1/144p_watermark"

INPUT_FOLDER_1080_FLIP_VERTICAL="$1/1080p_flip_vertical"
INPUT_FOLDER_720_FLIP_VERTICAL="$1/720p_flip_vertical"
INPUT_FOLDER_480_FLIP_VERTICAL="$1/480p_flip_vertical"
INPUT_FOLDER_360_FLIP_VERTICAL="$1/360p_flip_vertical"
INPUT_FOLDER_240_FLIP_VERTICAL="$1/240p_flip_vertical"
INPUT_FOLDER_144_FLIP_VERTICAL="$1/144p_flip_vertical"

INPUT_FOLDER_1080_FLIP_HORIZONTAL="$1/1080p_flip_horizontal"
INPUT_FOLDER_720_FLIP_HORIZONTAL="$1/720p_flip_horizontal"
INPUT_FOLDER_480_FLIP_HORIZONTAL="$1/480p_flip_horizontal"
INPUT_FOLDER_360_FLIP_HORIZONTAL="$1/360p_flip_horizontal"
INPUT_FOLDER_240_FLIP_HORIZONTAL="$1/240p_flip_horizontal"
INPUT_FOLDER_144_FLIP_HORIZONTAL="$1/144p_flip_horizontal"

INPUT_FOLDER_1080_ROTATE_90_CLOCKWISE="$1/1080p_rotate_90_clockwise"
INPUT_FOLDER_720_ROTATE_90_CLOCKWISE="$1/720p_rotate_90_clockwise"
INPUT_FOLDER_480_ROTATE_90_CLOCKWISE="$1/480p_rotate_90_clockwise"
INPUT_FOLDER_360_ROTATE_90_CLOCKWISE="$1/360p_rotate_90_clockwise"
INPUT_FOLDER_240_ROTATE_90_CLOCKWISE="$1/240p_rotate_90_clockwise"
INPUT_FOLDER_144_ROTATE_90_CLOCKWISE="$1/144p_rotate_90_clockwise"

INPUT_FOLDER_1080_ROTATE_90_COUNTERCLOCKWISE="$1/1080p_rotate_90_counterclockwise"
INPUT_FOLDER_720_ROTATE_90_COUNTERCLOCKWISE="$1/720p_rotate_90_counterclockwise"
INPUT_FOLDER_480_ROTATE_90_COUNTERCLOCKWISE="$1/480p_rotate_90_counterclockwise"
INPUT_FOLDER_360_ROTATE_90_COUNTERCLOCKWISE="$1/360p_rotate_90_counterclockwise"
INPUT_FOLDER_240_ROTATE_90_COUNTERCLOCKWISE="$1/240p_rotate_90_counterclockwise"
INPUT_FOLDER_144_ROTATE_90_COUNTERCLOCKWISE="$1/144p_rotate_90_counterclockwise"

OUTPUT_FOLDER=$2

export INPUT_FOLDER
export OUTPUT_FOLDER
export INPUT_FOLDER_1080
export INPUT_FOLDER_720
export INPUT_FOLDER_480
export INPUT_FOLDER_360
export INPUT_FOLDER_240
export OUTPUT_SUFFIX

export INPUT_FOLDER_1080_WATERMARK
export INPUT_FOLDER_720_WATERMARK
export INPUT_FOLDER_480_WATERMARK
export INPUT_FOLDER_360_WATERMARK
export INPUT_FOLDER_240_WATERMARK
export INPUT_FOLDER_144_WATERMARK

export INPUT_FOLDER_1080_FLIP_VERTICAL
export INPUT_FOLDER_720_FLIP_VERTICAL
export INPUT_FOLDER_480_FLIP_VERTICAL
export INPUT_FOLDER_360_FLIP_VERTICAL
export INPUT_FOLDER_240_FLIP_VERTICAL
export INPUT_FOLDER_144_FLIP_VERTICAL

export INPUT_FOLDER_1080_FLIP_HORIZONTAL
export INPUT_FOLDER_720_FLIP_HORIZONTAL
export INPUT_FOLDER_480_FLIP_HORIZONTAL
export INPUT_FOLDER_360_FLIP_HORIZONTAL
export INPUT_FOLDER_240_FLIP_HORIZONTAL
export INPUT_FOLDER_144_FLIP_HORIZONTAL

export INPUT_FOLDER_1080_ROTATE_90_CLOCKWISE
export INPUT_FOLDER_720_ROTATE_90_CLOCKWISE
export INPUT_FOLDER_480_ROTATE_90_CLOCKWISE
export INPUT_FOLDER_360_ROTATE_90_CLOCKWISE
export INPUT_FOLDER_240_ROTATE_90_CLOCKWISE
export INPUT_FOLDER_144_ROTATE_90_CLOCKWISE

export INPUT_FOLDER_1080_ROTATE_90_COUNTERCLOCKWISE
export INPUT_FOLDER_720_ROTATE_90_COUNTERCLOCKWISE
export INPUT_FOLDER_480_ROTATE_90_COUNTERCLOCKWISE
export INPUT_FOLDER_360_ROTATE_90_COUNTERCLOCKWISE
export INPUT_FOLDER_240_ROTATE_90_COUNTERCLOCKWISE
export INPUT_FOLDER_144_ROTATE_90_COUNTERCLOCKWISE

do_process(){
    resolution="$(ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0 $2 2>&1 | tr x :)"
    ffmpeg -i $1 -i $2 -lavfi "scale=${resolution}, libvmaf" -f null - 1> $3 2> $3$OUTPUT_SUFFIX
}

create_folders(){
    mkdir -p $OUTPUT_FOLDER/vmaf/720/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/480/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/360/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/240/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/144/$1

    mkdir -p $OUTPUT_FOLDER/vmaf/1080_watermark/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/720_watermark/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/480_watermark/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/360_watermark/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/240_watermark/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/144_watermark/$1

    mkdir -p $OUTPUT_FOLDER/vmaf/1080_flip_vertical/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/720_flip_vertical/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/480_flip_vertical/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/360_flip_vertical/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/240_flip_vertical/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/144_flip_vertical/$1

    mkdir -p $OUTPUT_FOLDER/vmaf/1080_flip_horizontal/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/720_flip_horizontal/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/480_flip_horizontal/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/360_flip_horizontal/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/240_flip_horizontal/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/144_flip_horizontal/$1

    mkdir -p $OUTPUT_FOLDER/vmaf/1080_rotate_90_clockwise/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/720_rotate_90_clockwise/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/480_rotate_90_clockwise/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/360_rotate_90_clockwise/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/240_rotate_90_clockwise/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/144_rotate_90_clockwise/$1

    mkdir -p $OUTPUT_FOLDER/vmaf/1080_rotate_90_counterclockwise/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/720_rotate_90_counterclockwise/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/480_rotate_90_counterclockwise/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/360_rotate_90_counterclockwise/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/240_rotate_90_counterclockwise/$1
    mkdir -p $OUTPUT_FOLDER/vmaf/144_rotate_90_counterclockwise/$1

}

export -f do_process
export -f create_folders

for main_file in $INPUT_FOLDER_1080/* ; do
    echo "Input file $main_file  `date`"
    filenamewithextensiom=$(basename -- "$main_file")
    filenamewithoutextension="${filenamewithextensiom%.*}"
    bash -c "create_folders \"$filenamewithoutextension\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_720/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/720/$filenamewithoutextension/$filenamewithoutextension\"\"_720.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_480/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/480/$filenamewithoutextension/$filenamewithoutextension\"\"_480.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_360/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/360/$filenamewithoutextension/$filenamewithoutextension\"\"_360.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_240/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/240/$filenamewithoutextension/$filenamewithoutextension\"\"_240.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_144/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/144/$filenamewithoutextension/$filenamewithoutextension\"\"_144.log\""

    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_1080_WATERMARK/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/1080_watermark/$filenamewithoutextension/$filenamewithoutextension\"\"_1080.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_720_WATERMARK/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/720_watermark/$filenamewithoutextension/$filenamewithoutextension\"\"_720.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_480_WATERMARK/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/480_watermark/$filenamewithoutextension/$filenamewithoutextension\"\"_480.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_360_WATERMARK/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/360_watermark/$filenamewithoutextension/$filenamewithoutextension\"\"_360.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_240_WATERMARK/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/240_watermark/$filenamewithoutextension/$filenamewithoutextension\"\"_240.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_144_WATERMARK/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/144_watermark/$filenamewithoutextension/$filenamewithoutextension\"\"_144.log\""

    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_1080_FLIP_VERTICAL/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/1080_flip_vertical/$filenamewithoutextension/$filenamewithoutextension\"\"_1080.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_720_FLIP_VERTICAL/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/720_flip_vertical/$filenamewithoutextension/$filenamewithoutextension\"\"_720.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_480_FLIP_VERTICAL/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/480_flip_vertical/$filenamewithoutextension/$filenamewithoutextension\"\"_480.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_360_FLIP_VERTICAL/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/360_flip_vertical/$filenamewithoutextension/$filenamewithoutextension\"\"_360.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_240_FLIP_VERTICAL/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/240_flip_vertical/$filenamewithoutextension/$filenamewithoutextension\"\"_240.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_144_FLIP_VERTICAL/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/144_flip_vertical/$filenamewithoutextension/$filenamewithoutextension\"\"_144.log\""

    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_1080_FLIP_HORIZONTAL/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/1080_flip_horizontal/$filenamewithoutextension/$filenamewithoutextension\"\"_1080.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_720_FLIP_HORIZONTAL/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/720_flip_horizontal/$filenamewithoutextension/$filenamewithoutextension\"\"_720.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_480_FLIP_HORIZONTAL/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/480_flip_horizontal/$filenamewithoutextension/$filenamewithoutextension\"\"_480.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_360_FLIP_HORIZONTAL/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/360_flip_horizontal/$filenamewithoutextension/$filenamewithoutextension\"\"_360.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_240_FLIP_HORIZONTAL/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/240_flip_horizontal/$filenamewithoutextension/$filenamewithoutextension\"\"_240.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_144_FLIP_HORIZONTAL/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/144_flip_horizontal/$filenamewithoutextension/$filenamewithoutextension\"\"_144.log\""

    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_1080_ROTATE_90_CLOCKWISE/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/1080_rotate_90_clockwise/$filenamewithoutextension/$filenamewithoutextension\"\"_1080.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_720_ROTATE_90_CLOCKWISE/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/720_rotate_90_clockwise/$filenamewithoutextension/$filenamewithoutextension\"\"_720.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_480_ROTATE_90_CLOCKWISE/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/480_rotate_90_clockwise/$filenamewithoutextension/$filenamewithoutextension\"\"_480.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_360_ROTATE_90_CLOCKWISE/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/360_rotate_90_clockwise/$filenamewithoutextension/$filenamewithoutextension\"\"_360.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_240_ROTATE_90_CLOCKWISE/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/240_rotate_90_clockwise/$filenamewithoutextension/$filenamewithoutextension\"\"_240.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_144_ROTATE_90_CLOCKWISE/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/144_rotate_90_clockwise/$filenamewithoutextension/$filenamewithoutextension\"\"_144.log\""

    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_1080_ROTATE_90_COUNTERCLOCKWISE/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/1080_rotate_90_counterclockwise/$filenamewithoutextension/$filenamewithoutextension\"\"_1080.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_720_ROTATE_90_COUNTERCLOCKWISE/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/720_rotate_90_counterclockwise/$filenamewithoutextension/$filenamewithoutextension\"\"_720.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_480_ROTATE_90_COUNTERCLOCKWISE/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/480_rotate_90_counterclockwise/$filenamewithoutextension/$filenamewithoutextension\"\"_480.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_360_ROTATE_90_COUNTERCLOCKWISE/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/360_rotate_90_counterclockwise/$filenamewithoutextension/$filenamewithoutextension\"\"_360.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_240_ROTATE_90_COUNTERCLOCKWISE/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/240_rotate_90_counterclockwise/$filenamewithoutextension/$filenamewithoutextension\"\"_240.log\""
    bash -c "do_process \"$main_file\" \"$INPUT_FOLDER_144_ROTATE_90_COUNTERCLOCKWISE/$filenamewithextensiom\" \"$OUTPUT_FOLDER/vmaf/144_rotate_90_counterclockwise/$filenamewithoutextension/$filenamewithoutextension\"\"_144.log\""

    echo "Finished file $main_file `date`"
done


#!/bin/bash
#Usage: my_register.sh user_name

echo "Register.."
if [ $# != 1 ]; then
  echo "Error arguments number: $#"
  echo "Usage: bash $0 user_name"
  exit 1
fi
user_name=$1
#cd "/home/pi/pi-face-recognition"
path="dataset/"
if [ ! -d "${path}" ]; then
  echo -e "Directory ${path} DOES NOT exist, create a ${path} directory...\n"
  mkdir ${path}
fi

if [ ! -d "${path}${user_name}" ]; then
  echo -e "Directory ${user_name} DOES NOT exist, create a ${user_name} directory...\n"
else
  echo -e "Directory ${user_name} ALREADY exists, rewrite the ${user_name} directory...\n"
  rm -rf ${path}${user_name}
fi
mkdir ${path}${user_name}
echo -e "Executing:  ${user_name} "
python build_face_dataset.py --cascade haarcascade_frontalface_default.xml --output ${path}${user_name}


#!/bin/sh

# Generate a rules.xml file from the xml files in the rules/ directory

if [ "$1" = "" ]; then
  RULES_FILE=rules.xml
else
  RULES_FILE=$1
fi

if [ -r rules/VERSION ]; then
  VERSION=`cat rules/VERSION`
fi

echo "<rules xmlns=\"http://www.loc.gov/bf2marc\">" > $RULES_FILE
if [ "$VERSION" != "" ]; then
  echo "  <version>$VERSION</version>" >> $RULES_FILE
fi

for filename in rules/*.xml; do
  echo "  <file>$filename</file>" >> $RULES_FILE
done

echo "</rules>" >> $RULES_FILE


<filename>misc/run-ep1.sh
HL2DIR="$HOME/.local/share/Steam/steamapps/common/Half-Life 2"
EPDIR="$HL2DIR/episodic"

./build/desktop-rel-cc/OpenSource \
	-d "$EPDIR" \
	-p "$EPDIR/ep1_pak_dir.vpk" \
	-p "$HL2DIR/hl2/hl2_pak_dir.vpk" \
	-p "$HL2DIR/hl2/hl2_misc_dir.vpk" \
	-p "$HL2DIR/hl2/hl2_textures_dir.vpk" \
	-n 128 \
	ep1_c17_00


<reponame>MichaelSteurer/pi-sniffer<gh_stars>10-100
#!/bin/bash

# Stop on any error
set -e

git pull

echo building service
make

echo "if you want to test the service, stop here and run under valgrind"
echo "    G_DEBUG=gc-friendly G_SLICE=always-malloc valgrind --tool=memcheck --suppressions=/usr/share/glib-2.0/valgrind/glib.supp --leak-check=full --track-origins=yes ./scan"

chmod a+x ./scan

# Create executable directory
if [ ! -e /opt/sniffer ]
then
sudo mkdir /opt/sniffer
fi

# Create working directory
if [ ! -e /var/sniffer ]
then
sudo mkdir /var/sniffer
fi

if [ -e /etc/systemd/system/pi-sniffer.service ]
then
echo stopping service
sudo systemctl stop pi-sniffer.service
fi

# copy executable over to opt directory
echo Copy scan to /opt/sniffer
sudo cp scan /opt/sniffer/

# run immediately
# sudo ./scan

# update running service

echo installing service
# DBUS configuration necessary to allow name to be registered on bus
sudo cp com.signswift.sniffer.conf /etc/dbus-1/system.d/
sudo cp pi-sniffer.service /etc/systemd/system/
sudo chmod 644 /etc/systemd/system/pi-sniffer.service
sudo systemctl enable pi-sniffer.service
sudo systemctl daemon-reload
sudo systemctl enable pi-sniffer.service

echo starting service
sudo systemctl start pi-sniffer.service

echo now tailing log, ctrl-c to stop but leave service running
echo log level use -p 6 for info level, -p 7 for debug level or remove it
# Start two minutes back to see the transition and tail forward
sudo journalctl -u pi-sniffer.service -S -2min -f -p 7


<filename>example/bin/run.sh
#!/bin/sh

# create zip file
./bin/zip.sh

# run function locally
sam local invoke PythonTaskAdapterExample -e tests/fixtures/event.json


#!/usr/bin/env bash

if [ -z "$1" ]
  then
    echo "Cloud must be specified" >&2; exit 1
fi
if [ -z "$2" ]
  then
    echo "Mongo version must be specified" >&2; exit 1
fi
if [ -z "$3" ]
  then
    echo "Config count must be specified" >&2; exit 1
fi
if [ -z "$4" ]
  then
    echo "Mongos count must be specified" >&2; exit 1
fi
if [ -z "$5" ]
  then
    echo "Shard count must be specified" >&2; exit 1
fi
if [ -z "$6" ]
  then
    echo "Shard replication must be specified" >&2; exit 1
fi

cloud=$1
mongo_version=$2
config_count=$3
mongos_count=$4
shard_count=$5
replica_count=$6

# Validate Parameters

if  [ $cloud != "chameleon" ] && [ $cloud != "kilo" ] && [ $cloud != "jetstream" ]
then
  echo "Cloud must be chameleon or kilo or jetstream" >&2; exit 1
fi

if  [ $mongo_version != 34 ] && [ $mongo_version != "32" ]
then
  echo "Mongo version must be 34 or 32" >&2; exit 1
fi

# check if number
re='^[0-9]+$'
if ! [[ $config_count =~ $re ]] ; then
   echo "error: Config replica size must be a number" >&2; exit 1
fi
re='^[0-9]+$'
if ! [[ $mongos_count =~ $re ]] ; then
   echo "error: Number of Mongos instances must be a number" >&2; exit 1
fi
re='^[0-9]+$'
if ! [[ $shard_count =~ $re ]] ; then
   echo "error: Number of shards must be a number" >&2; exit 1
fi
re='^[0-9]+$'
if ! [[ $replica_count =~ $re ]] ; then
   echo "Shard replication size must be a number" >&2; exit 1
fi

# check if positive
if [[ $config_count -lt 1 ]] ; then
   echo "error: -c must be a positive number" >&2; exit 1
fi
if [[ $mongos_count -lt 1 ]] ; then
   echo "error: -m must be a positive number" >&2; exit 1
fi
if [[ $shard_count -lt 1 ]] ; then
   echo "error: -s must be a positive number" >&2; exit 1
fi
if [[ $replica_count -lt 1 ]] ; then
   echo "error: -r must be a positive number" >&2; exit 1
fi

#http://stackoverflow.com/questions/806906/how-do-i-test-if-a-variable-is-a-number-in-bash

echo "Cloud: $cloud"
echo "MongoDB Version: $mongo_version"
echo "Config Replica Set Size: $config_count"
echo "Mongos Instances: $mongos_count"
echo "Shards: $shard_count"
echo "Shard Replication Size: $replica_count"

./cluster.sh $cloud $mongo_version $config_count $mongos_count $shard_count $replica_count

./ansible.sh $mongo_version

exit 0


<reponame>reactive-microservices/reactive-wiki<gh_stars>0
kubectl create namespace reactive
kubectl create -n reactive -f quota.yml

kubectl create -n reactive -f wiki-deployment.yml
kubectl create -n reactive -f wiki-service.yml


#!/bin/bash

if [[ $$NETLIFY != *true ]]; then
    (cd docs && yarn);
    (cd web && yarn);
fi


<gh_stars>1-10
# This shell script executes the Slurm jobs for training Salamon's supervised learning pipeline (SVM).

sbatch 023_unit01_trial-8.sbatch
sbatch 023_unit02_trial-8.sbatch
sbatch 023_unit03_trial-8.sbatch
sbatch 023_unit05_trial-8.sbatch
sbatch 023_unit07_trial-8.sbatch
sbatch 023_unit10_trial-8.sbatch


#!/bin/bash
set -e

here=$(cd "$(dirname "${BASH_SOURCE}")"; pwd -P)
. $here/_env.sh

cd kubernetes
make all WHAT="cmd/kubelet cmd/hyperkube cmd/kubectl"

cd ../hyperkube
cp ../kubernetes/_output/local/go/bin/hyperkube .
sed -i "s/VERSION/${BUILD_TAG}/g" master.yml
docker build -t quay.io/kelproject/hyperkube:${BUILD_TAG} .


<filename>teams/06-Uniarts/src/substrate/run.sh
echo Running node $NODE
echo P2P Port        : $P2PPORT
echo WebSocket Port  : $WSPORT
echo RPC Port        : $RPCPORT
echo Validator = $VALIDATOR

if [ "$VALIDATOR" = True ];
then
echo This is a Validator node;
/usr/local/bin/uart \
  --base-path /chain-data \
  --chain staging \
  --port $P2PPORT \
  --ws-port $WSPORT \
  --rpc-port $RPCPORT \
  --validator \
  --rpc-methods=Unsafe \
  --name $NODE \
  --ws-external \
  --rpc-external \
  --rpc-cors all;
else
echo This is a Gateway node;
/usr/local/bin/uart \
  --base-path /chain-data \
  --chain staging \
  --port $P2PPORT \
  --ws-port $WSPORT \
  --rpc-port $RPCPORT \
  --name $NODE \
  --ws-external \
  --rpc-external \
  --rpc-cors all;
fi


#!/usr/bin/env bash

set -eu
GITDIR="$(dirname "$(readlink -f "$0")")"

if [ -z "${FORCE:-}" -a ! \( -d world -a -d mods -a -d server \) ]; then
    echo "$(pwd) doesn't look like a Minecraft server directory."
    echo "Are you sure you want to setup a server in it?"
    echo "Press return to continue, ctrl-c to abort."
    read
fi

# Link in this script, for later use.
ln -sf $GITDIR/update-and-start.sh .

if [[ ! -f server.nix-target ]]; then
    SERVERS=$(nix-instantiate --eval --strict -E "builtins.attrNames (import \"$GITDIR\").packs" | sed -r 's/(["[]|\])//g')
    echo "Which server do you want to build?"
    select server in $SERVERS; do
        echo $server > server.nix-target
        break
    done
fi

# Start the server.
nix-build $GITDIR -A "packs.$(cat server.nix-target).server" -o server --show-trace
nix-build $GITDIR -A ServerPack -o pack --show-trace

exec server/start.sh


<reponame>bmalcover/npbg<gh_stars>0
#!/bin/sh
#Mirar tema parametres!
python $1 $2

#msg=$1" finished: "

ret=$?

[ $ret -ne 0 ] && notify-send "Program Result" "${msg} ERROR!"
[ $ret -eq 0 ] && notify-send "Program Result" "${msg} OK!"


<gh_stars>10-100

KUBECONFIG_FOLDER=${PWD}/configFiles

echo ""
echo "=> DELETE_ALL: Deleting install and instantiate chaincode jobs"
kubectl delete -f ${KUBECONFIG_FOLDER}/chaincode_instantiate.yaml
kubectl delete -f ${KUBECONFIG_FOLDER}/chaincode_install.yaml

echo ""
echo "=> DELETE_ALL: Deleting create and join channel jobs"
kubectl delete -f ${KUBECONFIG_FOLDER}/join_channel.yaml
kubectl delete -f ${KUBECONFIG_FOLDER}/create_channel.yaml

echo ""
echo "=> DELETE_ALL: Deleting blockchain pods and services..."
kubectl delete -f ${KUBECONFIG_FOLDER}/peersDeployment.yaml
kubectl delete -f ${KUBECONFIG_FOLDER}/blockchain-services.yaml

echo ""
echo "=> DELETE_ALL: Deleting generateArtifacts and copyArtifacts jobs..."
kubectl delete -f ${KUBECONFIG_FOLDER}/generateArtifactsJob.yaml
kubectl delete -f ${KUBECONFIG_FOLDER}/copyArtifactsJob.yaml

echo ""
echo "=> DELETE_ALL: Deleting API pods and services..."
kubectl delete -f ${KUBECONFIG_FOLDER}/kubernetes-api-gcloud.yaml
kubectl delete -f ${KUBECONFIG_FOLDER}/kubernetes-api-services.yaml

echo ""
echo "=> DELETE_ALL: Deleting front app pods and services..."
kubectl delete -f ${KUBECONFIG_FOLDER}/kubernetes-front-gcloud.yaml
kubectl delete -f ${KUBECONFIG_FOLDER}/kubernetes-front-services.yaml

echo ""
echo "=> DELETE_ALL: Deleting persistent volume - call."
./delete/delete_nfs.sh $@

sleep 15

echo "\npv:"
kubectl get pv
echo "\npvc:"
kubectl get pvc
echo "\njobs:"
kubectl get jobs
echo "\ndeployments:"
kubectl get deployments
echo "\nservices:"
kubectl get services
echo "\npods:"
kubectl get pods --show-all

echo "\nNetwork Deleted!!\n"


#!/bin/bash

# pod trunk register <EMAIL> '<NAME>' --description='Macbook'

pod trunk push MeteoLVProvider.podspec --use-libraries --allow-warnings


<reponame>KenGeng/flink-ai-extended
#!/usr/bin/env bash
##
## Licensed to the Apache Software Foundation (ASF) under one
## or more contributor license agreements.  See the NOTICE file
## distributed with this work for additional information
## regarding copyright ownership.  The ASF licenses this file
## to you under the Apache License, Version 2.0 (the
## "License"); you may not use this file except in compliance
## with the License.  You may obtain a copy of the License at
##
##   http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing,
## software distributed under the License is distributed on an
## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
## KIND, either express or implied.  See the License for the
## specific language governing permissions and limitations
## under the License.
##
set -e

CURRENT_DIR=`pwd`
trap "cd ${CURRENT_DIR}" EXIT
SOURCE_ROOT=$(cd "$(dirname "$0")";pwd)
echo ${SOURCE_ROOT}
export PYTHONPATH=${SOURCE_ROOT}
cd ${SOURCE_ROOT}
function run_tests() {
    code_path=$1
    test_files=`find ${code_path} | grep -v __pycache__  | grep test_`

    for i in ${test_files}
    do
        echo "RUN TEST: ${i}"
        FILE_NAME=`basename ${i}`
        DIR_NAME=`dirname ${i}`
        cd ${DIR_NAME} && python3 -m unittest ${FILE_NAME}
        cd ${SOURCE_ROOT}
        sleep 2
    done

}

function run_test_class() {
    dir_name=$1
    class_name=$2
    cd ${dir_name} && python3 -m unittest ${class_name}
    cd ${SOURCE_ROOT}
}
# python3 -m unittest discover -v ai_flow.test.api

mvn verify

run_test_class 'ai_flow/test/rest_endpoint/' 'test_client.TestAIFlowClientSqlite'
run_test_class 'ai_flow/test/rest_endpoint/' 'test_mysql_client.TestAIFlowClientMySQL'

run_tests 'ai_flow/test/graph/'
run_tests 'ai_flow/test/common/'
run_tests 'ai_flow/test/translator/'
run_tests 'ai_flow/test/store/'
run_tests 'ai_flow/test/model_center/'
run_tests 'ai_flow/test/notification_service/'
run_tests 'ai_flow/test/application_master/'
run_tests 'ai_flow/test/project/'
run_tests 'ai_flow/test/deployer/'
#run_tests 'ai_flow/test/api/'
#
#run_tests 'flink_ai_flow/tests/python_codes/'
#
#run_tests 'python_ai_flow/test/python_codes/'


#!/bin/sh -e
set -o errexit

###
# Copyright (c) 2015-2019, Antoine "vv221/vv222" <NAME>
# Copyright (c) 2018-2019, BetaRays
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# This software is provided by the copyright holders and contributors "as is"
# and any express or implied warranties, including, but not limited to, the
# implied warranties of merchantability and fitness for a particular purpose
# are disclaimed. In no event shall the copyright holder or contributors be
# liable for any direct, indirect, incidental, special, exemplary, or
# consequential damages (including, but not limited to, procurement of
# substitute goods or services; loss of use, data, or profits; or business
# interruption) however caused and on any theory of liability, whether in
# contract, strict liability, or tort (including negligence or otherwise)
# arising in any way out of the use of this software, even if advised of the
# possibility of such damage.
###

###
# Rogue legacy
# build native Linux packages from the original installers
# send your bug reports to <EMAIL>
###

script_version=20180825.1

# Set game-specific variables

GAME_ID='rogue-legacy'
GAME_NAME='Rogue legacy'

ARCHIVE_GOG='rogue_legacy_en_1_4_0_22617.sh'
ARCHIVE_GOG_URL='https://www.gog.com/game/rogue_legacy'
ARCHIVE_GOG_MD5='60a1a7a7ff84a50e2ac52f2e44dce92d'
ARCHIVE_GOG_VERSION='1.4.0-gog22617'
ARCHIVE_GOG_SIZE='370000'
ARCHIVE_GOG_TYPE='mojosetup'

ARCHIVE_GOG_OLD0='gog_rogue_legacy_2.0.0.2.sh'
ARCHIVE_GOG_OLD0_MD5='1b99d6122f0107b420cad9547efefc5e'
ARCHIVE_GOG_OLD0_VERSION='1.2.0b-gog2.0.0.2'
ARCHIVE_GOG_OLD0_SIZE='240000'
ARCHIVE_GOG_OLD0_TYPE='mojosetup'

ARCHIVE_HUMBLE='roguelegacy-12282013-bin'
ARCHIVE_HUMBLE_URL='https://www.humblebundle.com/store/rogue-legacy'
ARCHIVE_HUMBLE_MD5='b2a18745b911ed87a048440c2f8a0404'
ARCHIVE_HUMBLE_VERSION='1.2.0b-humble131228'
ARCHIVE_HUMBLE_SIZE='240000'
ARCHIVE_HUMBLE_TYPE='mojosetup'

ARCHIVE_DOC0_DATA_PATH_GOG='data/noarch/game'
ARCHIVE_DOC0_DATA_PATH_HUMBLE='data'
ARCHIVE_DOC0_DATA_FILES='./Linux.README'

ARCHIVE_DOC1_DATA_PATH='data/noarch/docs'
ARCHIVE_DOC1_DATA_FILES='./*.txt'

ARCHIVE_GAME_BIN32_PATH_GOG='data/noarch/game'
ARCHIVE_GAME_BIN32_PATH_HUMBLE='data'
ARCHIVE_GAME_BIN32_FILES='Rogue*.bin.x86 lib/libmojoshader.so lib/libmono-2.0.so.1'

ARCHIVE_GAME_BIN64_PATH_GOG='data/noarch/game'
ARCHIVE_GAME_BIN64_PATH_HUMBLE='data'
ARCHIVE_GAME_BIN64_FILES='Rogue*.bin.x86_64 lib64/libmojoshader.so lib64/libmono-2.0.so.1'

ARCHIVE_GAME_DATA_PATH_GOG='data/noarch/game'
ARCHIVE_GAME_DATA_PATH_HUMBLE='data'
ARCHIVE_GAME_DATA_FILES='*.bmp *.dll *.dll.config *.exe Content mono*'

DATA_DIRS='./logs'

APP_MAIN_TYPE='native'
APP_MAIN_EXE_BIN32_GOG='RogueLegacy.bin.x86'
APP_MAIN_EXE_BIN64_GOG='RogueLegacy.bin.x86_64'
APP_MAIN_EXE_BIN32_HUMBLE='RogueCastle.bin.x86'
APP_MAIN_EXE_BIN64_HUMBLE='RogueCastle.bin.x86_64'
APP_MAIN_ICON='Rogue Legacy.bmp'
# Keep compatibility with old archives
APP_MAIN_EXE_BIN32_GOG_OLD0='RogueCastle.bin.x86'
APP_MAIN_EXE_BIN64_GOG_OLD0='RogueCastle.bin.x86_64'

PACKAGES_LIST='PKG_BIN32 PKG_BIN64 PKG_DATA'

PKG_DATA_ID="${GAME_ID}-data"
PKG_DATA_DESCRIPTION='data'

PKG_BIN32_ARCH='32'
PKG_BIN32_DEPS="$PKG_DATA_ID sdl2 openal glibc"

PKG_BIN64_ARCH='64'
PKG_BIN64_DEPS="$PKG_BIN32_DEPS"

# Load common functions

target_version='2.10'

if [ -z "$PLAYIT_LIB2" ]; then
	[ -n "$XDG_DATA_HOME" ] || XDG_DATA_HOME="$HOME/.local/share"
	for path in\
		'./'\
		"$XDG_DATA_HOME/play.it/"\
		"$XDG_DATA_HOME/play.it/play.it-2/lib/"\
		'/usr/local/share/games/play.it/'\
		'/usr/local/share/play.it/'\
		'/usr/share/games/play.it/'\
		'/usr/share/play.it/'
	do
		if [ -z "$PLAYIT_LIB2" ] && [ -e "$path/libplayit2.sh" ]; then
			PLAYIT_LIB2="$path/libplayit2.sh"
			break
		fi
	done
	if [ -z "$PLAYIT_LIB2" ]; then
		printf '\n\033[1;31mError:\033[0m\n'
		printf 'libplayit2.sh not found.\n'
		exit 1
	fi
fi
#shellcheck source=play.it-2/lib/libplayit2.sh
. "$PLAYIT_LIB2"

# Extract game data

extract_data_from "$SOURCE_ARCHIVE"
prepare_package_layout
rm --recursive "$PLAYIT_WORKDIR/gamedata"

# Write launchers

use_archive_specific_value 'APP_MAIN_EXE_BIN32'
use_archive_specific_value 'APP_MAIN_EXE_BIN64'
for PKG in 'PKG_BIN32' 'PKG_BIN64'; do
	write_launcher 'APP_MAIN'
done

# Fix a crash when starting from some terminals

# shellcheck disable=SC2016
pattern='s#^"\./$APP_EXE" .*#& > ./logs/$(date +%F-%R).log#'
sed --in-place "$pattern" "${PKG_BIN32_PATH}${PATH_BIN}/$GAME_ID"
sed --in-place "$pattern" "${PKG_BIN64_PATH}${PATH_BIN}/$GAME_ID"

# Build package

PKG='PKG_DATA'
icons_linking_postinst 'APP_MAIN'
write_metadata 'PKG_DATA'
write_metadata 'PKG_BIN32' 'PKG_BIN64'
build_pkg

# Clean up

rm --recursive "$PLAYIT_WORKDIR"

# Print instructions

print_instructions

exit 0


<reponame>mateusmds/beeplusplus<gh_stars>1-10
set -e
gcc -g -Wall -Wno-dangling-else -Wno-format -Wno-unused-variable ./src/bi.c -o ./bin/bi -fsanitize=leak,address


<gh_stars>0
#!/bin/bash

JAVA_HOME=

if [[ -z ${JAVA_HOME} ]];then
   echo "JAVA_HOME is null, please set it first"
   exit 1
fi

${JAVA_HOME}/bin/java -Xbootclasspath/a:./conf -cp ./apps/* -Dloader.path=./lib -Dloader.main=com.webank.weevent.governance.initial.InitialDb org.springframework.boot.loader.PropertiesLauncher
if [[ $? -ne 0 ]];then
    echo "init governance db failed, please check the configuration of mysql"
    exit 1
else
   echo "init governance db success"
fi


python3 -m venv env
source env/bin/activate
python -m pip install --upgrade pip
python -m pip install --upgrade sqlalchemy
python -m pip install --upgrade fastapi
pip install async-exit-stack async-generator


#!/bin/sh
### TCE TESTCASE
### title: Case where delay slot filler did not fill anything
### xstdout: Filled something.

mach=data/minimal_with_stdout.adf
src=data/dsf-not-working.c
program=$(mktemp tmpXXXXXX)

tcecc $src -llwpr -O3 -a $mach -o $program || exit 2
empty_slots=`tcedisasm -s $mach $program | grep "jump" -A 3  | grep -c "\.\.\. ;"`

if test $empty_slots -gt 14
then
    echo "Too many empty delay slots ($empty_slots)!"
else
    echo "Filled something."
fi
rm -f $program


#!/bin/sh

PORT=$1

cat > cfg/at.cfg <<EOF
[DEFAULT]
ConnectionType=acceptor
SocketAcceptPort=$PORT
SocketReuseAddress=Y
StartTime=00:00:00
EndTime=00:00:00
SenderCompID=ISLD
TargetCompID=TW
ResetOnLogon=Y
FileStorePath=store
[SESSION]
BeginString=FIX.4.0
DataDictionary=../spec/FIX40.xml
[SESSION]
BeginString=FIX.4.1
DataDictionary=../spec/FIX41.xml
[SESSION]
BeginString=FIX.4.2
DataDictionary=../spec/FIX42.xml
[SESSION]
BeginString=FIX.4.3
DataDictionary=../spec/FIX43.xml
[SESSION]
BeginString=FIX.4.4
DataDictionary=../spec/FIX44.xml
[SESSION]
BeginString=FIXT.1.1
DefaultApplVerID=FIX.5.0
TransportDataDictionary=../spec/FIXT11.xml
AppDataDictionary=../spec/FIX50.xml
AppDataDictionary.FIX.5.0SP1=../spec/FIX50SP1.xml
AppDataDictionary.FIX.5.0SP2=../spec/FIX50SP2.xml
EOF


<gh_stars>0
#!/bin/bash
#$ -S /bin/bash
#$ -N NK_0145
#$ -cwd
#$ -o /home/ha5653/backup/YachieLab/ikaken/NK_0145/out
#$ -e /home/ha5653/backup/YachieLab/ikaken/NK_0145/err

# parameters

# usage : "qsub -l s_vmem=16G -l mem_req=16G -t 1-1000 /home/ha5653/backup/YachieLab/code/FRACTAL/MyCodes/shell/NK_0145.sh

source ${HOME}/.bash_profile

CWD="/home/ha5653/backup/YachieLab/ikaken/NK_0145/result"
OUTPUT_DIR=${CWD}/TASK_ID${SGE_TASK_ID}
TREEDISTR="/home/ha5653/backup/YachieLab/code/FRACTAL_exp/MyCodes/R/NormRFdist.R"
PARTIAL="/home/ha5653/backup/YachieLab/code/FRACTAL_exp/MyCodes/python/PartialNRFdist.py"

ESUNUM=13897
i=1

SEQ_FILE=/home/ha5653/backup/YachieLab/ikaken/NK_0145/fractalin/LTPs132_SSU_aligned.fasta.trim.dereplicated.fractalin.fa
TREE_FILE=/home/ha5653/backup/YachieLab/ikaken/NK_0145/dereplicated/LTPs132_SSU_tree.dereplicated.newick

for SUBSAMPLE in 1000	950	900	850	800	750	700	650	600	550	500 450 400 350 300 250 200 150 100 50; do
    for THRESHOLD in 14000	13500	13000	12500	12000	11500	11000	10500	10000	9500	9000	8500	8000	7500	7000	6500	6000	5500	5000	4500	4000	3500	3000	2500	2000; do
        if [ ${SUBSAMPLE} -le ${THRESHOLD} ];then
            for METHOD in rapidnjNJ raxmlMP fasttreeML; do
                if [ $i -eq ${SGE_TASK_ID} ];then
                    mkdir $OUTPUT_DIR; cd ${OUTPUT_DIR}

                    cp ${TREE_FILE} ref_lineage.nwk
                    echo -n "${SUBSAMPLE},${THRESHOLD},${SGE_TASK_ID},${METHOD},${ESUNUM}," >> result.out
                    /usr/bin/time -f "%M,KB,%e,sec," FRACTAL -m ${METHOD} -i ${SEQ_FILE} -k ${SUBSAMPLE} -t ${THRESHOLD} -e 2>&1 1> /dev/null | tr -d "\n" >> result.out
                    python3 $PARTIAL ref_lineage.nwk FRACTALout.nwk $TREEDISTR >> result.out
                    rm -r ${METHOD}/FRACTALout/nodes
                fi
                i=`expr $i + 1`
            done
        fi
    done
done


<filename>bin/release.sh
#!/bin/bash

# ------------------------------------------------------------------------
# Usage:
# sh release.sh --env asf
# sh release.sh --env echartsjs
# sh release.sh --env dev # the same as "debug"
# sh release.sh --onlynext # only build next
# # Check `./config` to see the available env
# ------------------------------------------------------------------------

while [[ $# -gt 0 ]]; do
    case "$1" in
        --env) envType="$2"; shift; shift ;;
        --env=*) envType="${1#*=}"; shift ;;
        *) shift ;;
    esac
done
if [[ ! -n "${envType}" ]]; then
    echo "--env must be specified."
    exit 1;
fi

echo "Building with env type: ${envType}"

currWorkingDir=$(pwd)
thisScriptDir=$(cd `dirname $0`; pwd)
wwwProjectDir="${thisScriptDir}/..";
docProjectDir="${wwwProjectDir}/../echarts-doc";
examplesProjectDir="${wwwProjectDir}/../echarts-examples";
handbookProjectDir="${wwwProjectDir}/../echarts-handbook";
websiteTargetDir="${wwwProjectDir}/../echarts-website";
themeProjectDir="${wwwProjectDir}/../echarts-theme-builder";

cd ${wwwProjectDir}

if [[ "${envType}" = "echartsjs" ]]; then
    mkdir ${wwwProjectDir}/release
fi

# Cleanup
cd ${thisScriptDir}
node build.js --env ${envType} --clean

# Build Theme Builder
echo "Build theme builder ..."
if [ ! -d "${themeProjectDir}" ]; then
    echo "Directory ${themeProjectDir} DOES NOT exists."
    exit 1
fi
cd ${themeProjectDir}
node build.js --release

# Build doc
echo "Build doc ..."
if [ ! -d "${docProjectDir}" ]; then
    echo "Directory ${docProjectDir} DOES NOT exists."
    exit 1
fi
cd ${docProjectDir}
npm run build:site
node build.js --env ${envType}
cd ${currWorkingDir}
echo "Build doc done."

# Build examples
echo "Build examples..."
if [ ! -d "${examplesProjectDir}" ]; then
    echo "Directory ${examplesProjectDir} DOES NOT exists."
    exit 1
fi
cd ${examplesProjectDir}
npm run release
cd ${currWorkingDir}
echo "Build examples done."

# Build SPA pages.
cd ${thisScriptDir}
node releasePages.js

# Build www
echo "Build www ..."
cd ${wwwProjectDir}
node bin/build.js --env ${envType}
cd ${currWorkingDir}
echo "Build www done."

# Build handbook after www page build.
# handbook needs fetch nav page.
echo "Build handbook ..."
if [ ! -d "${handbookProjectDir}" ]; then
    echo "Directory ${handbookProjectDir} DOES NOT exists."
    exit 1
fi
cd ${handbookProjectDir}
npm run build:${envType}
rm -rf ${websiteTargetDir}/handbook
cp -R ${handbookProjectDir}/dist ${websiteTargetDir}/handbook
echo "Build handbook done."

echo "echarts-www release done for ${envType}"


set -e

bash scripts/run-test.bash tests/plot_cost.py \
  --type time \
  tests/plot-data.json \
  docs/time-complexity.png \
  --block-sizes 1 2 3 4 5 10 20 50 \
  --no-pytorch
bash scripts/run-test.bash tests/plot_cost.py \
  --type time \
  tests/plot-data.json \
  docs/time-complexity-2.png
bash scripts/run-test.bash tests/plot_cost.py \
  --type space \
  tests/plot-data.json \
  docs/space-complexity.png \
  --block-sizes 50
bash scripts/run-test.bash tests/plot_cost.py \
  --type space \
  tests/plot-data.json \
  docs/space-complexity-2.png \
  --block-sizes 1 2 3 4 5 10 20 50 \
  --no-unbounded \
  --no-pytorch


<filename>koolproxy/koolproxy/scripts/KoolProxy_rules_status.sh
#!/bin/sh

alias echo_date1='echo $(date +%Y年%m月%d日\ %X)'
export KSROOT=/koolshare
source $KSROOT/scripts/base.sh
eval `dbus export koolproxy_`

version=`koolproxy -v`
status=`ps|grep -w koolproxy | grep -cv grep`
date=`echo_date1`
pid=`pidof koolproxy`

#easylist_rules_local=`cat $KSROOT/koolproxy/data/rules/easylistchina.txt  | sed -n '3p'|awk '{print $3,$4}'`
#easylist_nu_local=`grep -E -v "^!" $KSROOT/koolproxy/data/rules/easylistchina.txt | wc -l`
#abx_rules_local=`cat $KSROOT/koolproxy/data/rules/chengfeng.txt  | sed -n '3p'|awk '{print $3,$4}'`
#abx_nu_local=`grep -E -v "^!" $KSROOT/koolproxy/data/rules/chengfeng.txt | wc -l`
#fanboy_rules_local=`cat $KSROOT/koolproxy/data/rules/fanboy.txt  | sed -n '4p'|awk '{print $3,$4}'`
#fanboy_nu_local=`grep -E -v "^!" $KSROOT/koolproxy/data/rules/fanboy.txt | wc -l`
video_rules_local=`cat $KSROOT/koolproxy/data/rules/koolproxy.txt  | sed -n '4p'|awk '{print $3,$4}'`

if [ "$status" -ge "1" ]; then
	if [ "$koolproxy_video_rules" == "1" ]; then
		[ "$koolproxy_video_rules" == "1" ] && http_response "视频规则：$video_rules_local"
	else
		http_response "未加载！"
	fi
else
	http_response "未加载！"
fi


<filename>batch-ic2.sh
#!/bin/bash -x

set -e

WORDCOUNT_RANGE=$(seq 20 38)
TERASORT_RANGE=$(seq 30 36)
PAGERANK_RANGE=$(seq 15 24)
RUN_RANGE=$(seq 1 1)

RUN_SPARK=("$HOME/thrill/run/slurm/invoke.sh" "setup-slurm/run-spark.sh")
RUN_FLINK=("$HOME/thrill/run/slurm/invoke.sh" "setup-slurm/run-flink.sh")

wordcount_prepare() {
    [ -z $RANGE ] && RANGE=$WORDCOUNT_RANGE
    for scale in $RANGE; do
        SCALE=$scale ./workloads/wordcount/prepare/prepare.sh
    done
}

pagerank_prepare() {
    [ -z $RANGE ] && RANGE=$PAGERANK_RANGE
    for scale in $RANGE; do
        SCALE=$scale ./workloads/pagerank/prepare/prepare.sh
    done
}

terasort_prepare() {
    [ -z $RANGE ] && RANGE=$TERASORT_RANGE
    for scale in $RANGE; do
        SCALE=$scale ./workloads/terasort/prepare/prepare.sh
    done
}

################################################################################

function log2 {
    local x=0
    for ((y=$1 - 1; $y > 0; y >>= 1)); do
        let x=$x+1
    done
    echo $x
}

function log2hosts {
    echo $(log2 $SLURM_NNODES)
}

################################################################################

wordcount_scale() {

    s=$(log2hosts)
    WEAKSCALE=$((35 + s))
    export BENCHMARK=wordcount

    SCALE=$WEAKSCALE ./workloads/wordcount/prepare/prepare.sh

    set +e

    for run in $RUN_RANGE; do
        SCALE=$WEAKSCALE RUN=$run ${RUN_SPARK[@]} \
             ./workloads/wordcount/spark_scala/bin/run.sh
        SCALE=$WEAKSCALE RUN=$run ${RUN_SPARK[@]} \
             ./workloads/wordcount/spark_java/bin/run.sh
    done

    for run in $RUN_RANGE; do
        SCALE=$WEAKSCALE RUN=$run ${RUN_FLINK[@]} \
             ./workloads/wordcount/flink_scala/bin/run.sh
        SCALE=$WEAKSCALE RUN=$run ${RUN_FLINK[@]} \
             ./workloads/wordcount/flink_java/bin/run.sh
    done

    for run in $RUN_RANGE; do
        SCALE=$WEAKSCALE RUN=$run \
             ./workloads/wordcount/thrill/bin/run.sh
    done

    set -e

    rm -rvf $WORK/HiBench/Wordcount/$SCALE
}

################################################################################

pagerank_scale() {

    s=$(log2hosts)
    WEAKSCALE=$((22 + s))
    export BENCHMARK=pagerank

    SCALE=$WEAKSCALE ./workloads/pagerank/prepare/prepare.sh

    set +e

    for run in $RUN_RANGE; do
        SCALE=$WEAKSCALE RUN=$run ${RUN_SPARK[@]} \
             ./workloads/pagerank/spark_scala/bin/run.sh
        SCALE=$WEAKSCALE RUN=$run ${RUN_SPARK[@]} \
             ./workloads/pagerank/spark_java/bin/run.sh
    done

    for run in $RUN_RANGE; do
        SCALE=$WEAKSCALE RUN=$run ${RUN_FLINK[@]} \
             ./workloads/pagerank/flink_scala/bin/run.sh
        SCALE=$WEAKSCALE RUN=$run ${RUN_FLINK[@]} \
             ./workloads/pagerank/flink_java/bin/run.sh
    done

    for run in $RUN_RANGE; do
        SCALE=$WEAKSCALE RUN=$run \
             ./workloads/pagerank/thrill/bin/run.sh
    done

    set -e

    rm -rvf $WORK/HiBench/Pagerank/$SCALE
}

################################################################################

terasort_scale() {

    s=$(log2hosts)
    WEAKSCALE=$((34 + s))
    export BENCHMARK=terasort

    SCALE=$WEAKSCALE ./workloads/terasort/prepare/prepare.sh

    set +e

    for run in $RUN_RANGE; do
        SCALE=$WEAKSCALE RUN=$run ${RUN_SPARK[@]} \
             ./workloads/terasort/spark_java/bin/run.sh
        SCALE=$WEAKSCALE RUN=$run ${RUN_SPARK[@]} \
             ./workloads/terasort/spark_scala/bin/run.sh
    done

    for run in $RUN_RANGE; do
        SCALE=$WEAKSCALE RUN=$run ${RUN_FLINK[@]} \
             ./workloads/terasort/flink_scala/bin/run.sh
    done

    for run in $RUN_RANGE; do
        SCALE=$WEAKSCALE RUN=$run \
             ./workloads/terasort/thrill/bin/run.sh
    done

    set -e

    rm -rvf $WORK/HiBench/Terasort/$SCALE
}

################################################################################

kmeans_scale() {

    s=$(log2hosts)
    WEAKSCALE=$((24 + s))
    export BENCHMARK=kmeans

    SCALE=$WEAKSCALE ./workloads/kmeans/prepare/prepare.sh

    set +e

    for run in $RUN_RANGE; do
        SCALE=$WEAKSCALE RUN=$run ${RUN_SPARK[@]} \
             ./workloads/kmeans/spark_java/bin/run.sh
        SCALE=$WEAKSCALE RUN=$run ${RUN_SPARK[@]} \
             ./workloads/kmeans/spark_scala/bin/run.sh
    done

    for run in $RUN_RANGE; do
        SCALE=$WEAKSCALE RUN=$run \
             ./workloads/kmeans/thrill/bin/run.sh
    done

    set -e

    rm -rvf $WORK/HiBench/Kmeans/$SCALE
}

################################################################################

all_scale() {
    wordcount_scale
    pagerank_scale
    terasort_scale
    kmeans_scale
}

################################################################################

for p in $@; do
    $p
done

################################################################################


<gh_stars>0
#!/bin/bash

inputs=./samples/*/*.s

frames=( )

outputext=

NOPIE=
if [[ -e "/etc/debian_version" ]]; then
	NOPIE=-no-pie
fi

exebase="gcc ${NOPIE}"
use_stdin="false"
use_envpath="true"

#===============================================================================

source ./submodules/bat/test.sh --no-build --no-diff


<gh_stars>0
#! /bin/bash

rm -rf /home/dev/.config/xfce4
cp -pr /home/dev/tools/xfce4 /home/dev/.config/

anyenv install --init

anyenv install nodenv
anyenv install goenv

exec $SHELL -l


. config
for ip in $IP1 $IP2 $IP3; do scp ../agents/$1 ubuntu@$ip:$1; ssh ubuntu@$ip "sudo chown root.root $1; sudo chmod a+x $1; sudo mv $1 /usr/lib/ocf/resource.d/percona/$1"; done


#!/bin/bash
# jsonarray2csv.sh - Convert any homogeneous JSON array into a CSV table.
#    Requires jq (https://stedolan.github.io/jq/).
#
# For example,
# jq -r 'map(.ticket_pool)' fullscan.json | ./jsonarray2csv.sh ticketpool.csv
#
# Copyright (c) 2016 TJI.
# ISC licensed (see the LICENSE file at the root of the repository).

in=`tee`
# echo $in

echo $in | jq -r '(.[0] | keys_unsorted) as $keys | $keys, map([.[ $keys[] ]])[] | @csv' > $1


#!/bin/bash

#update user with your GitHub username
user=ENTER_USERNAME

repos=(
"osc-core"
"security-mgr-sample-plugin"
"security-mgr-api"
"sdn-controller-api"
"sdn-controller-nsc-plugin"
"opensecuritycontroller.org"
"community"
"osc-nuage-plugin"
)

for repo in "${repos[@]}"
do
    git clone <EMAIL>:$user/"${repo}".git
    cd "${repo}"/
    git remote add upstream <EMAIL>:opensecuritycontroller/"${repo}".git
    git remote set-url --push upstream no_push
    cd ../
done


<reponame>ihor-sokoliuk/newsbot
#!/bin/bash
echo

program_name="newsbot"
telegram_bot_token=
need_backup=true

while getopts p:t:b: option
do
case "${option}"
in
p) program_name=${OPTARG};;
t) telegram_bot_token=${OPTARG};;
b) need_backup=${OPTARG};;
esac
done

program_workdir="/opt/telegram_bot/$program_name"
program_workdir_backup="$program_workdir.backup"
service_name=${program_name}.service
service_file="/etc/systemd/system/$service_name"
echo Program name = ${program_name}
echo Program workdir = ${program_workdir}
echo Service file = ${service_file}

echo "---=== Stage 1 ===---"

echo "Building project..."
go build -o ${program_name}
if [[ ! -f ${program_name} ]]
then
    echo "$program_name was not built successfully. Abort!"
    exit 1
fi
echo "Build complited."

echo "---=== Stage 2 ===---"

if [[ -e ${service_file} ]]
then
	echo "Removing service..."
	systemctl stop ${program_name}
  	systemctl disable ${program_name}
  	rm -f ${service_file}
  	systemctl daemon-reload
    echo "Service removed."
else
    echo "Skip removing service."
fi

echo "---=== Stage 3 ===---"

if [[ -d ${program_workdir} ]]
then
    if [[ "$need_backup" == true ]]
    then
        echo "Backup project..."
        cp -R ${program_workdir} ${program_workdir_backup}
        echo "Backup completed."
    else
        echo "No need in backup."
    fi

	rm -r ${program_workdir}

else
    echo "No need in backup."
fi

echo "---=== Stage 4 ===---"
echo "Copying all the files..."
mkdir -p ${program_workdir}
cp ${program_name} ${program_workdir}
sed -i 's/{ TOKEN }/'${telegram_bot_token}'/g' ${program_name}.yml
cp ${program_name}.yml ${program_workdir}
if [[ "$need_backup" == true ]]
then
	cp ${program_workdir_backup}/${program_name}.log ${program_workdir}
	cp ${program_workdir_backup}/${program_name}.db ${program_workdir}
    rm -r -f ${program_workdir_backup}
    echo "Backup of database and logs restored."
fi
echo "Copying all the files done."

echo "---=== Stage 5 ===---"

echo "Creating service..."

/bin/bash -c "echo '[Unit]
Description='$service_name'
Wants=network-online.target
After=network-online.target

[Service]
WorkingDirectory=$program_workdir
ExecStart='$program_workdir/$program_name'
Restart=always
KillMode=process

[Install]
WantedBy=multi-user.target' >> $service_file"

systemctl daemon-reload
systemctl enable ${service_name}
systemctl start ${service_name}

echo "Service creates"


#!/bin/bash

SCHEME=${1:-godot_plugin}
PROJECT=${2:-godot_plugin.xcodeproj}
OUT=godot_example
CLASS=PluginExample

xcodebuild archive \
    -project "./$PROJECT" \
    -scheme $SCHEME \
    -archivePath "./bin/ios_release.xcarchive" \
    -sdk iphoneos \
    SKIP_INSTALL=NO \
    GCC_PREPROCESSOR_DEFINITIONS="PluginClass=${CLASS}"

xcodebuild archive \
    -project "./$PROJECT" \
    -scheme $SCHEME \
    -archivePath "./bin/sim_release.xcarchive" \
    -sdk iphonesimulator \
    SKIP_INSTALL=NO \
    GCC_PREPROCESSOR_DEFINITIONS="PluginClass=${CLASS}"

xcodebuild archive \
    -project "./$PROJECT" \
    -scheme $SCHEME \
    -archivePath "./bin/ios_debug.xcarchive" \
    -sdk iphoneos \
    SKIP_INSTALL=NO \
    GCC_PREPROCESSOR_DEFINITIONS="DEBUG_ENABLED=1 PluginClass=${CLASS}"

xcodebuild archive \
    -project "./$PROJECT" \
    -scheme $SCHEME \
    -archivePath "./bin/sim_debug.xcarchive" \
    -sdk iphonesimulator \
    SKIP_INSTALL=NO \
    GCC_PREPROCESSOR_DEFINITIONS="DEBUG_ENABLED=1 PluginClass=${CLASS}"

mv "./bin/ios_release.xcarchive/Products/usr/local/lib/lib${SCHEME}.a" "./bin/ios_release.xcarchive/Products/usr/local/lib/${OUT}.a"
mv "./bin/sim_release.xcarchive/Products/usr/local/lib/lib${SCHEME}.a" "./bin/sim_release.xcarchive/Products/usr/local/lib/${OUT}.a"
mv "./bin/ios_debug.xcarchive/Products/usr/local/lib/lib${SCHEME}.a" "./bin/ios_debug.xcarchive/Products/usr/local/lib/${OUT}.a"
mv "./bin/sim_debug.xcarchive/Products/usr/local/lib/lib${SCHEME}.a" "./bin/sim_debug.xcarchive/Products/usr/local/lib/${OUT}.a"

rm -rf "./bin/${OUT}.release.xcframework"
rm -rf "./bin/${OUT}.debug.xcframework"

xcodebuild -create-xcframework \
    -library "./bin/ios_release.xcarchive/Products/usr/local/lib/${OUT}.a" \
    -library "./bin/sim_release.xcarchive/Products/usr/local/lib/${OUT}.a" \
    -output "./bin/${OUT}.release.xcframework"

xcodebuild -create-xcframework \
    -library "./bin/ios_debug.xcarchive/Products/usr/local/lib/${OUT}.a" \
    -library "./bin/sim_debug.xcarchive/Products/usr/local/lib/${OUT}.a" \
    -output "./bin/${OUT}.debug.xcframework"


#!/bin/zsh

zmodload zsh/mapfile

_zc__ssh_aliases=("${(f)mapfile[$(
    _zc__get_user_conf_file 'dots' "${_zc__dots_file_assign_ssh_aliases_list}"
)]}")

for l in ${(a)_zc__ssh_aliases}; do
    _zc__run_alias_ssh "${l%\=*}" "${l##*\=}"
done

zmodload -u zsh/mapfile