document_id stringlengths 8 12 | document stringlengths 50 3.21k | split stringclasses 1
value |
|---|---|---|
d_bash_14500 | ---
+++
@@ -2,7 +2,7 @@
lcov -b src/libhttpserver --directory src/libhttpserver/build/Debug/GNU-Linux-x86/ --capture --output-file coverage.info
lcov --remove coverage.info 'tests/*' '/usr/*' '*/externals/*' --output-file coverage.info
lcov --list coverage.info
-if [ "$CI" == "true" && "$TRAVIS" == "true" ]; then
... | bash |
d_bash_14501 | ---
+++
@@ -1,4 +1,19 @@
-export JAVA_HOME=$(/usr/libexec/java_home)
+export M2_HOME=/usr/local/Cellar/maven/3.3.1/libexec
-export M2_HOME=/usr/local/Cellar/maven/3.3.1/libexec
-export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128M"
+# Script found here: http://www.jayway.com/2014/01/15/how-to-switch-jdk-version-on-mac-... | bash |
d_bash_14502 | ---
+++
@@ -4,7 +4,7 @@
make std-check
make sse2-check
-gcc -O3 -finline-functions -fomit-frame-pointer -DNDEBUG -DDSFMT_MEXP=19937 \
+${CC} -O3 -finline-functions -fomit-frame-pointer -DNDEBUG -DDSFMT_MEXP=19937 \
-fPIC -fno-strict-aliasing --param max-inline-insns-single=1800 -Wmissing-prototypes \
-Wall ... | bash |
d_bash_14503 | ---
+++
@@ -6,6 +6,7 @@
echo "Setting up git configuration..."
git config --global user.email "$GITHUB_EMAIL"
git config --global user.name "$GITHUB_NAME"
+git config --global push.default matching
echo "Removing contents..."
rm -r caramelomartins.github.io/*
@@ -25,4 +26,4 @@
rm -rf caramelomartins.github.io... | bash |
d_bash_14504 | ---
+++
@@ -1,11 +1,11 @@
#!/bin/sh
echo "Deploying web site"
-cd target
+cd target || exit -1
rm -Rf scmpublish-checkout
git clone --depth=1 --branch master git@github.com:vert-x3/vert-x3.github.io.git scmpublish-checkout
echo "Updating checkout directory with actual content in target/site"
cp -R site/* scmpu... | bash |
d_bash_14505 | ---
+++
@@ -1,3 +1,5 @@
+add_to_path ~/usr/iojs/bin
+
node_global=$HOME/node/global
add_to_path $node_global/bin
#add_to_path ./node_modules/.bin | bash |
d_bash_14506 | ---
+++
@@ -7,6 +7,9 @@
sudo /usr/bin/logger -t autobootstrap "installed puppet"
echo "* installing gems"
sudo gem install hiera-eyaml
+# aws-codedeploy-agent 1.0-1.1067 depends on aws-sdk-core ~2.6.11 and will ERROR on newer versions (~2.7).
+# We'll probably have to update again once they release the newest vers... | bash |
d_bash_14507 | ---
+++
@@ -2,4 +2,6 @@
CURRENT_PATH=$(dirname $(readlink -e $0))
-ln -s ${CURRENT_PATH}/screenrc ~/.screenrc
+source ${CURRENT_PATH}/../function.sh
+
+create_or_replace_symlink ${CURRENT_PATH}/screenrc ~/.screenrc | bash |
d_bash_14508 | ---
+++
@@ -1,8 +1,18 @@
#!/usr/bin/env bash
+
+command_exists() {
+ local command="$1"
+ type "$command" >/dev/null 2>&1
+}
print_battery_percentage() {
# percentage displayed in the 2nd field of the 2nd row
- pmset -g batt | awk 'NR==2 { gsub(/;/,""); print $2 }'
+ if command_exists "pmset"; then
+ pmset -g ... | bash |
d_bash_14509 | ---
+++
@@ -6,7 +6,7 @@
set -o nounset
set -o errexit
-DOTFILES=( gemrc gitconfig gvimrc inputrc irbrc pryrc screenrc tmux.conf vimrc zshrc )
+DOTFILES=( gemrc gitconfig gvimrc inputrc irbrc pryrc tmux.conf vimrc zshrc )
SSH_CONFIG=ssh_config
abort() { | bash |
d_bash_14510 | ---
+++
@@ -13,7 +13,7 @@
rm -rf build
./pythenv.sh "$PYTHON" setup.py build
if [ $# -eq 0 ]; then
- ./pythenv.sh "$PYTHON" "$PY_TEST" tests shell/tests
+ ./pythenv.sh "$PYTHON" "$PY_TEST" tests
else
./pythenv.sh "$PYTHON" "$PY_TEST" "$@"
fi | bash |
d_bash_14511 | ---
+++
@@ -31,10 +31,11 @@
/usr/bin/psql -h ${DBHOST} ${DB} << EOF
BEGIN;
-update member m
- join member_email me on m.ident = me.member
- set m.no_email = true
- where me.email = '$1'
+UPDATE member m
+ SET no_email = true
+ FROM member_email me
+ WHERE m.ident = me.member
+ AND me.email = '$1';
COMM... | bash |
d_bash_14512 | ---
+++
@@ -18,7 +18,7 @@
set -o pipefail
failed="false"
-for file in $( find . \( -not -path '*vendor*' -and -not -path '*.git*' -and -not -path '*hack/verify-github-spelling.sh*' \) -type f )
+for file in $( find . \( -not -path '*vendor*' -and -not -path '*gubernator/*' -and -not -path '*.git*' -and -not -pa... | bash |
d_bash_14513 | ---
+++
@@ -6,8 +6,10 @@
if [ ! -d images ] ; then
ln -s $images images
fi
-max=2048
-convopts="-despeckle -threshold 80% -depth 1 -negate -define png:compression-level=9"
+# Absolute max is 2048, bigger images choke the loader.
+# Set max so the app size fits under 100 MB (Play Store limit).
+max=1800
+convopts... | bash |
d_bash_14514 | ---
+++
@@ -4,28 +4,24 @@
#
# TODO: to be rewritten in Ruby
#
-# $Id: gmail-backup.sh,v dbdfe7377aac 2012/12/03 13:48:59 roberto $
+# $Id: gmail-backup.sh,v c132a5c252dc 2012/12/03 14:39:07 roberto $
OPTS="-o --no-compression -t quick"
BASE="$HOME/Downloads/gmvault-v1.7-beta/bin/"
GMVAULT="$HOME/Mail/gmvault-... | bash |
d_bash_14515 | ---
+++
@@ -1,8 +1,7 @@
#!/bin/bash
set -eo pipefail
-h="$(hostname -i || echo '127.0.0.1')"
-host="${h%%[[:space:]]*}" #remove the trailing space
+host="localhost"
user="${POSTGRES_USER:-postgres}"
db="${POSTGRES_DB:-$POSTGRES_USER}"
export PGPASSWORD="${POSTGRES_PASSWORD:-}" | bash |
d_bash_14516 | ---
+++
@@ -7,7 +7,22 @@
case "\$1" in
configure)
- adduser --system --quiet --group disco --disabled-password --shell /bin/bash --home ${RELSRV} --no-create-home
+ if ! getent group | grep -q "^disco:" ; then
+ addgroup --system \
+ --quiet \
+ ... | bash |
d_bash_14517 | ---
+++
@@ -1,5 +1,5 @@
#!/bin/bash
-docker login -e noemail -u $QUAY_USERNAME -p $QUAY_PASSWORD quay.io
+docker login -u $QUAY_USERNAME -p $QUAY_PASSWORD quay.io
tag="quay.io/pypa/manylinux1_$PLATFORM"
docker tag ${tag}:${TRAVIS_COMMIT} ${tag}:latest
docker push ${tag}:latest | bash |
d_bash_14518 | ---
+++
@@ -26,6 +26,10 @@
mkdir /services
+echo "* soft nofile 524288" >> /etc/security/limits.conf
+echo "* hard nofile 1048576" >> /etc/security/limits.conf
+
+
rm -rf /var/cache/pacman/pkg/*
rm -rf /build
| bash |
d_bash_14519 | ---
+++
@@ -1,7 +1,7 @@
#!/bin/sh
sudo apt-get -y update
-sudo apt-get -y install socat curl python-software-properties
+sudo apt-get -y install socat curl python3-software-properties
# Install Snyk
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - | bash |
d_bash_14520 | ---
+++
@@ -1,4 +1,4 @@
function http_serve() {
ifconfig | grep "inet " | grep -v 127.0.0.1
- python -m SimpleHTTPServer || return $?
+ ruby -run -ehttpd . -p8000 || return $?
} | bash |
d_bash_14521 | ---
+++
@@ -7,7 +7,8 @@
set -e
# Needed software
-sudo pacman -S firefox firefox-i18n-de \
+sudo pacman -S openssh\
+firefox firefox-i18n-de \
thunderbird thunderbird-i18n-de \
libreoffice-still libreoffice-still-de \
gimp \ | bash |
d_bash_14522 | ---
+++
@@ -9,19 +9,19 @@
source $base_dir/lib/prelude_bosh.bash
# Set up users/groups
+vcap_user_groups='admin,adm,audio,cdrom,dialout,floppy,video,plugdev,dip'
+
run_in_chroot $chroot "
-addgroup --system admin
-adduser --disabled-password --gecos Ubuntu vcap
+groupadd --system admin
+useradd -m --comment 'BOS... | bash |
d_bash_14523 | ---
+++
@@ -27,7 +27,7 @@
"$REST_SH" $server
function cleanup {
- rm __feed_tmp >/dev/null 2>&1
+ rm __feed_tmp[12] >/dev/null 2>&1
}
trap cleanup EXIT | bash |
d_bash_14524 | ---
+++
@@ -2,9 +2,6 @@
# usage : adb_run_wrapper [test dir - where test executables exist] [test executable]
#
-# Sometimes android shell produce exitcode "1 : Text File Busy"
-# Retry after $WAIT seconds, expecting resource cleaned-up
-WAIT=10
TEST_PATH=$1
BIN_PATH=/system/bin
if [ -d "$TEST_PATH" ]
@@ -16,2... | bash |
d_bash_14525 | ---
+++
@@ -11,7 +11,15 @@
cd $LSTORE_SCRIPT_BASE/docker/base
STATUS=""
-for DISTRO in */; do
+
+# Parse comand line
+DISTROS=( "$@" )
+if [ ${#DISTROS[@]} -eq 0 ]; then
+ DISTROS=( */ )
+fi
+DISTROS=( "${DISTROS[@]%/}" )
+
+for DISTRO in "${DISTROS[@]}"; do
note "Processing $(basename $DISTRO)"
dock... | bash |
d_bash_14526 | ---
+++
@@ -15,9 +15,11 @@
fi
if [[ "$WATIR_WEBDRIVER_BROWSER" = "phantomjs" ]]; then
- curl -L -O "http://phantomjs.googlecode.com/files/phantomjs-1.8.1-linux-i686.tar.bz2"
- bzip2 -cd phantomjs-1.8.1-linux-i686.tar.bz2 | tar xvf -
- chmod +x phantomjs-1.8.1-linux-i686/bin/phantomjs
- sudo cp phantomjs-1.8.1... | bash |
d_bash_14527 | ---
+++
@@ -3,8 +3,13 @@
echo "mode: set" > acc.out
fail=0
+# Install the old cover tool if version is not 1.4 or higher.
+if [ -n "$TRAVIS_GO_VERSION" ] && [[ "$TRAVIS_GO_VERSION" < "go1.4" ]]; then
+ go get code.google.com/p/go.tools/cmd/cover
+fi
+
# Standard go tooling behavior is to ignore dirs with leadin... | bash |
d_bash_14528 | ---
+++
@@ -2,7 +2,14 @@
set -e
+if test "$1" = "-h" -o "$1" = "--help"; then
+ echo "Use: $0 [<language>]"
+ echo "Run without arguments to compile all translation files."
+ exit 0
+fi
+
cd "$(readlink -f "$(dirname "$0")/..")"
+
update_mo(){
echo $1
language="$(basename "$1")" | bash |
d_bash_14529 | ---
+++
@@ -22,7 +22,7 @@
alias rdr='rake db:rollback'
alias rroutes='rake routes'
alias mroutes='rroutes | mate'
-alias rmate='mate *.rb *.yml *.watchr Rakefile README Gemfile *.markdown *.md app bin config doc examples db lib public script integration spec test stories features'
+alias rmate='mate *.rb *.yml *.w... | bash |
d_bash_14530 | ---
+++
@@ -2,9 +2,14 @@
sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
-#disable iptables
-chkconfig iptables off
-service iptables stop
+#Stop and disable iptables
+systemctl stop iptables
+systemctl disable iptables
+
+#Stop and disable firewalld
+systemctl stop firewalld
+systemctl disable firew... | bash |
d_bash_14531 | ---
+++
@@ -2,22 +2,24 @@
cd ../../seednode/target
-logpath=/Users/mk/Documents/_intellij/bitsquare
+logpath=/Users/mk/Documents/_intellij/bitsquare/logs
-nohup java -jar SeedNode.jar hlitt7z4bec4kdh4.onion:8000 0 500 >/dev/null 2>$logpath/stresstest_seednode.log &
+mkdir $logpath
+
+nohup java -jar SeedNode.... | bash |
d_bash_14532 | ---
+++
@@ -3,5 +3,5 @@
site_name=`curl -X GET http://localhost:8085/configuration/site 2>/dev/null | python -mjson.tool | grep 'site_name' | cut -d: -f2 | tr -d '"' | tr -d ' '`
active_sub=`curl -X GET http://localhost:8085/subscriber/paid_subscription 2>/dev/null`
-echo -e "Subject:[`date +"%B %Y"`] $site_name ... | bash |
d_bash_14533 | ---
+++
@@ -9,3 +9,10 @@
zfs set mountpoint=/var/www ${DDS}/www
zfs set mountpoint=/var/mysql ${DDS}/mysql
fi
+
+# znapzend for backup
+znapzendzetup create --recursive --tsformat='%Y-%m-%d-%H%M%S' --donotask \
+ SRC '7day=>8hour,30day=>1day,1year=>1week,10year=>1month' ${DDS}/www
+znapzendzetup create --recursi... | bash |
d_bash_14534 | ---
+++
@@ -16,10 +16,10 @@
# Wipe out any previous artifacts so the archiving done per build
# does not pick up previous build artifacts
-if ! -d $PROJECT_WORKSPACE/RPMS ; then
+if [ -d $PROJECT_WORKSPACE/RPMS ] ; then
rm -fr $PROJECT_WORKSPACE/RPMS
fi
-if ! -d $PROJECT_WORKSPACE/SRPMS ; then
+if [ -d $PRO... | bash |
d_bash_14535 | ---
+++
@@ -5,6 +5,6 @@
docker exec img-updater apt-get update
docker exec img-updater apt-get upgrade -y
# Generate version tag for docker image: resin/rpi-raspbian:wheezy-YYYY-MM-DD
- # Default OS_NAME=resin/rpi-raspbian:wheezy
-VERSIONTAG="resin/rpi-raspbian:wheezy-$(date +'%F')"
+OS_NAME="resin/rpi-raspbian:w... | bash |
d_bash_14536 | ---
+++
@@ -17,6 +17,6 @@
else
if ! dpkg -l | grep libsdl2-dev > /dev/null ; then
echo "sudo password may be required to download and install the SDL2 library..."
- sudo apt-get install libsdl2-dev
+ sudo apt-get install libsdl2-dev libcurl4-openssl-dev
fi
fi | bash |
d_bash_14537 | ---
+++
@@ -17,10 +17,10 @@
exit 1
fi
-mkdir $OUTDIR
-unzip -d $OUTDIR $FILENAME
+mkdir "$OUTDIR"
+unzip -d "$OUTDIR" "$FILENAME"
-pushd $OUTDIR
+pushd "$OUTDIR"
find . -type f \( -iname "*.xml" -or -iname "*.rels" \) -exec python -c "import os, sys, xml.dom.minidom
with open('{}', 'r') as fp: | bash |
d_bash_14538 | ---
+++
@@ -29,4 +29,3 @@
cd cf-java-client
./mvnw -q -Dmaven.test.skip=true deploy
-cp target/build-info.json ../build-info/build-info.json | bash |
d_bash_14539 | ---
+++
@@ -9,6 +9,8 @@
backupdir=$HOME/.rmsafe
mkdir -p $backupdir
tmpname=$backupdir/$(date +%Y%m%d%H%M%S)-$(basename $target)
+# read-only files would `mv` for now but would cause trouble later when we `rm` for gc.
+chmod -R u+w $target
mv $target $tmpname
RMSAFE_LAST=$tmpname
echo "Backup is kept at "$tmpna... | bash |
d_bash_14540 | ---
+++
@@ -2,4 +2,4 @@
# as seen in http://www.porcheron.info/command-not-found-for-zsh/
# this is installed in Ubuntu
-source /etc/zsh_command_not_found
+[[ -e /etc/zsh_command_not_found ]] && source /etc/zsh_command_not_found | bash |
d_bash_14541 | ---
+++
@@ -15,7 +15,7 @@
_gpg_agent_env="${TMPDIR:-/tmp}/gpg-agent.env"
# Start gpg-agent if not started.
-if ! ps -U "$USER" -o ucomm | grep -q gpg-agent; then
+if ! ps -U "$USER" -o pid,ucomm | grep -q -- "${GPG_AGENT_PID:--1} gpg-agent"; then
eval "$(gpg-agent --daemon | tee "$_gpg_agent_env")"
else
# ... | bash |
d_bash_14542 | ---
+++
@@ -13,9 +13,9 @@
exit 0
fi
-if [[ ! "$RUSTC_VERSION" =~ "1.8.0" ]]
+if [[ ! "$RUSTC_VERSION" =~ "1.9.0" ]]
then
- echo "Wrong version of rustc: expected 1.8.0, got $RUSTC_VERSION"
+ echo "Wrong version of rustc: expected 1.9.0, got $RUSTC_VERSION"
exit 0
fi
| bash |
d_bash_14543 | ---
+++
@@ -20,7 +20,11 @@
log_file=`find . -iname '*.log' -print -quit`
fi
-conn_ip=$(echo $SSH_CLIENT | awk '{ print $1 }')
+if [[ $@ != *"-A"* ]]; then
+ conn_ip=$(echo $SSH_CLIENT | awk '{ print $1 }')
+else
+ conn_ip='//'
+fi
printf "Following log file %s, ignoring %s\n" $log_file $conn_ip
| bash |
d_bash_14544 | ---
+++
@@ -21,3 +21,9 @@
# brew install kubernetes-cli
# brew install kubernetes-helm
+
+# Good places to learn
+# https://medium.com/coinmonks/an-analysis-of-a-couple-ethereum-honeypot-contracts-5c07c95b0a8d
+# https://chainshot.com
+# https://cryptozombies.io
+# https://capturetheether.com/ | bash |
d_bash_14545 | ---
+++
@@ -9,9 +9,9 @@
rm -rf $outdir
./compile_and_deploy $outdir $tmc_path 1000 "'EUR'" 0 "'EUR'"
-./compile_and_deploy $outdir $DF_path0 "ZERO"
-./compile_and_deploy $outdir $DF_path1 "ONE"
-./compile_and_deploy $outdir $DF_path2 "TWO"
+./compile_and_deploy $outdir $DF_path0 "'ZERO'"
+./compile_and_deploy $ou... | bash |
d_bash_14546 | ---
+++
@@ -2,7 +2,9 @@
if [ "$(uname)" == "Darwin" ]; then
# Building Feather requires a C++11 compiler, which requires OS X 10.9+
- export MACOSX_DEPLOYMENT_TARGET=10.8
+ export MACOSX_DEPLOYMENT_TARGET=10.7
+ export CFLAGS="${CXXFLAGS} -stdlib=libc++ -std=c++11"
+ export CXXFLAGS="${CXXFLAGS} -... | bash |
d_bash_14547 | ---
+++
@@ -1,6 +1,8 @@
#!/bin/bash
add-apt-repository ppa:ubuntu-lxc/lxd-stable -y
apt-get update
+apt-get -y install linux-image-extra-$(uname -r)
+apt-get -y install linux-image-extra-virtual
apt-get -y install golang
apt-get -y install docker.io
apt-get -y install docker-engine | bash |
d_bash_14548 | ---
+++
@@ -1,7 +1,3 @@
#!/bin/sh
-set -evx
-
-. ci/bundle_install.sh
-
-bundle exec rake version:show
+ruby -Ilib -e "require \"chef-dk/version\"; puts ChefDK::VERSION" | bash |
d_bash_14549 | ---
+++
@@ -4,4 +4,7 @@
SOURCE=$( greadlink -f "$(dirname "$0")/.." )
TARGET="root@wro.tuxlan.es:/mnt/sda1/auth.wro.tuxlan.es"
-rsync -rlpt --progress --exclude='.git*' --filter="dir-merge,- .gitignore" "$SOURCE/" "$TARGET/"
+rsync -rlpt --progress --exclude='.git*' --filter="dir-merge,- .gitignore" "${SOURCE}/ba... | bash |
d_bash_14550 | ---
+++
@@ -1,7 +1,6 @@
#!/bin/sh
-[ -z "${VERSION}" ] && VERSION=`git describe --tags --always 2>/dev/null | \
- fgrep .` \
+[ -z "${VERSION}" ] && VERSION=`git describe --tags --match='v[0-9].*' 2>/dev/null` \
&& VERSION=${VERSION#v}
[ -z "${VERSION}" ] && V... | bash |
d_bash_14551 | ---
+++
@@ -1,8 +1,6 @@
#!/usr/bin/env bash
. $TRAVIS_BUILD_DIR/bin/setup.sh
-
-checkPublishable "ghPages"
# Install hugo static site generator from GitHub releases page.
curl -s -L "https://github.com/spf13/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz" | tar xzf -
@@ -22,4 ... | bash |
d_bash_14552 | ---
+++
@@ -14,7 +14,7 @@
trap "cd \"$dir\"; rm -rf \"$tmp\"" EXIT
msg "Cloning into a temporary directory..."
-git clone -qb gh-pages $dir $tmp
+git clone -qb gh-pages $dir $tmp --recursive
cd "$tmp"
git checkout -q master
ln -s $dir/target $tmp/target | bash |
d_bash_14553 | ---
+++
@@ -21,6 +21,3 @@
# Disable Bash Sessions feature in OS X El Capitan
touch ~/.bash_sessions_disable
-
-# Reload shell to put changes into effect
-exec $SHELL -l | bash |
d_bash_14554 | ---
+++
@@ -15,6 +15,7 @@
htop-osx
imagemagick
iperf
+ iperf3
jq
mtr
ncdu | bash |
d_bash_14555 | ---
+++
@@ -10,12 +10,12 @@
set -o notify # Notify about terminating backround jobs
shopt -s cdspell # Correct typos in directory names when using cd
-shopt -s cdable_vars # Change to a directory saved in a variable
+shopt -s cdable_vars # Change to a directory saved in a variable
sh... | bash |
d_bash_14556 | ---
+++
@@ -8,9 +8,16 @@
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
# macOS
+ # 1. Test using Swift Package Manager
swift build --clean
swift build
swift test
+
+ # 2. Test using xcodebuild
+ set -o pipefail
+ xcodebuild test -scheme SortedArray-macOS | xcpretty
+ xcodebuild tes... | bash |
d_bash_14557 | ---
+++
@@ -8,7 +8,7 @@
ENV='staging'
fi
-if [[ $TRAVIS_BRANCH =~ ^release//* ]]; then
+if [[ $TRAVIS_BRANCH == release* ]]; then
ENV='testing'
fi
@@ -19,7 +19,7 @@
do
curl -H "Content-Type: application/json" \
-X POST \
- -d "{\"color\": \"green\", \"message_fo... | bash |
d_bash_14558 | ---
+++
@@ -4,12 +4,12 @@
VERSION_NAME="${DEFINITION##*/}"
VERSIONS_DIR="${RBENV_ROOT}/versions"
OSX_RELEASE=`sw_vers -productVersion | cut -f 1-2 -d '.'`
-
+ DOWNLOAD_BUCKET=${BOXEN_RUBIES_BUCKET-"boxen-downloads"}
PREV_PWD=`pwd`
cd $VERSIONS_DIR
echo "Trying to download precompiled Ruby from Bo... | bash |
d_bash_14559 | ---
+++
@@ -17,6 +17,8 @@
# Auto Start
if (( $SHLVL == 1 )) && zstyle -t ':omz:plugin:tmux:auto' start; then
+ (( SHLVL += 1 )) && export SHLVL
+
session="$(
tmux list-sessions 2> /dev/null \
| cut -d':' -f1 \ | bash |
d_bash_14560 | ---
+++
@@ -1,22 +1,32 @@
pkg_name=git
pkg_version=2.7.4
pkg_origin=core
-pkg_license=('gplv2')
+pkg_description="Git is a free and open source distributed version control
+ system designed to handle everything from small to very large projects with
+ speed and efficiency."
+pkg_upstream_url=https://git-scm.com/... | bash |
d_bash_14561 | ---
+++
@@ -4,7 +4,7 @@
read -r github_username
mkdir -p "${TUTORIAL_HOME}"
-cd "${TUTORIAL_HOME}" || exit
+cd "${TUTORIAL_HOME}" || return
docker run --rm -v "${PWD}":/root/src/djangogirls \
gsong/djangogirls-app \ | bash |
d_bash_14562 | ---
+++
@@ -14,7 +14,7 @@
sudo add-apt-repository -y ppa:mapnik/boost-backports-1-54
# Some repos seem to fail quite ofen
-while ! sudo apt-get update; do
+while ! timeout 45 sh -c "sudo apt-get update"; do
true
done
| bash |
d_bash_14563 | ---
+++
@@ -4,14 +4,12 @@
DOWNSTREAM_URL=`curl "$JENKINS_URL/job/package-demon/api/xml?depth=1&xpath=/freeStyleProject/build%5Baction/cause/upstreamProject=%22$UPSTREAM_JOB_NAME%22%20and%20action/cause/upstreamBuild=$UPSTREAM_BUILD_ID%5D/url/text()"`
DOWNSTREAM_FILENAME=`curl "$JENKINS_URL/job/package-demon/api/x... | bash |
d_bash_14564 | ---
+++
@@ -36,7 +36,7 @@
echo "$dst exists"
else
#create new project
- mkdir -- "$dst" || exit 1
+ mkdir -p -- "$dst" || exit 1
#success message
echo "Created Directory: $dst" | bash |
d_bash_14565 | ---
+++
@@ -13,12 +13,23 @@
# Prompt user to install the XCode Command Line Tools
xcode-select --install &> /dev/null
+ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
# Wait until the XCode Command Line Tools are installed
while ! xcode-select -p &> /dev... | bash |
d_bash_14566 | ---
+++
@@ -10,4 +10,4 @@
curl -sOL https://dl.bintray.com/mitchellh/vault/vault_${VAULT_VERSION}_linux_amd64.zip
unzip vault_${VAULT_VERSION}_linux_amd64.zip
-mv vault /usr/local/bin
+sudo mv vault /usr/local/bin | bash |
d_bash_14567 | ---
+++
@@ -9,9 +9,9 @@
# Download clouseau
if [ ! -d "clouseau_run" ]; then
- wget -O clouseau_run.tar.gz http://github.com/virtix/clouseau/archive/master.tar.gz
+ wget -O clouseau_run.tar.gz http://github.com/dlapiduz/clouseau/archive/travis.tar.gz
tar xfz clouseau_run.tar.gz
- mv clouseau-master ... | bash |
d_bash_14568 | ---
+++
@@ -8,8 +8,14 @@
objdump -drwCS -Mintel $1 || gobjdump -drwCS -Mintel $1;
}
+func horizontal_divider() {
+ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' -
+}
+
alias p4s="git p4 submit -M"
alias gvim="gvim --remote-tab-silent"
alias cdtmp='cd $(mktemp -d)'
alias disas='disas_impl'
+# Sour... | bash |
d_bash_14569 | ---
+++
@@ -1,5 +1,9 @@
# Note the use of double quotes in the Rscript command. Single quote usage,
# which is common in online examples, will not escape the bash variables
# properly.
-file_name="$1"
-bsub -W 12:00 -q priority -J "$file_name" -n 1 -R rusage[mem=65536] Rscript --default-packages="$R_DEFAULT_PACKAG... | bash |
d_bash_14570 | ---
+++
@@ -19,8 +19,8 @@
rm -rf $SRC_DIR/libs
fi
-if [ -h libzmq.so ]; then
- rm libzmq.so
+if [ -h libczmq.so ]; then
+ rm libczmq.so
fi
exit 0 | bash |
d_bash_14571 | ---
+++
@@ -14,7 +14,7 @@
-oldstyle \
-target:"C:\Program Files\dotnet\dotnet.exe" \
-filter:"+[Tossit.*]* -[*.Tests]* -[*]*.Api.*" \
- -targetargs:"test" \
+ -targetargs:"test -c Debug" \
-mergeoutput -output:"..\\..\coverage.xml" -register:user)
done
fi | bash |
d_bash_14572 | ---
+++
@@ -1,7 +1,7 @@
#!/bin/bash
SESSION=OH16
-DEF_DIR=/tmp
+DEF_DIR=~/contest-2016
LINKS="links http://localhost:8080/"
cat > ~/.bashrc << "EOF" | bash |
d_bash_14573 | ---
+++
@@ -2,6 +2,6 @@
# Run up an SSH-enabled Apache in the current directory.
-docker run -it --rm --name httpd-ssi -p 5000:80 \
+docker run --rm --name httpd-ssi -p 5000:80 \
-v "$PWD":/usr/local/apache2/htdocs/ \
cassiel/httpd-ssi | bash |
d_bash_14574 | ---
+++
@@ -3,7 +3,7 @@
echo -en "\e[34m"
echo -en '--> '
echo -en $args
- echo "\e[39m"
+ echo -e "\e[39m"
eval $args
}
| bash |
d_bash_14575 | ---
+++
@@ -1,6 +1,18 @@
#!/bin/sh
-. "$(dirname "$(readlink -f "$0")")"/../../ovirt-engine/bin/engine-prolog.sh
+ENGINE_PROLOG="${ENGINE_PREFIX:-$(dirname $0)/..}/share/ovirt-engine/bin/engine-prolog.sh"
+if [ ! -f ${ENGINE_PROLOG} ]; then
+ echo \
+"Cannot locate engine-prolog.sh, please specify oVirt engine ... | bash |
d_bash_14576 | ---
+++
@@ -1,12 +1,7 @@
#!/bin/bash
set -e
-
# Publish npm packages for selected locations
-
# NPM_AUTH_TOKEN must be set by the build environment
-# CircleCI does not consider environment variables in npm's "npm_config_" format to be valid
-# https://npm.community/t/cannot-set-npm-config-keys-containing-undersc... | bash |
d_bash_14577 | ---
+++
@@ -2,10 +2,10 @@
# Install dotnet
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
-mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
-sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main" > /etc/apt/sources.... | bash |
d_bash_14578 | ---
+++
@@ -7,14 +7,18 @@
LOOPBACK_MOUNT=$(sudo udisksctl loop-setup -f $FULL_RASPBIAN_IMAGE_PATH | grep -o -m 1 -P -e "/dev/loop[0-9]+")
echo "Image setup as loopback mount at $LOOPBACK_MOUNT"
+# exit 1 # REMOVE on the final version, just testing here...
+
echo 'Listing block devices...'
lsblk
-echo 'Prepar... | bash |
d_bash_14579 | ---
+++
@@ -25,7 +25,7 @@
# Install necessary dependencies
python3 -m pip install --upgrade pip
-python3 -m pip install -r "${ROOT}/py/setuptools/requirements.txt"
+python3 -m pip install -r "${ROOT}/py/requirements.txt"
pip install nose
# Execute tests | bash |
d_bash_14580 | ---
+++
@@ -5,6 +5,11 @@
openssl aes-256-cbc -K $encrypted_83630750896a_key -iv $encrypted_83630750896a_iv -in secrets.zip.enc -out secrets.zip -d
unzip secrets.zip
+
+mkdir -p ~/.aws
+mv config ~/.aws/config
+mv credentials ~/.aws/credentials
+
chmod 600 id_rsa
make "$TASK" | bash |
d_bash_14581 | ---
+++
@@ -1,4 +1,14 @@
#!/bin/bash
+
+# Load RVM, if you are using it
+[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm
+
+# Load the auto-completion script if RVM was loaded.
+if [ "$rvm_path" ]
+then
+ [[ -r $rvm_path/scripts/completion ]] && . $rvm_path/scripts/completion
+fi
+
switch () {
... | bash |
d_bash_14582 | ---
+++
@@ -12,6 +12,9 @@
# Tools
export PATH=$PATH:~/tools:~/bin
+## Set ag as the default source for fzf
+export FZF_DEFAULT_COMMAND='ag --ignore ./node_modules -g ""'
+
# Python virtualenvwrapper paths
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/projects | bash |
d_bash_14583 | ---
+++
@@ -30,9 +30,5 @@
# like: git comm-[tab]
setopt COMPLETE_ALIASES
-bindkey '^[^[[D' backward-word
-bindkey '^[^[[C' forward-word
-bindkey '^[[5D' beginning-of-line
-bindkey '^[[5C' end-of-line
-bindkey '^[[3~' delete-char
-bindkey '^?' backward-delete-char
+bindkey '^[[H' beginning-of-line
+bindkey '^[[F... | bash |
d_bash_14584 | ---
+++
@@ -13,9 +13,9 @@
tests/peloton_logging_test -t $tuples -b $thread_number -c $do_check
tests/peloton_logging_test -t $tuples -b $thread_number -c $do_check -r 1
echo "-----------test with $tuples, thread $thread_number, ON $file_dir------------------"
- tests/aries_logging_test -t $tuples -b $thread... | bash |
d_bash_14585 | ---
+++
@@ -23,7 +23,6 @@
SOURCES
echo "$APT_SOURCES" > /etc/apt/sources.list
- touch -d '-3 days' /etc/apt/sources.list
}
# updates the package index | bash |
d_bash_14586 | ---
+++
@@ -14,6 +14,13 @@
echo "Removing \"$i\" temporary file(s)..."
rm -f "$i"/EMPTY
done
+
+# Zero out swap partition using dd, then delete the written file.
+swappart=`cat /proc/swaps | tail -n1 | awk -F ' ' '{print $1}'`
+swapoff $swappart;
+dd if=/dev/zero of=$swappart;
+mkswap $swappart;
+swapon $s... | bash |
d_bash_14587 | ---
+++
@@ -4,6 +4,9 @@
ninja -C build
-ninja -C build test
+# test_import_headers is broken with conda due to hard coding gcc
+# meson doesn't provide a good way for disabling individual tests so just skip running them all for now
+# https://github.com/mesonbuild/meson/issues/6999
+# ninja -C build test
ninj... | bash |
d_bash_14588 | ---
+++
@@ -13,8 +13,8 @@
export VERSION=1.18.
export MINOR=2
-# precise quantal saucy precise / trusty utopic vivid wily
-for DISTRO in trusty utopic vivid
+# precise quantal saucy precise utopic / trusty vivid wily
+for DISTRO in trusty vivid wily
do
./ubuntu-make-distro.sh ${DISTRO} ${VERSION}${MINOR} "${H... | bash |
d_bash_14589 | ---
+++
@@ -1,2 +1,10 @@
# Enable rbenv
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
+
+# Avoid using `bundle exec`
+function b {
+ if [[ -a Gemfile ]]
+ then bundle exec $*
+ else command $*
+ fi
+} | bash |
d_bash_14590 | ---
+++
@@ -15,8 +15,8 @@
sudo touch /etc/lifecycled
sudo curl -Lf -o /usr/bin/lifecycled \
- https://github.com/lox/lifecycled/releases/download/${LIFECYCLED_VERSION}/lifecycled-linux-${ARCH}
+ https://github.com/buildkite/lifecycled/releases/download/${LIFECYCLED_VERSION}/lifecycled-linux-${ARCH}
sudo chmod +x... | bash |
d_bash_14591 | ---
+++
@@ -4,11 +4,11 @@
rustc ci/style.rs && ./style src
-if rustup component add rustfmt-preview ; then
- command -v rustfmt
- rustfmt -V
- cargo fmt --all -- --check
-fi
+rustup toolchain install nightly -c rustfmt --allow-downgrade
+rustup override set nightly
+command -v rustfmt
+rustfmt -V
+cargo... | bash |
d_bash_14592 | ---
+++
@@ -12,8 +12,8 @@
print -Pn "\ek$a:$3\e\\" # screen title (in ^A")
;;
xterm*|rxvt)
- print -Pn "\e]2;$2\a" # plain xterm title ($3 for pwd)
+ #print -Pn "\e]2;$2\a" # plain xterm title ($3 for pwd)
+ echo -ne "\033]0;"$1"\007"
;;
esac
}
- | bash |
d_bash_14593 | ---
+++
@@ -24,5 +24,5 @@
#rm -f VBoxGuestAdditions.iso
# Start the newly build driver
- /etc/init.d/vboxadd start
+ service vboxadd start
fi | bash |
d_bash_14594 | ---
+++
@@ -11,7 +11,7 @@
BRANCH=$(basename $BRANCH)
fi
- WORKDIR=$(command git workdir | xargs basename)
+ WORKDIR=$(basename "$(command git workdir)")
echo " ${PR_LIGHT_BLACK}[${PR_RED}${WORKDIR}:${BRANCH}${PR_LIGHT_BLACK}]${PR_NO_COLOR}"
fi | bash |
d_bash_14595 | ---
+++
@@ -1,5 +1,5 @@
#!/bin/bash
echo [$@]
-echo "command=xdg-open \"http://www.google.com.hk/webhp?hl=zh-CN#safe=strict&hl=zh-CN&q=$@\""
+echo "command=xdg-open \"https://www.google.com/search?q=$@\""
echo "icon="
echo "subtext=Search on google for $@" | bash |
d_bash_14596 | ---
+++
@@ -14,7 +14,8 @@
#See the License for the specific language governing permissions and
#limitations under the License.
-set +e
+# Keep the pipefail here, or the unit tests won't return an error when needed.
+set -eo pipefail
source /etc/profile.d/gimme.sh
| bash |
d_bash_14597 | ---
+++
@@ -4,7 +4,7 @@
# URL of LXD image with pre-provisioned Media Cloud dependencies
# (use ./.travis-lxd/setup_travis_lxd_image.sh) to create a new one)
-MC_LXD_IMAGE_PROVISIONED_URL=https://s3.amazonaws.com/mediacloud-travis-lxd-images/travis-lxd-images/mediacloud-travis-20180228.tar.gz
+MC_LXD_IMAGE_PROVIS... | bash |
d_bash_14598 | ---
+++
@@ -1,24 +1,18 @@
#!/bin/bash
-OPTIND=1
-seed="" # default to no seed specified
-while getopts "S:" opt
-do
- case "$opt" in
- S) arg="${OPTARG#"${OPTARG%%[![:space:]]*}"}" # remove leading space
- seed="SEED=$arg" ;;
- esac
+set -e
+for aig in *.aig; do
+ ../../yosys-abc -c "read -c $aig; w... | bash |
d_bash_14599 | ---
+++
@@ -45,6 +45,8 @@
- You should, do other interesting things.
- As a final step, say hi to someone today.
+
+- For real. A final step.
DONE
}
| bash |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.