document_id stringlengths 8 12 | document stringlengths 50 3.21k | split stringclasses 1
value |
|---|---|---|
d_bash_10100 | ---
+++
@@ -13,7 +13,7 @@
gem list --local bundler | grep bundler || gem install bundler --no-ri --no-rdoc
- if test $RBENV_VERSION = "1.8.7-p358"; then
+ if test $RBENV_VERSION = "1.8.7-p371"; then
RAILS_VERSIONS=(3.2.13)
else
RAILS_VERSIONS=(3.2.13 4.0.0.rc1)
@@ -27,13 +27,13 @@
done
}
-... | bash |
d_bash_10101 | ---
+++
@@ -1,4 +1,4 @@
# Show the current git branch in the prompt.
-
-export PS1='\[\033[01;32m\]\u@\h\[\033[01;36m\] \w\[\033[01;33m\]$(__git_ps1)\[\033[01;36m\] \$\[\033[00m\] '
+# show the current git branch on the prompt.
export GIT_PS1_SHOWDIRTYSTATE=1
+export PS1="${GREEN}\u@\h${CYAN} \w${YELLOW}\$(__git_ps... | bash |
d_bash_10102 | ---
+++
@@ -1,3 +1,3 @@
#!/bin/bash
docker build -t datahub-ui:latest .
-docker run --rm -d -p 8080:80 -e PROXY_PASS_URL=http://localhost:3006/api -e PROXY_PASS_APICC_URL=http://localhost:3003/apicc datahub-ui:latest
+docker run --rm -d -p 8080:80 -e PROXY_PASS_WEBAPI=http://localhost:3006/api -e PROXY_PASS_APICC=h... | bash |
d_bash_10103 | ---
+++
@@ -2,5 +2,4 @@
REPONAME=${1:-fedora}
-dnf repograph --repoid $REPONAME | cat - | tail -n +2 > $REPONAME.dot
-cd data && ln -s ../$REPONAME.dot packages && cd ../
+dnf repograph --repoid $REPONAME | cat - | tail -n +2 > data/$REPONAME.dot | bash |
d_bash_10104 | ---
+++
@@ -3,10 +3,12 @@
./nvidia-installer \
--accept-license \
--no-distro-scripts \
+ --no-glvnd-egl-client \
+ --no-glvnd-glx-client \
+ --no-install-libglvnd \
--no-kernel-module \
--no-kernel-module-source \
--no-nvidia-modprobe \
--no-precompiled-interface \
- --no-r... | bash |
d_bash_10105 | ---
+++
@@ -12,8 +12,7 @@
echo `redis-cli INFO | grep redis_version`
echo "\n** Ruby versions:"
-echo `rbenv global 2.1.1 && ruby --version`
-echo `rbenv global 2.1.0 && ruby --version`
+echo `rbenv global 2.1 && ruby --version`
echo `rbenv global 2.0.0 && ruby --version`
echo `rbenv global 1.9.3 && ruby --vers... | bash |
d_bash_10106 | ---
+++
@@ -21,7 +21,7 @@
echo 'Completed upload!'
else
echo 'Upload failed.'
- return 1
+ exit 1
fi
else
echo 'Bintray Upload => Not a tagged build so will not upload' | bash |
d_bash_10107 | ---
+++
@@ -1,5 +1,5 @@
#!/bin/bash
echo "Starting new tmux session: main"
tmux new -d -s main
-tmux send-keys -t main 'cd /home/pi' ENTER
-tmux send-keys -t main '/usr/local/bin/shairplay --apname="AirPortPi" --password=""' ENTER
+tmux send-keys -t main "cd /home/pi" ENTER
+tmux send-keys -t main "/usr/local/bin/... | bash |
d_bash_10108 | ---
+++
@@ -1,4 +1,26 @@
#!/bin/sh
-python2 bin/yucca -t || exit 1
-python3 bin/yucca -t || exit 1
+if [ "x$PYTHON" != "x" ]; then
+ if command -v "$PYTHON" > /dev/null 2>&1; then
+ $PYTHON bin/yucca -t || exit 1
+ else
+ echo "$PYTHON not found on executable search path. Aborting."
+ ex... | bash |
d_bash_10109 | ---
+++
@@ -1,3 +1,3 @@
#!/bin/sh
-ruby -e 'loop do exit unless `vagrant status` =~ /stopping/; puts "."; sleep 10; end'
+ruby -e 'STDOUT.sync=true; loop do exit unless `vagrant status` =~ /stopping/; print "."; sleep 10; end' | bash |
d_bash_10110 | ---
+++
@@ -19,7 +19,7 @@
echo "repo init -u https://android.googlesource.com/platform/manifest -b $1";
repo init -u https://android.googlesource.com/platform/manifest -b $1;
fi
-export http_proxy=192.168.137.1:8087
-export https_proxy=192.168.137.1:8087
+export http_proxy=$proxy_host:$proxy_port
+export h... | bash |
d_bash_10111 | ---
+++
@@ -1,5 +1,5 @@
#!/bin/bash
-git update-ref HEAD master
+git update-ref HEAD refs/heads/master
git checkout master
mvn release:prepare -B
mvn release:perform --settings deploy-settings.xml | bash |
d_bash_10112 | ---
+++
@@ -11,7 +11,7 @@
OCE_REPO_URL=git://github.com/tpaviot/oce.git
OCE_UPSTREAM_URL=git://github.com/tpaviot/oce.git
OCE_REPO_TAG_STD=OCE-0.14.1
- OCE_REPO_TAG_EXP=master
+ OCE_REPO_TAG_EXP=OCE-0.15
}
getOceVersion
| bash |
d_bash_10113 | ---
+++
@@ -1,7 +1,8 @@
#!/bin/bash
# Install dependencies
-sudo yum -y install git python-pip
+sudo yum -y install git python-setuptools
+sudo easy_install pip
sudo pip install ansible
export RELEASE=${1:-"master"} | bash |
d_bash_10114 | ---
+++
@@ -22,7 +22,23 @@
editor="sed -i -e '2,${end}s/^pick /squash /'"
fi
initial_commit=`git log --pretty=format:%H | tail -1`
-git -c core.editor="$editor" rebase -i $initial_commit
+
+if [ "`git -c 2>&1 | head -1`" = "Unknown option: -c" ]; then
+ # Save old core.editor value
+ old_editor=`git config -l ... | bash |
d_bash_10115 | ---
+++
@@ -11,7 +11,9 @@
[ -e "$BUILD_DIR/build.db" ] || ./build.sh
rm -rf .docs.old
mv docs .docs.old 2>/dev/null
+[ -e .build ] || ln -s "$BUILD_DIR" .build
sourcekitten doc --spm-module $Mod -- --build-path "$BUILD_DIR" \
$CCFLAGS $LINKFLAGS > "$BUILD_DIR/$Mod-doc.json"
jazzy --sourcekitten-sourcefile "$B... | bash |
d_bash_10116 | ---
+++
@@ -4,6 +4,6 @@
[ -f $virtualenvwrapper ] && source $virtualenvwrapper
alias pyserve='foreman start'
-alias pyservedebug='python -m pdb manage.py runserver'
+alias pyservedebug='foreman run python -m pdb manage.py runserver'
alias pyman='python manage.py' | bash |
d_bash_10117 | ---
+++
@@ -7,11 +7,24 @@
use_bazel.sh latest
bazel version
+# Print bazel testlogs to stdout when tests failed.
+function print_test_logs {
+ # TODO(yannic): Only print logs of failing tests.
+ testlogs_dir=$(bazel info bazel-testlogs)
+ testlogs=$(find "${testlogs_dir}" -name "*.log")
+ for log in $testlogs... | bash |
d_bash_10118 | ---
+++
@@ -1,14 +1,37 @@
#!/usr/bin/env bash
parallel=50
+max_bg=400
[ ! -e "results" ] && mkdir results
-i=1
-while [ $i -lt 1000000 ]
+
+function wait_for_jobs() {
+ local no_jobs
+ no_jobs=$(jobs | wc -l)
+
+ while [ $no_jobs -gt $1 ]; do
+ sleep 1
+ no_jobs=$(jobs | wc -l)
+ done
+}
... | bash |
d_bash_10119 | ---
+++
@@ -4,7 +4,7 @@
CLUSTER=$1
TASK_DEFINITION=${2:-waypoint-hub}
if [ -z "$CLUSTER" ] || [ -z "$TASK_DEFINITION" ]; then
- echo "usage: purge-service.sh CLUSTER [TASK_DEFINITION]"
+ echo "usage: $0 CLUSTER [TASK_DEFINITION]"
exit 1
fi
| bash |
d_bash_10120 | ---
+++
@@ -1,3 +1,7 @@
+if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
+ rvm get head || true
+fi
+
set -e
RUST_BACKTRACE=1 cargo test --verbose --features $CLANG_VERSION -- --nocapture | bash |
d_bash_10121 | ---
+++
@@ -3,7 +3,7 @@
DATABASE_VERSION=`echo 'select database_version from database_version' | mysql --skip-column-names -u hudson -phudson hudson_mifos_gazelle_trunk`
tempDir=`mktemp -d`
-outputDir=/var/www/schema/trunk/$DATABASE_VERSION
+outputDir=/var/www/schema/head/$DATABASE_VERSION
if [ -d $outputDir ]... | bash |
d_bash_10122 | ---
+++
@@ -28,7 +28,15 @@
gcloud auth activate-service-account --key-file="${PROW_SERVICE_ACCOUNT}"
fi
+if ! [ -x "$(command -v kubectl)" ]; then
+ gcloud components install kubectl
+fi
pushd "${TREE}/boskos"
make update-config
popd
+
+# switch back to default service account for uploading logs
+if [[ -a ... | bash |
d_bash_10123 | ---
+++
@@ -4,9 +4,9 @@
# TODO: detect whether firefox-bin is on the path first
-echo "Please make sure firefox-bin is on the path. Otherwise you will have problems along the lines of:"
-echo " SeleniumCommandError: ERROR: No launcher found for sessionId null."
-echo "when you run your selenium tests."
+#ech... | bash |
d_bash_10124 | ---
+++
@@ -1,6 +1,8 @@
#!/bin/bash
+sudo mkdir -p /srv/docker/grafana/data
docker-compose up -d
+sudo chown -R 472:472 /srv/docker/grafana/data
echo "Grafana: http://127.0.0.1:3000 - admin/admin"
| bash |
d_bash_10125 | ---
+++
@@ -8,7 +8,8 @@
if [ "$1" = "staging" ]; then
echo "Deploying to staging";
- ENCRYPTED_KEY="ci/staging-sync-id_rsa.enc"
+ #ENCRYPTED_KEY="ci/staging-sync-id_rsa.enc"
+ ENCRYPTED_KEY="ci/prod-sync-id_rsa.enc"
TARGET_SITE="staging.wordspeak.org"
elif [ "$1" = "prod" ]; then
echo "Deploying to pr... | bash |
d_bash_10126 | ---
+++
@@ -22,6 +22,8 @@
function wait_for_migrations {(
set +e
for try in {1..60} ; do
+ # Kind of ugly but not sure if there's another way to determine if migrations haven't run
+ # migrate --list returns a checkbox list of migrations, empty checkboxes mean they haven't been run
python manage.py ... | bash |
d_bash_10127 | ---
+++
@@ -27,7 +27,7 @@
# upload to coveralls
if [ "$PTAB_ENV_COVERALLS" = "1" ]; then
echo '\033[36mUploading to coveralls.io...\033[39;49m'
- coveralls
+ coveralls --exclude include --exclude build --exclude tests
fi
# we're done! | bash |
d_bash_10128 | ---
+++
@@ -1,6 +1,8 @@
#!/usr/bin/env bash
-node index < test/input.log > test/output.log && if [[ -n $(diff test/output.log test/correct-output.log) ]];
+node index < test/input.log > test/output.log
+
+if [[ -n $(diff test/output.log test/correct-output.log) ]];
then
echo 'Fail';
diff test/output.log ... | bash |
d_bash_10129 | ---
+++
@@ -22,7 +22,7 @@
# " ## %s".format(filename)
# " %s".format(line)
(cd $__DOTFILES;
- for f in $(ls etc/bash/*.sh); do
+ for f in $(ls etc/bash/*.sh etc/usrlog/usrlog.sh etc/xlck.sh); do
echo "#### $f";
cat $f | scripts/pyline.py -r '^\s*#+\s+.*' 'rgx and l';
... | bash |
d_bash_10130 | ---
+++
@@ -14,7 +14,7 @@
push_to_github() {
git remote add origin https://github.com/rslifka/fate_of_all_fools.git > /dev/null 2>&1
- git push --quiet --set-upstream origin master
+ git push --set-upstream origin master
}
setup_git | bash |
d_bash_10131 | ---
+++
@@ -7,7 +7,7 @@
# n98-magerun basic command completion
_n98_magerun_get_command_list () {
- n98-magerun.phar --no-ansi | sed "1,/Available commands/d" | awk '/^\s+[a-z]+/ { print $1 }'
+ n98-magerun.phar --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z\-:]+/ { print $1 }'
}
_n98_magerun () ... | bash |
d_bash_10132 | ---
+++
@@ -1,4 +1,7 @@
#!/bin/bash
+
+# add NodeJS apt source
+curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
packages=(
"atom"
@@ -7,6 +10,7 @@
"google-chrome-stable"
"inkscape"
"nginx"
+ "nodejs"
"vlc"
)
| bash |
d_bash_10133 | ---
+++
@@ -5,7 +5,7 @@
###############################################################################
# Check for Homebrew and install if needed
-if test ! $(which brew); then
+if test ! $(command -v brew); then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)... | bash |
d_bash_10134 | ---
+++
@@ -18,7 +18,9 @@
setPatchelfTriggerVars() {
PATCHELF_BLDRVERSION_STD=${PATCHELF_BLDRVERSION_STD:-"0.8"}
PATCHELF_BLDRVERSION_EXP=${PATCHELF_BLDRVERSION_EXP:-"0.8"}
- PATCHELF_BUILDS=${PATCHELF_BUILDS:-"ser"}
+ if [[ `uname` =~ Linux ]]; then
+ PATCHELF_BUILDS=${PATCHELF_BUILDS:-"ser"}
+ fi
PA... | bash |
d_bash_10135 | ---
+++
@@ -20,7 +20,7 @@
# Lock acquired. Pause briefly to allow the previous holder to restart
# If it takes longer than five seconds run `systemctl restart consul`
# after releasing the lock then we might cause a quorum outage
-sleep 5
+sleep 10
# Verify that there is a leader before releasing the lock and r... | bash |
d_bash_10136 | ---
+++
@@ -15,6 +15,9 @@
#Run Ansible
PYTHONIOENCODING='utf-8' ansible-playbook desktop.yml
+#Delete src folder
+rm -rf ~/src
+
#Return to normal password sudo
sudo sed -i .bak -e 's/^\(%wheel.*ALL=(ALL) NOPASSWD: ALL\)/#\1/g' /etc/sudoers
sudo dscl . delete /Groups/wheel GroupMembership $USER | bash |
d_bash_10137 | ---
+++
@@ -25,7 +25,7 @@
nginx
# Check if config or certificates were changed
-while inotifywait -q -r /etc/nginx /etc/letsencrypt; do
+while inotifywait -q -r --exclude '\.git/' -e modify -e create -e delete /etc/nginx /etc/letsencrypt; do
log "Configuration changes detected. Will send reload signal to nginx... | bash |
d_bash_10138 | ---
+++
@@ -4,7 +4,6 @@
local whitelist_regex blacklist_regex
whitelist_regex=$(cat "$env_dir/ENV_BUILDPACK_EXPORT_VARS" 2> /dev/null)
- blacklist_regex=${4:-'^(PATH|GIT_DIR|CPATH|CPPATH|LD_PRELOAD|LIBRARY_PATH)$'}
if [ ! -n "$whitelist_regex" ]; then
return
@@ -14,8 +13,8 @@
for... | bash |
d_bash_10139 | ---
+++
@@ -6,4 +6,10 @@
CFLAGS=-fPIC
fi
+ERLWS=`erl -noshell -eval "io:format(\"~p\",[erlang:system_info(wordsize)])" -s erlang halt`
+
+if [ "$ERLWS" == 4 ]; then
+ CFLAGS=-m32
+fi
+
[ -d deps/uuid-1.6.2 ] || (cd deps && tar xzvfp uuid-1.6.2.tar.gz && cd uuid-1.6.2 && CFLAGS=$CFLAGS ./configure -disable-d... | bash |
d_bash_10140 | ---
+++
@@ -1,10 +1,12 @@
# Source this file to prepare a mac for running scripts
hash greadlink 2>/dev/null || { echo >&2 "Required tool greadlink is not installed, please run 'brew install coreutils'"; exit 1; }
hash gfind 2>/dev/null || { echo >&2 "Required tool gfind is not installed, please run 'brew install ... | bash |
d_bash_10141 | ---
+++
@@ -2,15 +2,11 @@
echo "NTP Statistics"
if [ -n "$(which ntpq)" ]; then
- echo "$(ntpq -p)"
-else
- echo "ntpq not installed"
+ echo "$(ntpq -p 2>&1)"
fi
echo
-if [ -n "$(which ntpstat)" ]; then
- echo "$(ntpstat)"
-else
- echo "ntpstat not installed"
+if [ -n "$(which chronyc)" ]; then
+ echo "$(ch... | bash |
d_bash_10142 | ---
+++
@@ -8,6 +8,14 @@
peek() {
eval "echo \$cell_$1"
+}
+
+lowercase() {
+ if test 65 -le "$1" -a "$1" -le 90; then # 'A' <= $1 <= 'Z'
+ echo `"$expr" "$1" + 32` # $1 + 'a' - 'A'
+ else
+ echo "$1"
+ fi
}
sp=0 | bash |
d_bash_10143 | ---
+++
@@ -15,7 +15,7 @@
case "$MODE" in
flake8)
pip install flake8
- flake8 --max-complexity 20 wsproto
+ flake8 --max-complexity 12 wsproto
;;
docs) | bash |
d_bash_10144 | ---
+++
@@ -8,16 +8,21 @@
esac
pidof()
-{ # return the PID of process $1
- declare proc="$1"
- command ps $flags_pid |
- egrep -io "\<[[:digit:]]+ .*\<$proc[^\\]*(\.exe)?$" |
- cut -d" " -f1
+{ # return the PID of process $1 or exit false
+ declare proc="$1" pid
+
+ pid=$(command ps $flags_p... | bash |
d_bash_10145 | ---
+++
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-find . -name \*.py -exec pep8 --ignore=E501 --exclude='*/procedural_city_generation/*,./env/*' {} +
+find . -name \*.py -exec pep8 --ignore=E501 --exclude='*/procedural_city_generation... | bash |
d_bash_10146 | ---
+++
@@ -8,8 +8,10 @@
if [ "$IS_COVERAGE_BUILD" == 1 ]; then
flags="-g -O0 --coverage"
cmake -DCMAKE_C_COMPILER=$COMPILER_CC -DCMAKE_CXX_COMPILER=$COMPILER_CXX -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="$flags" .
-else
+elif [ "$TRAVIS_OS_NAME" == "linux" ]; then
cmake -DCMAKE_C_COMPILER=$COMPILER_CC -D... | bash |
d_bash_10147 | ---
+++
@@ -9,3 +9,6 @@
# load them into elasticsearch
cd $HOME/oversight/current && ./tasks/inspectors.js > $HOME/oversight/shared/log/load-cron.log 2>&1
+
+# update the sitemap files
+cd $HOME/oversight/current && rake sitemap:generate > $HOME/oversight/shared/log/sitemap-cron.log 2>&1 | bash |
d_bash_10148 | ---
+++
@@ -1,8 +1,8 @@
###############################################################################
# Install Linux Packages
###############################################################################
-sudo apt-get upgrade
-sudo apt-get install -qq libatlas-dev liblapack-dev gfortran
+sudo apt-get -y upgra... | bash |
d_bash_10149 | ---
+++
@@ -15,16 +15,35 @@
exit 1
}
-database="$1"
-[ -z "${database}" ] && die "Missing database! Usage: ./init-unifiedpush-db.sh database name"
-# Example parameter -Daerobase.config.dir=/tmp/db.properties
-RUNTIME_OPTS="$2"
-
#remote debug parameters
#export DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=d... | bash |
d_bash_10150 | ---
+++
@@ -16,6 +16,7 @@
alias wfon='rfkill unblock 0 && echo wifi turned on'
alias wfoff='rfkill block 0 && echo wifi turned off'
alias xc='xclip -selection clipboard'
+alias ns='npm start'
alias mongostart='mongod --dbpath ~/data/db'
alias twstart='teamviewer --daemon start $$ teamviewer' | bash |
d_bash_10151 | ---
+++
@@ -1,3 +1,9 @@
+export INCLUDE_PATH="${PREFIX}/include"
+export LIBRARY_PATH="${PREFIX}/lib"
+export LD_LIBRARY_PATH="${PREFIX}/lib"
+export LDFLAGS="-L${PREFIX}/lib"
+export CPPFLAGS="-I${PREFIX}/include"
+
cd $SRC_DIR/kmer
make install prefix=$PREFIX
cd $SRC_DIR/src | bash |
d_bash_10152 | ---
+++
@@ -2,7 +2,7 @@
case $stage in
pre )
- pm2 stop greenbot
+ forever stop node_modules/greenbot/bin/greenbot.js
;;
deploy )
git pull
@@ -10,6 +10,6 @@
npm install
;;
post )
- pm2 start node_modules/greenbot/bin/greenbot.js --node-args "modacity.cson"
+ forever start n... | bash |
d_bash_10153 | ---
+++
@@ -16,7 +16,8 @@
DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )"
# Copy into tmpdir
-cp -R $DIR/website/ $DEPLOY/
+shopt -s dotglob
+cp -r $DIR/website/* $DEPLOY/
# Change into that directory
pushd $DEPLOY &>/dev/null
@@ -25,6 +26,7 @@
touch .gitignore
echo ".sass-cache" >> .gitignore
echo "bu... | bash |
d_bash_10154 | ---
+++
@@ -11,7 +11,10 @@
echo ${BP_PACKAGED_PATH}
fi
-pushd pack
+PACK_PATH="$(realpath "$(find pack -name "*.tar.gz")")"
+mkdir -p pack_source
+tar xvf $PACK_PATH -C pack_source
+pushd pack_source
echo "Building pack..."
go build -o ../buildpack/.bin/pack ./cmd/pack/main.go
popd | bash |
d_bash_10155 | ---
+++
@@ -2,3 +2,9 @@
# for vi mode.
bindkey '\e[3~' delete-char
bindkey '^R' history-incremental-search-backward
+
+# Use `v` to launch editor.
+# http://stackoverflow.com/questions/890620/unable-to-have-bash-like-c-x-e-in-zsh
+autoload -U edit-command-line
+zle -N edit-command-line
+bindkey -M vicmd v edit-com... | bash |
d_bash_10156 | ---
+++
@@ -8,7 +8,7 @@
DOM0_MAXMEM=`/usr/sbin/xl info | grep total_memory | awk '{ print $3 }'`
xenstore-write /local/domain/0/memory/static-max $[ $DOM0_MAXMEM * 1024 ]
-xl sched-credit -d 0 -w 512
+xl sched-credit -d 0 -w 2000
cp /var/lib/qubes/qubes.xml /var/lib/qubes/backup/qubes-$(date +%F-%T).xml
/usr/... | bash |
d_bash_10157 | ---
+++
@@ -9,7 +9,7 @@
sudo apt-get -y install ant ant-optional git libev-dev libyaml-dev lsof python-dev python-setuptools python-pip rsync screen wamerican
# install some python modules that we need
sudo pip install blist cql decorator futures nose-test-select pycassa
-sudo pip install --pre cassandra-driver
+s... | bash |
d_bash_10158 | ---
+++
@@ -1,4 +1,4 @@
#!/bin/bash
# Deploy data directory to device using adb.
-~/Android/Sdk/platform-tools/adb push data /sdcard/Android/data/com.android.flickercladding/data/
+~/Android/Sdk/platform-tools/adb push data /sdcard/Android/data/com.android.flickercladding/ | bash |
d_bash_10159 | ---
+++
@@ -15,4 +15,8 @@
else
mkdir -p ~/.ssh
openssl aes-256-cbc -K "${encrypted_766accd2732a_key}" -iv "${encrypted_766accd2732a_iv}" -in "${SCRIPT_DIR}/id_rsa_gitlab-test.enc" -out ~/.ssh/id_rsa -d
+ cat >> ~/.ssh/config <<EOF
+Host gitlab.com
+ StrictHostKeyChecking no
+EOF
fi | bash |
d_bash_10160 | ---
+++
@@ -15,6 +15,6 @@
SOURCE="${BASH_SOURCE[0]}"
DIR="$(dirname $SOURCE)"
-go run -ldflags="-X main.VersionString=${version}" $DIR/template.go
+go run -ldflags="-X main.VersionString=${version}" "$DIR"/template.go
| bash |
d_bash_10161 | ---
+++
@@ -1,5 +1,7 @@
#!/bin/bash
# See https://help.github.com/articles/generating-ssh-keys/ to enable SSH to GitHub, needed for sript
+date
+cd /var/www/Swind
python /var/www/Swind/py/getSMHI.py
git add ./data
git commit -q -m 'Latest day' | bash |
d_bash_10162 | ---
+++
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
# TODO better way of finding gunicorn binary
-sudo ./venv/bin/gunicorn -w 3 web_ui:app -b 0.0.0.0:80
+sudo ./venv/bin/gunicorn -w 3 web_ui:app -b 0.0.0.0:80 --access-logfile - | bash |
d_bash_10163 | ---
+++
@@ -3,5 +3,8 @@
## update and install some things we should probably have
apt-get update
apt-get install -y \
+ curl \
git \
+ jq \
+ sudo \
zsh | bash |
d_bash_10164 | ---
+++
@@ -33,5 +33,6 @@
# build the boards
do_build TEENSY40 TEENSY40 hex
do_build TEENSY41 TEENSY41 hex
+do_build MIMXRT1010_EVK MIMXRT1010_EVK bin
do_build MIMXRT1020_EVK MIMXRT1020_EVK bin
do_build MIMXRT1050_EVK MIMXRT1050_EVK bin | bash |
d_bash_10165 | ---
+++
@@ -10,8 +10,8 @@
# Install Docker
wget -qO- https://get.docker.com/ | sh
-# Add vagrant user to docker group
-usermod -aG docker vagrant
-
-# Verify Docker works properly
-docker run hello-world
+# Add vagrant user to docker
+# https://docs.oracle.com/cd/E52668_01/E54669/html/section_rdz_hmw_2q.html
+g... | bash |
d_bash_10166 | ---
+++
@@ -10,7 +10,7 @@
./scripts/_network.sh
# Move the rest of our scripts somewhere local
-mkdir ~/tmp && cp scripts/ ~/tmp/scripts
+mkdir -p ~/tmp/scripts && cp scripts/* ~/tmp/scripts
echo "Locale and network settings updated!"
echo "The system will now reboot. Once it does, continue installation by ru... | bash |
d_bash_10167 | ---
+++
@@ -15,7 +15,8 @@
ln -s file ~
done
-echo 'source ~/dotfiles/.bashrc' >>~/.bash_profile
+# Append a call to existing ~/.bashrc to run the dotfiles' .bashrc
+echo "source ${DOT_DIR}/.bashrc" >> ~/.bashrc
# Install stuff
| bash |
d_bash_10168 | ---
+++
@@ -1,16 +1,16 @@
#!/usr/bin/env bash
-NODEJS_VERSION=$(grep '^ENV NODEJS_VERSION' Dockerfile | cut -d '=' -f 2 | sed 's/^v//')
-ALPINE_VERSION=$(grep '^FROM alpine' Dockerfile | cut -d ':' -f 2 )
+NODEJS_VERSION=$(grep '^ENV NODEJS_VERSION' Dockerfile | cut -d '=' -f 2)
+ALPINE_VERSION=$(grep '^FROM al... | bash |
d_bash_10169 | ---
+++
@@ -1,11 +1,4 @@
#!/bin/sh
-
-# Get the Source Code
-cd ..
-hg clone http://hg.python.org/cpython
-
-# Build Python
-cd cpython
-./configure
-make -j8
-sudo make install
+sudo add-apt-repository ppa:fkrull/deadsnakes
+sudo apt-get update
+sudo apt-get install python3.4 | bash |
d_bash_10170 | ---
+++
@@ -12,7 +12,8 @@
DIFF_SO_FANCY_INSTALLED=true
fi
-if [ -d "/usr/local/Cellar/git/"*"/share/git-core/contrib/diff-highlight/diff-highlight" ]; then
+compgen -G "/usr/local/Cellar/git/*/share/git-core/contrib/diff-highlight/diff-highlight" > /dev/null
+if [ $? -ne 0 ]; then
DIFF_HIGHLIGHT_INSTALLE... | bash |
d_bash_10171 | ---
+++
@@ -1,4 +1,8 @@
#!/bin/bash
+
+echo connect FC:58:FA:91:9F:BA | bluetoothctl
+
+sleep 1
BLUEZNUM=`pactl list short cards | grep bluez_card | cut -f1 `
BLUEZCARD=`pactl list short sinks | grep bluez_sink | cut -f2 `
@@ -10,3 +14,5 @@
pactl set-card-profile $BLUEZNUM a2dp_sink
pactl set-default-sink $BL... | bash |
d_bash_10172 | ---
+++
@@ -12,5 +12,5 @@
# Push
git checkout master
git add subscription/easylist-thailand.txt
-git commit -m ":bento: Auto-generate subscription from Travis CI (Build $TRAVIS_BUILD_ID)" -m "Travis CI log: $TRAVIS_BUILD_WEB_URL"
+git commit -m ":bento: [skip ci] Auto-generate subscription from Travis CI (Build $T... | bash |
d_bash_10173 | ---
+++
@@ -11,7 +11,7 @@
whitely echo ...ok
TESTS="${@:-$(find "$DIR" -name '*_test.sh')}"
-RUNNER_ARGS=""
+RUNNER_ARGS=${RUNNER_ARGS:-""}
# If running on circle, use the scheduler to work out what tests to run
if [ -n "$CIRCLECI" -a -z "$NO_SCHEDULER" ]; then | bash |
d_bash_10174 | ---
+++
@@ -6,7 +6,7 @@
echo "http://alpine.gliderlabs.com/alpine/edge/testing" >> /etc/apk/repositories
# These packages make it into the final image.
-apk -U add runit python py-setuptools libffi ip6tables ipset iputils iproute2
+apk -U add runit python py-setuptools libffi ip6tables ipset iputils iproute2 yajl... | bash |
d_bash_10175 | ---
+++
@@ -24,3 +24,4 @@
chruby $(cat ~/.ruby-version)
gem install bundler
+gem install rails | bash |
d_bash_10176 | ---
+++
@@ -1,11 +1,6 @@
#!/bin/bash
-export INCLUDE_PATH="${PREFIX}/include"
-export LIBRARY_PATH="${PREFIX}/lib"
-export LD_LIBRARY_PATH="${PREFIX}/lib"
-
-export LDFLAGS="-L${PREFIX}/lib"
-export CPPFLAGS="-I${PREFIX}/include"
+export LDFLAGS="-L${PREFIX}/lib -Wl,-rpath ${PREFIX}/lib"
# R refuses to build pa... | bash |
d_bash_10177 | ---
+++
@@ -14,8 +14,13 @@
rm -r target/*/{debug,release}/{build,deps,examples,libsysroot*,native} 2>/dev/null || true
rm -r sysroot/ 2>/dev/null || true
+# Use rustc with cg_clif as hotpluggable backend instead of the custom cg_clif driver so that
+# build scripts are still compiled using cg_llvm.
+export RUSTC=... | bash |
d_bash_10178 | ---
+++
@@ -3,7 +3,7 @@
# --------------------------------------------------------------------------
# Global Ark extensions directory.
-export ARK_EXT=~/dev/src/ark-plugins
+# export ARK_EXT=~/dev/src/ark-plugins
# Global Ark themes directory.
export ARK_THEMES=~/dev/src/ark-themes | bash |
d_bash_10179 | ---
+++
@@ -12,7 +12,7 @@
$binSED -i -e 's/[ \t]*=[ \t]*/=/g' $tmpFile;
# transform section labels into function declaration
- $binSED -i -e 's/\[\([A-Za-z0-9]*\)\]/config.section.\1() \{/g' $tmpFile;
+ $binSED -i -e 's/\[\([A-Za-z0-9_]*\)\]/config.section.\1() \{/g' $tmpFile;
$binSED -i -e 's/config\.section... | bash |
d_bash_10180 | ---
+++
@@ -21,3 +21,12 @@
container-running() {
[ "$(docker inspect --format={{.State.Status}} "$1")" = running ]
}
+
+file() {
+ local file=$1
+
+ # `file` will be passed file contents via STDIN
+ while read data; do
+ echo "$data" >> "$file"
+ done
+} | bash |
d_bash_10181 | ---
+++
@@ -10,6 +10,11 @@
# from the Cloud Formation Template and through this script
#
# It takes approx. 5 min to have the instance fully setup
+
+
+echo "Match address 10.1.1.0/24" >> /etc/ssh/sshd_config
+echo " PasswordAuthentication yes" >> /etc/ssh/sshd_config
+service ssh restart
# Install docker
c... | bash |
d_bash_10182 | ---
+++
@@ -3,14 +3,10 @@
# Fail on any error.
set -e
-# Display commands being run.
-# WARNING: please only enable 'set -x' if necessary for debugging, and be very
-# careful if you handle credentials (e.g. from Keystore) with 'set -x':
-# statements like "export VAR=$(cat /tmp/keystore/credentials)" will resu... | bash |
d_bash_10183 | ---
+++
@@ -4,11 +4,11 @@
SYSTEMDFOLDER=/etc/systemd/system/
if [ ! -d "$DATAFOLDER" ]; then
- mkdir $DATAFOLDER
+ mkdir -p $DATAFOLDER
fi
if [ ! -d "$APPFOLDER" ]; then
- mkdir $APPFOLDER
+ mkdir -p $APPFOLDER
fi
systemctl --now disable torigemubot.service | bash |
d_bash_10184 | ---
+++
@@ -6,7 +6,7 @@
if [ ! -d "$HOME/protobuf/lib" ]; then
wget https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
tar -xzvf protobuf-2.6.1.tar.gz
- cd protobuf-2.4.1 && ./configure --prefix=$HOME/protobuf && make && make install
+ cd protobuf-2.6.1 && ./configure --prefix=... | bash |
d_bash_10185 | ---
+++
@@ -4,8 +4,6 @@
# other scripts that wish to make use of the variables set here.
export CHPL_COMM=none
-export CHPL_NIGHTLY_LOGDIR=$logdir_prefix/NightlyMemLeaks
-export CHPL_NIGHTLY_CRON_LOGDIR=$CHPL_NIGHTLY_LOGDIR
function memleaks_log()
{ | bash |
d_bash_10186 | ---
+++
@@ -11,10 +11,10 @@
CLOUDFRONT_ID=$CLOUDFRONT_ID_PROD
fi
-aws s3 cp dist/ s3://$TOOL_BUCKET/tool --acl=public-read --recursive
-aws s3 cp dist/index.html s3://$MAP_BUCKET/map/index.html --acl=public-read
+aws s3 cp dist/ s3://$TOOL_BUCKET/tool --acl=public-read --recursive --cache-control max-age=6048... | bash |
d_bash_10187 | ---
+++
@@ -14,17 +14,3 @@
function findex() { find . -type f -name \*.$1; }
#find file by name recursively in current directory
alias findf="find . -name"
-
-#combine the contents of all files in directory matching extension into one merged file
-#$1 is input directory; $2 is full path of output file; $3 is file ... | bash |
d_bash_10188 | ---
+++
@@ -16,4 +16,12 @@
# Ignore "start failed: message.
apt-get -y install hadoop-0.20-mapreduce-jobtracker hadoop-hdfs-namenode hadoop-client
+# Upload and run on ALL VM's.
+# This is mainly for the master.
+# Maybe not necessary to apply the entire script to the slaves as some of the
+# directories will b... | bash |
d_bash_10189 | ---
+++
@@ -4,4 +4,6 @@
if [ ${TRAVIS_NODE_VERSION} = '5.9' ]; then
npm install -g phantomjs@2.1.3
+else
+ npm install -g phantomjs@1.9.18
fi | bash |
d_bash_10190 | ---
+++
@@ -6,6 +6,7 @@
PATH="$PATH:$OLDPATH"
export PS1="\n@name@:[\u@\h:\w]\$ "
+export NIX_MYENV_NAME="@name@"
export buildInputs
export NIX_STRIP_DEBUG=0
export TZ="$OLDTZ" | bash |
d_bash_10191 | ---
+++
@@ -12,11 +12,11 @@
alias l='ls --color=tty'
alias ls='ls --color=tty'
-alias ll='ls -l --color=tty'
-alias la='ls -l --almost-all --color=tty'
-alias lh='ls -l --human-readable --color=tty'
-alias lt='ls -lt --color=tty'
-alias lrt='ls -lrt --color=tty'
+alias ll='ls -l --color=tty --time-style=long-iso'... | bash |
d_bash_10192 | ---
+++
@@ -1,4 +1,5 @@
-#!/bin/sh
+#!/bin/bash
+set -eu
if (( ${#} != 1 ))
then
@@ -9,21 +10,28 @@
SITE=$1
# Self-configure
-export EMEWS_PROJECT_ROOT=$( cd $( dirname $0 )/.. ; /bin/pwd )
-echo $EMEWS_PROJECT_ROOT
-WORKFLOWS_ROOT=$( cd $EMEWS_PROJECT_ROOT/.. ; /bin/pwd )
+THIS=$( cd $( dirname $0 ) && /bin/... | bash |
d_bash_10193 | ---
+++
@@ -1,12 +1,12 @@
-#!/bin/sh
+#!/bin/bash
set -eu
-if [ "$(cat /etc/hostname)" == "Titus" ]; then
+if [[ "$(cat /etc/hostname)" == "Titus" ]]; then
printf >&2 'Refusing to sync to self.\n'
exit 1
fi
-if [ "$#" -eq 0 ]; then
+if [[ "$#" -eq 0 ]]; then
printf >&2 'Usage: %s path-to-sync\n' "$0"
ex... | bash |
d_bash_10194 | ---
+++
@@ -13,7 +13,7 @@
docker run --rm hello-world
echo
echo '$ docker images hello-world'
- docker images hello-world | awk -F' +' '$2 == "TAG" || $2 == "latest" { print $1"\t"$2"\t"$3"\t"$5 }' | column -t -s$'\t'
+ docker images hello-world | awk -F' +' 'NR == 1 || $2 == "latest" { print $1"\t"$2"\t"$3"\... | bash |
d_bash_10195 | ---
+++
@@ -13,15 +13,15 @@
function vundle () {
vundle-init
- vim -c "execute \"PluginInstall\" | q | q"
+ vim -c "execute \"PluginInstall\" | qa"
}
function vundle-update () {
vundle-init
- vim -c "execute \"PluginInstall!\" | q | q"
+ vim -c "execute \"PluginInstall!\" | qa"
}
function vundle-... | bash |
d_bash_10196 | ---
+++
@@ -27,6 +27,8 @@
while read OLDREV NEWREV REF
do
for script in $HOOK_DIR/{{ item }}.d/*{sh,py} ; do
- echo $OLDREV $NEWREV $REF | $script
+ if [ -f $script -a -x $script ]; then
+ echo $OLDREV $NEWREV $REF | $script
+ fi
done
done | bash |
d_bash_10197 | ---
+++
@@ -21,5 +21,5 @@
if (pidof monit >/dev/null); then
kill -s SIGHUP $(pidof monit)
- waitForMonitReload 10
+ waitForMonitReload 30
fi | bash |
d_bash_10198 | ---
+++
@@ -16,7 +16,7 @@
curl --location --silent --show-error --output ./tmp/jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64
chmod +x ./tmp/jq
-for tag in $(curl -sS https://registry.hub.docker.com/v2/repositories/library/ubuntu/tags/ | ./tmp/jq --raw-output '."results"[]["name"]'); do
+fo... | bash |
d_bash_10199 | ---
+++
@@ -1,6 +1,8 @@
#!/bin/sh
sudo mkdir /ioc /blacklist /whitelist /reverse /artifacts
-sudo cat >>/etc/samba/smb.conf <<EOF
+sudo mv /etc/samba/smb.conf /etc/samba/smb.conf-default
+sudo cat >/etc/samba/smb.conf-fate <<EOF
+
[ioc]
path = /ioc
writeable = yes
@@ -31,4 +33,5 @@
browseable = yes
guest o... | bash |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.