blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 4 115 | path stringlengths 2 970 | src_encoding stringclasses 28
values | length_bytes int64 31 5.38M | score float64 2.52 5.28 | int_score int64 3 5 | detected_licenses listlengths 0 161 | license_type stringclasses 2
values | text stringlengths 31 5.39M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
2b15047b908b7b80b6723fd929842dfe3fa2f28b | Shell | MarcelRaschke/rbenv | /libexec/rbenv-which | UTF-8 | 1,714 | 4.1875 | 4 | [
"MIT"
] | permissive | #!/usr/bin/env bash
#
# Summary: Display the full path to an executable
#
# Usage: rbenv which <command>
#
# Displays the full path to the executable that rbenv will invoke when
# you run the given command.
set -e
[ -n "$RBENV_DEBUG" ] && set -x
# Provide rbenv completions
if [ "$1" = "--complete" ]; then
exec rben... | true |
7a7eb077a865b17079b2881eb0c247af265ae5c0 | Shell | PlayerLegend/prog-dir | /src/shell-utils/gallery-tag/gallery-tag.sh | UTF-8 | 821 | 3.796875 | 4 | [] | no_license | #!/bin/sh
list_files() {
find "$tmp" -type f -not -name '*.json' | sort -V
}
count_files() {
list_files | wc -l
}
_gallery_tag() {
download_archive="$(mktemp)"
tmp="$(mktemp -d)"
xterm -e gallery-dl -d "$tmp" --download-archive "$download_archive" "$1"
first_path="$(find "$tmp" -type f -not ... | true |
32277924599300c57ac2e3a864d1b47ced4113f4 | Shell | abphilip-codes/Hackerrank_Bash | /Practice/A33.sh | UTF-8 | 297 | 3.484375 | 3 | [
"MIT"
] | permissive | #!/bin/bash
echo "Enter the year:"
read year
if [ $[$year % 400] -eq "0" ]
then
echo "$year is a leap year!"
elif [ $[$year % 4] -eq 0 ]
then
if [ $[$year % 100] -ne 0 ]
then
echo "$year is a leap year!"
else
echo "$year is not a leap year."
fi
else
echo "$year is not a leap year."
fi | true |
56d19907a712ff883c45b6a79a8c8559fa1cee2f | Shell | ivanbrennan/dotfiles | /terminal/terminfo.d/configure.sh | UTF-8 | 258 | 2.828125 | 3 | [] | no_license | dir=$HOME/Development/resources/dotfiles/terminal/terminfo.d
files=( tmux.terminfo
tmux-256color.terminfo
xterm-256color.terminfo )
for file in "${files[@]}"; do
tic -o $dir/terminfo $dir/$file
done
ln -svhF $dir/terminfo $HOME/.terminfo
| true |
0e56d39e9f9a18a2e27f8a10acfe4e96bafc9cae | Shell | jietang64/javapractise | /src/main/java/com/jietang/sh/initTable.sh | UTF-8 | 474 | 2.65625 | 3 | [] | no_license | #!/bin/bash
if [ -z "$1" ]; then
echo "$(date "+%Y-%m-%d %H:%M:%S"): 请输入服务器 IP"
exit
fi
curl -i -XPOST http://$1:8086/query --data-urlencode "q=CREATE DATABASE aisp_biz"
curl -i -XPOST http://$1:8086/query --data-urlencode "q=CREATE CONTINUOUS QUERY cq_MarketBatchHourSum ON aisp_biz BEGIN SELECT count(/^labe... | true |
f2275d66fba2a3ae3ee2456a24d8468ba4f81902 | Shell | nigels-com/glt | /src/program/gltLife/lif2src.sh | UTF-8 | 696 | 2.90625 | 3 | [] | no_license | #!/bin/bash
printf "#ifndef LIF2SRC_H\n#define LIF2SRC_H\n\n" > lif2src.h
printf "#include \"lif2src.h\"\n\n" > lif2src.cpp
printf "#ifndef EXAMPLE_H\n#define EXAMPLE_H\n\n" > example.h
printf "#include \"lif2src.h\"\n\nconst void *lifeExamples[]={\n" >> example.h
for i in *.LIF;
do declare NAME=`echo $i | cut -d.... | true |
67ba1bcec17401fc05d06fa54cdf2099cba4458f | Shell | NicholasStern/stock_market_reinforcement_learning | /Q_agent/run.sh | UTF-8 | 523 | 3.109375 | 3 | [] | no_license | #!/usr/bin/env bash
file="results.txt"
if [ -f $file ] ; then
rm $file
fi
echo "---Results---" >> results.txt
hwindows=( 1 2 3 4 5 )
epsilons=( 0 .01 .05 .1 .2 .5 1 )
rewards=( 0 .1 .5 1 2 5 )
penalties=( 0 -.1 -.5 -1 -2 )
trap "exit" INT
for i in "${hwindows[@]}"
do
for e in "${epsilons[@]}"
do
... | true |
cb99683f8e1c42b39d6c0f58558cfe258577b40a | Shell | onurgu/joint-ner-and-md-tagger | /scripts/default/helper-script-to-run-the-experiment-set-small-sizes.sh | UTF-8 | 3,525 | 2.96875 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env bash
experiment_name=${1:-section1-all-20171114-08}
original_experiment_name=${experiment_name}
virtualenvwrapper_path=`which virtualenvwrapper.sh`
configuration_variables_path=${2:-./scripts/default/configuration-variables.sh}
if [ -f ${configuration_variables_path} ]; then
source ${configuratio... | true |
f85697bb27d08a3862bc00d82d6f8958104bb4eb | Shell | ReddyManu/Shell-Scripting | /Roboshop/components/mongodb.sh | UTF-8 | 825 | 3.328125 | 3 | [] | no_license | source components/common.sh
MSPACE=$(cat $0 components/common.sh | grep Print | awk -F '"' '{print $2}' | awk '{ print length }' | sort | tail -1)
COMPONENT_NAME=MongoDB
COMPONENT=mongodb
Print "Download Repo"
curl -s -o /etc/yum.repos.d/$COMPONENT.repo https://raw.githubusercontent.com/roboshop-devops-project/$COMP... | true |
748dce1e0d872723131c3e5452ae044b1fee3601 | Shell | jiawn/openedge | /release.sh | UTF-8 | 2,365 | 3.75 | 4 | [
"Apache-2.0"
] | permissive | #!/bin/sh
#
set -e
while [ -n "$1" ]
do
case "$1" in
-v)version=$2
shift ;;
esac
shift
done
version_info="package version\n\n// Version the version of this binary\nconst Version = \"$version\""
echo $version_info > version/version.go
go_version=`go version | awk '{print substr($3, 3)}'`
echo "Current... | true |
7f18d4d1a6bc7817a37b0460b51f46a5fb8a9b38 | Shell | surmdren/devops | /set_password_policy/set_to_no_password.sh | UTF-8 | 169 | 3.03125 | 3 | [] | no_license | #!/bin/ksh
##OS Class
OS=`uname`
if [ $OS = Linux ]
then
echo "$1:*" | sudo /usr/sbin/chpasswd -e
elif [ $OS = AIX ]
then
echo "$1:*" | sudo chpasswd -c -e
fi
| true |
28712969b080f8d047118b5fee43e51bbb0a2c8a | Shell | PaulKnoops/Experimental_Evolution_Sequence_Repo | /RunThrough_DataCleaning_Scripts/novo_map_scriptMaker.sh | UTF-8 | 712 | 3.390625 | 3 | [] | no_license | #! /bin/bash
#Variable for project:
project_dir=/home/paul/episodicData/novoalign
#Create variable for reference genome
novo_index=${project_dir}/novo_index/dmel-all-chromosome-r5.57_2.nix
#Variable for path to Novoalign
novoalign=/usr/local/novoalign
#Path the trim outputs to be mapped
trim_dir=/home/paul/episodic... | true |
c857cc04624902870379c51ee1ec0e597236eaa8 | Shell | ramhiser/keras-image-captioning | /scripts/download-flickr8k-dataset.sh | UTF-8 | 537 | 3.1875 | 3 | [
"MIT"
] | permissive | #!/bin/bash
FLICKR_DIR="../flickr8k_data"
echo "Creating directory: ${FLICKR_DIR}"
mkdir -p $FLICKR_DIR
cd $FLICKR_DIR
echo "Downloading Flickr8K data set (go grab a coffee)..."
wget -nc http://nlp.cs.illinois.edu/HockenmaierGroup/Framing_Image_Description/Flickr8k_text.zip
wget -nc http://nlp.cs.illinois.edu/Hocke... | true |
b08cb04fc67d65b70403188f1ad0a37ff93a2c4e | Shell | gaoyangxiaozhu/docker_monitor | /start_mysql.sh | UTF-8 | 234 | 2.875 | 3 | [] | no_license | #!/bin/bash
if [ ! $1 ]; then
echo "usage: $0 name"
exit
fi
NAME=$1
docker rm -f $NAME 2>/dev/null
docker run --name $NAME --restart=always -p 3333:3306 -v `pwd`/mysql:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123123 -d mysql
| true |
c567094d01d9b0b487df513c2d8ce70dab24f788 | Shell | mattvh/dotfiles | /osx/osx.sh | UTF-8 | 4,467 | 3.03125 | 3 | [] | no_license | #!/bin/bash
# ~/.osx — http://mths.be/osx
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
##################################################################... | true |
20969a3d58a11311abbbe5ea2d5ff2b09e73bc65 | Shell | ilb/image-openserver | /setup/install_mcrypt.sh | UTF-8 | 431 | 2.515625 | 3 | [] | no_license | curl -fsSL 'https://pecl.php.net/get/mcrypt-1.0.4.tgz' -o mcrypt-1.0.4.tgz \
&& mkdir -p /tmp/mcrypt \
&& tar -xf mcrypt-1.0.4.tgz -C /tmp/mcrypt --strip-components=1 \
&& rm mcrypt-1.0.4.tgz \
&& ( \
cd /tmp/mcrypt \
&& phpize \
&& ./configure \
&& make -j "$(nproc)" \
&& make install \
) \
&& rm -r /tmp/mcr... | true |
f5ce321e09ab6ce1f85857ed720d01334f878d54 | Shell | UCSD-E4E/radio_collar_tracker_postprocess | /downloader/getLatest.sh | UTF-8 | 659 | 3.125 | 3 | [] | no_license | #!/bin/bash
META_FILE_READER="/Users/e4e/e4e-rct/radio_collar_tracker/meta_file_reader/read_meta_file.py"
FILE_CHOOSER="/Users/e4e/e4e-rct/radio_collar_tracker/python_dialogs/filechooser.py"
DECREMENTER="/Users/e4e/e4e-rct/radio_collar_tracker/downloader/decrementer.py"
# Get fileCount
scp -i ~/.ssh/id_rsa pi@192.168.... | true |
0517041be72041855d7c5b8e5373f1266f41bce7 | Shell | indigo-dc/fgAPIServer | /fgtest/fgtest.sh | UTF-8 | 37,902 | 3.4375 | 3 | [
"Apache-2.0"
] | permissive | #!/bin/bash
#
# fgtest.sh
#
FG_ENDPOINT=http://localhost:8888/v1.0
FG_TEST_TOKEN="TEST_TOKEN"
FG_HEAD_AUTH="-H \"Authorization: Bearer $FG_TEST_TOKEN\""
FG_HEAD_JSON="-H \"Content-type: application/json\""
ASD_ENDPOINT=http://localhost:8080
ASD_MAINPAGE=APIServerDaemon/
PTV_ENDPOINT=http://localhost:8889
PTV_USER=tok... | true |
a1320356aaa7ca6983e1551a9eb1c8936a114d88 | Shell | megalithic/dotfiles | /config/sketchybar/plugins/toggle_bracket.sh | UTF-8 | 305 | 3.078125 | 3 | [] | no_license | #!/usr/bin/env sh
BRACKET_NAME="$(echo $NAME | tr '.' ' ' | awk "{ print \$1 }")"
ITEMS="$(sketchybar --query $BRACKET_NAME | jq -r ".bracket[]")"
args=()
while read -r item
do
if [ "$item" != "$NAME" ]; then
args+=(--set "$item" drawing=toggle)
fi
done <<< "$ITEMS"
sketchybar -m "${args[@]}"
| true |
e6c303d8d0718a809dd3ac9d0701b3403ed607af | Shell | SeppPenner/timely | /server/bin/docker/deploy-wait-and-insert.sh | UTF-8 | 1,400 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | #!/bin/bash
WORKING="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. "${WORKING}/deploy-env.sh"
"${SRC_DIR}/bin/docker/deploy-timely-build.sh"
"${SRC_DIR}/bin/docker/wait-for-it.sh" timely:54322 -t 45
# enable app
curl -k -H "Content-Type: application/json" -d \
'{
"enabled":true,
"pinned":true
}' \
ht... | true |
0a147b5e4f20ba57e96c6adef7d5c61a046d4e91 | Shell | jasonmeurer/aws-elb-autoscaling | /Version-1.1/clear-log-groups.sh | UTF-8 | 778 | 3.875 | 4 | [] | no_license | #!/bin/bash
# Use this script to clear all the log-groups in your current region
trap ctrl_c INT
function ctrl_c() {
echo "** Exiting due to CTRL+C **"
exit -1
}
echo "WARNING: This will destroy all the log-groups in your region"
echo "WARNING: Waiting for 10 seconds before kicking off..."
read -r -p "Are ... | true |
7ae3eaf92b8a2619fecb91cbcc42ffdd5f370f7a | Shell | ishine/tensorflow_cpp_packaging | /4_generate_generic_cuda_x86_64_package.sh | UTF-8 | 1,134 | 3.8125 | 4 | [
"MIT"
] | permissive | #!/bin/bash
# Get the directory where the script is stored
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ ! -d $DIR/packaging/headers ]; then
echo Get the Tensorflow C++ headers with 2_make_wheel_for_headers.sh script
exit 1
fi
if [ ! -d $DIR/packaging/libs ]; then
echo Get the Tensorflow C++ libr... | true |
12ed47c85d57fec383fc5ba57082a68e2741d07f | Shell | dfarrel1/dots | /profile/aws.sh | UTF-8 | 8,051 | 3.625 | 4 | [] | no_license | #!/usr/bin/env bash
HERE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# op_session.sh needs gnu-sed
export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"
# aws-vault (set on a per repo basis with ./.envrc)
[[ ! -f ~/.envrc ]] && touch ~/.envrc && ln -fs "${HERE}/.envrc" ~/.envrc
# copy la... | true |
cf2a9ba0341d56133a928d4dc8e260e8803dccb2 | Shell | probaton/creep | /examples/etc/etckeeper/post-install.d/49creep | UTF-8 | 270 | 2.5625 | 3 | [] | no_license | #!/bin/sh
set -e
pl="/var/cache/etckeeper/packagelist"
# push summary of changes to creep
echo "`hostname -f`: `etckeeper list-installed | diff -U0 $pl.pre-install - | tail -n+4 | egrep '^[-+]' | /usr/local/bin/etckeeper-creep-summary.py`" | /usr/local/bin/creep.sh
| true |
8b08861f3e92febd1153106d38bc6b6c0993b8d8 | Shell | johnnyy/johnnymarcosscripts20202 | /atividades/atividade05/maiorDe3Verificado.sh | UTF-8 | 407 | 3.546875 | 4 | [] | no_license | #!/bin/bash
# Correção: 1,0
number1=$1
number2=$2
number3=$3
if expr ${number1} + 1 &> /dev/null && expr ${number2} + 1 &> /dev/null && expr ${number3} + 1 &> /dev/null
then
maior=${number1}
if [ ${maior} -lt ${number2} ]
then
maior=${number2}
fi
if [ ${maior} -lt ${number3} ]
then
maior=${number3}
... | true |
e21a8a65da49cf5355d29503b5bfbd71e88d376f | Shell | tazjel/recordmydesktop2.0 | /html-template | UTF-8 | 800 | 2.796875 | 3 | [] | no_license | #!/bin/bash
# $out - webm
# optional $mp4
# Generate HTML source
html="${out%.*}.html"
#eval $(ffprobe -v 0 -of flat=s=_ -show_format "$out")
cat <<END > $html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>${out%.*}</title>
<link rel="stylesheet" href="/style.css">
</head>
<body>
<video controls width... | true |
f4ab58326e8804d7bd1fc784614989fad6a0ef0f | Shell | HuygensING/antioch | /scripts/antioch-functions.sh | UTF-8 | 22,233 | 3.34375 | 3 | [
"Apache-2.0"
] | permissive | # usage: source antioch-functions.sh
# some convenience methods for the shell
function a-log {
echo
echo ">> $*"
echo
}
function a-annotate-resource {
r=$1; t=$2; v=$3
curl -i -X POST --header "${authheader}" ${be}/resources/${r}/annotations --header 'Content-type: application/json' \
--data-binary "{\"ann... | true |
15d9ca7bb98a92b850e0acdb9d7a22e7ae7f67dd | Shell | canizarl/Assignment6 | /run_simple_mc.sh | UTF-8 | 1,220 | 4.125 | 4 | [] | no_license | #!/bin/bash
echo
#compiles program to make sure works on every machine
_=$(make simple_mc)
#if no argument is given then uses default of 10
#if argument is given then executes the program n number of times
# required argument -n followed by an integer.
args=("$@")
if [ -z "$args" ]
then
n=100 #default valu... | true |
573f4ad0875fcae20431e2e448b4d08629cadbb6 | Shell | lucascord/tohell | /decimo.sh | UTF-8 | 1,609 | 3.609375 | 4 | [] | no_license | #!/bin/bash
#
#
#
#
#
# Autor: Lucas cordeiro
#
#
#
#
# Este programa irá realizar um backup de full de arquivos localizados
# no servidor, onde teremos que copiar /srv/samba para /srv/bkp
#
#
#Exemplo de execução
#./decimo.sh
#
#
#
#
# BKPDIR - local onde serão destinados os arquivos de backup
BKPDIR="/srv/bkp" #local... | true |
b2966915812a38ac3f932dc03d4c67480cda3655 | Shell | devops185011/Database-code-inventory-dashboard | /database status.txt | UTF-8 | 440 | 3.5 | 4 | [] | no_license | #!/bin/bash
ORATAB=/var/opt/oracle/oratab
echo "`date` "
echo "Oracle Database(s) Status `hostname` :\n"
db=`egrep -i ":Y|:N" $ORATAB | cut -d":" -f1 | grep -v "\#" | grep -v "\*"`
pslist="`ps -ef | grep pmon`"
for i in $db ; do
echo "$pslist" | grep "ora_pmon_$i" > /dev/null 2>$1
if (( $? )); then
... | true |
4fe064687409e16b072aef2d859fc9b5571dc032 | Shell | SparkDL/analytics-zoo | /pipeline/objectDetection/data/pascal/convert_pascal.sh | UTF-8 | 893 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | #!/bin/bash
ssd_root=${HOME}/analytics-zoo/pipeline/objectDetection
data_root=${ssd_root}/data/pascal
# Convert Sequence File
if [ ! -d "${data_root}/seq/train" ]; then
mkdir -p ${data_root}/seq/train
mkdir -p ${data_root}/seq/test
fi
java -cp ${ssd_root}/dist/target/object-detection-0.1-SNAPSHOT-jar-with-depend... | true |
74e7a58a21491b1a5d791c5fddec11d174ce24b7 | Shell | mikejhuang/neurosim | /paramsync.sh | UTF-8 | 2,152 | 2.859375 | 3 | [] | no_license | #Importing parameters from neurosim.sh
line=1 #start line of parameters
paramload=true
date >> paramlog
while [ $paramload != done ]; do
sed -n "$line"p parameters.txt >> paramlog
eval `sed -n "$line"p parameters.txt`
(( line++ ))
done
#Set number of nodes
nbsynapses=`grep -c \<Synapse\> $MASTERCONF`
nbnodes=`expr $nb... | true |
398df7927de996db40a63e409eadaa017bc720bb | Shell | wilspi/git-auto-push | /git-auto-push.sh | UTF-8 | 335 | 3.671875 | 4 | [] | no_license | #!/usr/bin/env bash
$PWD=$(pwd)
if [ $# -eq 0 ]; then
# defaults to 5 minutes
interval=18000
else
re='^[0-9]+$'
if ! [[ $1 =~ $re ]]; then
echo "ERROR: interval must be a number" >&2; exit 1
fi
interval=$1
fi
# Push git commits after every $interval
# Run in background
watch -n $interval "$PWD/scripts/git_pus... | true |
db333777571ad39f763ce4d26209b4977caeed08 | Shell | JeffersonLab/remoll | /analysis/pe_studies/scripts/do_all_rates.sh | UTF-8 | 4,259 | 3.46875 | 3 | [] | no_license | #!/bin/bash
if [[ ! -d results ]] ; then
mkdir results
fi
if [[ ! -f results/bkgd_pe ]] ; then
cp -p ../build/bkgd_pe/bkgd_pe results/bkgd_pe
fi
if [[ ! -d results/pdfs ]] ; then
mkdir results/pdfs
fi
if [[ ! -f results/scans_R5o.root ]] ; then
echo "Error: No results/scans_R5o.root exists, trying ... | true |
66d095cf68d43ac99275588960accbd6c779c884 | Shell | pyrech/composer-changelogs | /tests/fixtures/bin/fake.sh | UTF-8 | 141 | 2.734375 | 3 | [
"MIT"
] | permissive | #!/bin/bash
FAKE_BIN_DIR=$(dirname $0)
TEST_DIR=$FAKE_BIN_DIR/../../temp
MESSAGE_FILE=$TEST_DIR/commit-message.txt
cat "$2" > $MESSAGE_FILE
| true |
a646005b20e7d225300c3d0549fad58cd89b00c4 | Shell | ksafranski/dotfiles-1 | /mount_autorun/bin/unmount_autorun | UTF-8 | 421 | 3.578125 | 4 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | #!/bin/bash
###################
# To be run by unmount_autorun_monitor each time an fsevent is
# detected in the /Volumes directory on macOS. This script will check
# to see if an autorun script in place to be run on unmount, and runs
# it if it exists.
script="/tmp/unmount_autorun$1/tlsautorun.sh"
if [ ! -d "$1" ] &&... | true |
eb420b317c990debbd6595f37e0b9d936d260d25 | Shell | larsbutzmann/dotfiles | /zsh/.zshrc.d/10-daily.sh | UTF-8 | 633 | 3.703125 | 4 | [
"MIT"
] | permissive | #!/usr/bin/env zsh
export DAILY_DIR="${DAILY_DIR:-${HOME}/dev/daily}"
function daily_timestamp {
date +'%Y-%m-%d'
}
function daily {
local filename="$(daily_timestamp).log"
local filepath="${DAILY_DIR}/${filename}.md"
mkdir -p $(dirname "${filepath}")
# if file doesn't exist
if [[ ! -e "${f... | true |
341b2615d7d9ca274fbb0b93b6287ff85656f7ba | Shell | petronny/aur3-mirror | /gtorrent-gtk/PKGBUILD | UTF-8 | 902 | 2.75 | 3 | [] | no_license | # Maintainer: lluixhi <lluixhi@gmail.com>
pkgname=gtorrent-gtk
# TODO Read pkgver somehow from the repo.
pkgver=0.0.2
pkgrel=7
pkgdesc='A minimalist bittorrent client written by the 4chan technology board (GTK Edition).'
arch=('i686' 'x86_64')
url="https://github.com/gtorrent/gtorrent-gtk"
license=('GPLv3')
depends=('... | true |
09cd978cb169287ec53ee1f9c55abccf985577a6 | Shell | Prudhvieee/Assignments | /Day5/Prob02/case/readnumprintday.sh | UTF-8 | 377 | 3.59375 | 4 | [] | no_license | #!/bin/bash
read -p "Enter Number : " num
len=${#num}
for (( i=1; i<=$len; i++ ))
do
digit=$( echo $num | cut -c $i )
case $digit in
1)echo sunday;;
2)echo monday;;
3)echo tuesday;;
4)echo wednesday;;
5)echo thursday;;
6)echo friday;;
7)echo saturday;;
... | true |
930d4afa27a2b27658a99166b07ca0aea1a3293d | Shell | priyansh9879/automation-scripts | /deploy_aws_terraform/deploy_aws_terraform.sh | UTF-8 | 6,118 | 3.703125 | 4 | [] | no_license | #!/usr/bin/bash
echo ============================================================================================================
echo "Welcome to Automatic awsvliv2 and terraform Deployment Wizard. This Script works both with Red Hat
Enterprise Linux Server release 7.5 (Maipo) and Red Hat Enterprise Linux Release 8.... | true |
b9959d12baac70e3d8ee1a99dc7470cbfc07f8b9 | Shell | goddva/dotfiles | /.config/i3/scripts/starter | UTF-8 | 1,355 | 3.015625 | 3 | [] | no_license | #!/bin/bash
# SCREEN_SIZE=$(/home/glarsen/.config/i3/scripts/active-monitor | sed 's/ /x/')
#SCREEN_SIZE=$(xrandr | awk '/*/ {print $1}' | head -1)
SCREEN_SIZE="3840x2160"
if [ "$(echo "${SCREEN_SIZE}" | cut -d 'x' -f1)" == "1200" ]; then
X_SIZE=1100
Y_SIZE=50
else
X_SIZE=1500
Y_SIZE=50
fi
X_POS=$[$(echo "$... | true |
1dd59e7c36e8d15feca09a793150ff02d06758f8 | Shell | yunielrc/install-scripts | /dist/packages/openvpn/openvpn-shadowsocks-server-linux | UTF-8 | 3,588 | 3.984375 | 4 | [] | no_license | #!/usr/bin/env bash
set -euEo pipefail
# Include
. <(wget -qO - 'https://git.io/JT9Yw?=openvpn.bash')
# Environment parameters
## server
readonly PUBLIC_IP="${PUBLIC_IP:-"$(wget -qO - checkip.amazonaws.com)"}"
## shadowsocks server
readonly WORKING_DIR="${WORKING_DIR:-"$PWD"}"
readonly SS_CLIENT_PORT="${SS_CLIENT_PO... | true |
fab2ec28c98c9fcbca398b4633c6af78440ac5c3 | Shell | alejandra2015/ScriptBash | /Getopts.sh | UTF-8 | 27,260 | 3.84375 | 4 | [] | no_license | #!/bin/bash
#---------------------------------VERIFICACIONES DEL DIRECTORIO /var/--------------------------#
ls /var/Proyecto 1>/dev/null 2>/dev/null
if [ ! $? == 0 ]; then #no existe esa carpeta
mkdir /var/Proyecto 2>/dev/null
if [ ! $? == 0 ]; then
echo "Error."
echo "Razón: NO SE PUEDE CREAR CARPET... | true |
9865e9048c84f4ecd3789313959b8cfaeb4f2580 | Shell | client9/client9-website-2015 | /deploy.sh | UTF-8 | 385 | 3.34375 | 3 | [] | no_license | #!/bin/sh
set -ex
# http://gohugo.io/tutorials/github_pages_blog/
GITHUBIO="/go/src/github.com/client9/client9.github.io"
echo $GITHUBIO
# Commit changes.
msg="rebuilding site `date`"
if [ $# -eq 1 ]
then msg="$1"
fi
hugo --destination=/go/src/github.com/client9/client9.github.io
echo -e "Deploying updates to Git... | true |
70b126649e8c86c06335db98d03bededcbfc3647 | Shell | Pastequeman/dotfiles | /.config/shellconfig/alias | UTF-8 | 450 | 2.953125 | 3 | [] | no_license | #!/usr/bin/env bash
# shortcut
alias reload="source ~/.bash_profile"
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias more='less'
alias egrep='egrep --colour=auto'
alias fgrep='fgrep --colour=auto'
alias work='cd /run/media/julien/SP\ PHD\ U3/NIES'
# List declared aliases, functions, paths
alias alia... | true |
6486d10eae2382afbb9f908663186ea8d365cc5e | Shell | martijnd/Advent-of-code | /init.sh | UTF-8 | 1,119 | 3.796875 | 4 | [] | no_license | #!/bin/sh
if [ -z "$1" ]
then
echo "Enter a day!"
exit 1
fi
if [ -f .env ]; then
export $(cat .env | awk '/=/ {print $1}')
fi
if [ -d "./2022/Day$1" ]
then
echo "Directory 'Day$1' already exists!"
else
cd 2022
mkdir "Day$1"
cd "Day$1"
touch index.ts
touch index.test.ts
touch input.txt
ec... | true |
0c04714794f43c7c66c54f5b7ebaa80167bd5a93 | Shell | luiselizondo/docker-nginx-lb-serf | /scripts/serf-member-leave.sh | UTF-8 | 326 | 2.921875 | 3 | [] | no_license | if [ "x${SERF_SELF_ROLE}" != "xlb" ]; then
echo "Not an lb. Ignoring member leave"
exit 0
fi
while read line; do
IP=$(echo $line | awk '{print $2 }')
sed -i "/${IP}:3000;/d" /etc/nginx/sites-enabled/default
sed -i "/${IP}:3000;/d" /var/log/supervisor/nginx-available-servers.txt
done
service nginx ... | true |
19def8277daa1df67f002fcd625e2c2840358299 | Shell | srotya/sidewinder | /core/src/web/build.sh | UTF-8 | 315 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | #!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "Script location: $DIR"
mkdir -p ./target
cp -r $DIR target/web_temp/
cd target/web_temp
polymer install
DIR=$(pwd)
polymer build --add-service-worker --js-compile --js-minify --css-minify --html-minify --bundle --root $DIR
mv build ../build | true |
9c21ece2066e7f92f3113247247ff24449e04304 | Shell | uk-gov-mirror/companieshouse.ansible-collections | /ch_collections/base/roles/nagios_nrpe_client/templates/nagios-host-add.j2 | UTF-8 | 1,019 | 2.765625 | 3 | [
"MIT"
] | permissive | #!/bin/bash
HOSTNAME=`curl http://169.254.169.254/latest/meta-data/instance-id`;
IP_ADDRESS=`hostname -I | awk '{print $1}'`;
NAGIOS_HOST="{{ nagios_host }}";
API_KEY="{{ nagios_api_key | default("")}}";
TEMPLATE="{{ server_template_name }}";
curl -XPOST "http://$NAGIOS_HOST/nagiosxi/api/v1/config/host?apikey=$API_KE... | true |
4121546e1074c12c6e04c91cd27711cd55738ad6 | Shell | patrickmelvin/dotfiles | /bash_profile | UTF-8 | 1,310 | 2.84375 | 3 | [] | no_license | #export http_proxy="http://lon1.sme.zscaler.net:80"
#export https_proxy="http://lon1.sme.zscaler.net:9480"
export EDITOR='vim'
export no_proxy=127.0.0.1 # Proxy fix for Rspec
export DEFERRED_GARBAGE_COLLECTION=true
if [ -f ~/.bash/git-completion.bash ]; then
. ~/.bash/git-completion.bash
fi
if [ -f ~/.bash/path ]; ... | true |
029da9e50ba64d415d9f62dafa975bcf4025a5d2 | Shell | grundm/graphCA | /analysis/mri/gppi_pre.sh | UTF-8 | 15,615 | 2.65625 | 3 | [] | no_license | #!/bin/bash
# gppi_pre.sh $ID
# AFNI Tutorial: https://afni.nimh.nih.gov/sscc/gangc/CD-CorrAna.html
# ================================================================================
# SETTINGS
# --------------------------------------------------------------------------------
TR=0.750
resp_model='GAM'
block_max=4
... | true |
27313a8b6c03689d4ffdb6a075df9dcac14d3bd6 | Shell | xieydd/shell | /system/find_fastest_apt_source.sh | UTF-8 | 2,408 | 3.265625 | 3 | [] | no_license | #!/bin/bash
# Copyright 2020 The SQLFlow Authors. All rights reserved.
# Licensed 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 appl... | true |
617dac52687731cfbed5da8c64fa54a198deeac7 | Shell | Skatteetaten/generator-aurora-openshift | /install.sh | UTF-8 | 556 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | #!/usr/bin/env bash
which node || sudo apt-get install nodejs npm -y
#stupid debian do not use node as executable
which node || sudo ln -s `which nodejs` /usr/bin/node
which npm || sudo apt-get install npm -y
which ~/.ao/bin/yo || npm install yo -g --prefix=~/.ao
#hvis vi publiserer på npm registry kan vi sikker f... | true |
4b4913b829a20135113b9e2eff9b2cd2334aea1e | Shell | zivoslav/upracmeslovensko.sk | /watch.sh | UTF-8 | 904 | 2.84375 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env sh
# watchexec -c -w ./pruga -e py,php "$1"
# watchmedo shell-command --command='echo "${watch_src_path}"' --recursive src
# watchmedo shell-command --command='./src/scrapper/index.py' --recursive src
# watchexec -c -w ./php -e py,php "php php/dev_utils/make_ast_py.php"
# watchexec -c -w ./pruga -... | true |
83ee9ec3e8892f84941cc0a922b2d8824128e07f | Shell | auspbro/qf7_mtp | /mtp_server/scripts/Q_carrier_eth_mac_read.sh | UTF-8 | 800 | 3.4375 | 3 | [] | no_license | #pass board to test (pri, sec)
if [ "$1" = "QSEVEN" ]; then
device=eth1
else
if [ "$1" = "CARRIER" ]; then
device=eth0
else
echo "FAIL, invalid Ethernet Device specified"
exit
fi
fi
rm Q_$1_ETH_MAC.txt
echo "INFO, test carrier_eth_mac_read"
found=`ifconfig | grep $device`
if [ -z "$found" ]; then
... | true |
bbdb6b96e92b7a88becda2d498ef7779d3baf96c | Shell | amercier/dotfiles | /.dotfiles/bin/setup-macos-httpd | UTF-8 | 4,960 | 3.40625 | 3 | [] | no_license | #!/usr/bin/env bash
# shellcheck disable=SC1090
# shellcheck disable=SC1091
set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace
dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
. "$dir/../lib/colors.sh"
filepaths=$(find "$dir/../lib" -type f -not -name '.*' -not -name '*.example' -not -name 'colors.sh'... | true |
e2f40fee0b01da7ee98becf7abdd3f408c46352c | Shell | awwaiid/code-htmlize | /code-htmlize | UTF-8 | 575 | 3.328125 | 3 | [] | no_license | #!/bin/sh
# Usage: code-htmlize <language>
#
# Uses vim to produce html markup of colorized source.
#
# Uses perl to do some horrible chopping to make it convenient for me.
CODELANG=$1
vi - \
"+set ft=$CODELANG" \
'+let g:html_use_css = 0' \
+TOhtml \
'+w! /tmp/code-htmlize-out.html' \
'+%s/\ / /g' \
... | true |
3aa1a3fa8deac3d4dbdb44282b04bf2081b30411 | Shell | ecmwf/eccodes | /examples/F90/grib_index.sh | UTF-8 | 762 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | #!/bin/sh
# (C) Copyright 2005- ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
# virtue of its status as an int... | true |
71509ef88308396e987e055c39f6624d2b8d2d48 | Shell | smartcommunitylab/cloud-asr | /swarm-file/workerclean.sh | UTF-8 | 525 | 3.265625 | 3 | [
"Apache-2.0"
] | permissive | #!/bin/bash
cd swarm-file
VMLIST=( $(az vm list --query "[].name" -o tsv) )
regex="(worker-)([a-z-]+)"
for VM in "${VMLIST[@]}"
do
if [[ $VM =~ $regex ]]
then
vmfile="$VM.yaml"
echo "check if file exist"
found="0"
files="*.yaml"
for f in $files
do
if [ "$f" == "$vmfile" ] ; then
... | true |
6362334a0af0ec09ae4adf4f7a2fed90a221689c | Shell | abhi15sep/AWS_Security-Final | /1/dev-sec-ops/remove-unused-security-groups/test_data/create_dummy_sgs.sh | UTF-8 | 284 | 2.984375 | 3 | [] | no_license | #!/bin/bash
set -ex
vpc_to_spam="vpc-b33cafc9a"
for i in {1..3}
do
val="${RANDOM}"
aws ec2 create-security-group \
--vpc-id "${vpc_to_spam}" \
--group-name "sg_group_name_${val}" \
--description "My security group_${val}"
done
| true |
11fd449382e3dd00a2a24f31c354493653ae3f6e | Shell | yongfengdu/space-tool | /createvm/del-bridge.sh | UTF-8 | 298 | 3.15625 | 3 | [] | no_license |
NIC=${1:-eno1}
IP_ADDR=`ip addr show space-br0 |grep "inet "|awk '{print $2}'`
#IP_ADDR=`ip addr show $NIC |grep "inet "|cut -d/ -f1 |awk '{print $2}'`
echo $NIC $IP_ADDR
ip link show space-br0
if [ $? -eq 0 ];then
sudo ip link del dev space-br0
sudo ip address add $IP_ADDR dev $NIC
fi
| true |
29fb4869b8506432443f6f34f3a780e544685b0e | Shell | joaobcfracassi/Desec-Tools | /dns_zone.sh | UTF-8 | 127 | 2.6875 | 3 | [] | no_license | #!/bin/bash
HOSTS=$(host -t ns businesscorp.com.br)
for SERVERS in $HOSTS;
do
host -l -a businesscorp.com.br $SERVERS;
done
| true |
a319245ef7f76a1f414fca8bf9b844ed8214c958 | Shell | kiemlicz/util | /core/kernel/kernel_functions | UTF-8 | 364 | 2.984375 | 3 | [] | no_license | #!/usr/bin/env bash
prepare_to_configure() {
pushd /usr/src/linux
make clean && make mrproper
popd
}
use_current_config() {
cp /boot/config-$(uname -r) /usr/src/linux/.config
}
# $1 version info to append e.g. -myversion
compile_kernel() {
make-kpkg clean
fakeroot make-kpkg --initrd --append-... | true |
da256313fc6cbb3a4eea7de4f8461302d717bb4b | Shell | KdInteractive/Kurio_Lib_v4 | /getVersionName.sh | UTF-8 | 375 | 3.359375 | 3 | [] | no_license | #!/bin/bash
VERSIONNAME="4.0"
COMMITNUM=`git log --pretty=format:'' | wc -l | tr -d ' '`
logger "Build version: $VERSIONNAME.${COMMITNUM}-${BUILD_NUMBER}"
versionCode=`./getVersionCode.sh`
brand=$(./getBuilding.sh)
if [ "${BUILD_NUMBER}" == "" ]; then
echo $VERSIONNAME.${versionCode}_$brand\#debug
else
echo $... | true |
0cea4018f0fb0decddb33e111d0d966698201ff6 | Shell | jucastil/docker-leginon | /start-sbleginon.sh | UTF-8 | 450 | 2.921875 | 3 | [] | no_license | #!/bin/bash
EXPECTED_ARGS=3
if [[ $# -ne $EXPECTED_ARGS ]]; then
echo "";
echo " USAGE: ./start-sbleginon.sh NAME HOSTNANE IP";
echo "";
exit 0
fi
NAME=$1
HOSTNAME=$2
IP=$3
docker run --name $NAME \
--hostname=$HOSTNAME \
-d -p $IP:80:80 \
-p $IP:443:443 \
-p $IP:2222:22 \
-p $IP:3306:3306 \
-v `pwd`/e... | true |
f9893a5c082519b5d96070d9956a3b79cb3206e6 | Shell | int128/terraform-aws-nat-instance | /snat.sh | UTF-8 | 566 | 3 | 3 | [
"Apache-2.0"
] | permissive | #!/bin/bash
set -x
# wait for eth1
while ! ip link show dev eth1; do
sleep 1
done
# enable IP forwarding and NAT
sysctl -q -w net.ipv4.ip_forward=1
sysctl -q -w net.ipv4.conf.eth1.send_redirects=0
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
# prevent setting the default route to eth0 after reboot
rm -f /e... | true |
78f217e3d95270f9bca18eee06fef9812a24226f | Shell | daidk/unix-wb | /guessinggame.sh | UTF-8 | 786 | 4.09375 | 4 | [] | no_license | #!/usr/bin/env bash
function guess_file_number_func(){
correct_file_number=$(ls -l | wc -l)
x=3
while [[ $x -gt 1 ]]
do
echo "Please guess how many files are in the current directory"
read guess_file_number
echo "You entered: $guess_file_number"
integ='^[0-9]+$'
if ! [[ $guess_file_number =~ $integ ]] ... | true |
7f0810ed716400dc8e40d6afe50e001ae5f1f992 | Shell | zalando-incubator/autoscaler | /cluster-autoscaler/hack/update-vendor.sh | UTF-8 | 7,420 | 3.8125 | 4 | [
"Apache-2.0"
] | permissive | #env /usr/bin/bash
set -o errexit
set -o pipefail
set -o nounset
shopt -s lastpipe
if [[ $(basename $(pwd)) != "cluster-autoscaler" ]];then
echo "The script must be run in cluster-autoscaler directory"
exit 1
fi
if ! which jq > /dev/null; then
echo "This script requires jq command to be available"
exit 1
fi
... | true |
5a84826a554a8e92fdf4183c68b418d6c5659085 | Shell | charanchowdary7/DBbackup | /backup2.sh | UTF-8 | 516 | 3.65625 | 4 | [] | no_license | #!/bin/bash
#Add details userid&pwd
DATE=$(date +%d-%m-%y)
BACKUP_DIR="/backup/test-backup"
USER_ID="root"
PASSWD="redhat"
MYSQL="/usr/bin/mysql"
MYSQLDUMP="/usr/bin/mysqldump"
mkdir -p $BACKUP_DIR/$DATE
#Get list of databases
databases=`$MYSQL -u$USER_ID -p$PASSWD -e "SHOW DATABASES;" | grep -Ev "(Database|informat... | true |
7e8da173e63c8813ada88431424374ae86605203 | Shell | datascience/c3po | /scripts/chlog.sh | UTF-8 | 545 | 3.609375 | 4 | [
"Apache-2.0"
] | permissive | #!/bin/bash
PREV=$1
CURR=$2
FILE=$3
if [ -z "$PREV" ] || [ -z "$CURR" ]; then
echo "Please provide the two tags for the changelog"
exit 1
fi
if [ -z "$FILE" ]; then
echo "Please provide a file to write to"
exit 1
fi
if [ ! -f $FILE ]; then
touch "$FILE"
fi
git log $PREV..$CURR --pretty=format:'<li>%s &bul... | true |
4faf05e3a4ada1b584a754387e078a07fc8c15bd | Shell | ignitz/hashistack | /hashistack/database/mock/user_data/02-consul.sh | UTF-8 | 623 | 2.75 | 3 | [] | no_license | # The cluster_tag variables below are filled in via Terraform interpolation
/opt/consul/bin/run-consul --client --cluster-tag-key "${consul_cluster_tag_key}" --cluster-tag-value "${consul_cluster_tag_value}"
mkdir -pv /home/ubuntu/postgres/consul
cat > /home/ubuntu/postgres/consul/register.json <<'EOL'
{
"service":... | true |
fad602c9f657b42ad58b19c5298140ee572d1097 | Shell | pierreozoux/packer-warehouse | /scripts/common/zerodisk.sh | UTF-8 | 239 | 2.65625 | 3 | [
"Beerware"
] | permissive | #!/bin/bash -eux
# fill all free hdd space with zeros
# true is added in case there is already "No space left on device"
dd if=/dev/zero of=/boot/EMPTY bs=1M || true
rm -f /boot/EMPTY
dd if=/dev/zero of=/EMPTY bs=1M || true
rm -f /EMPTY
| true |
5a2050910b10b2bde2b2fd24b86c87dabd04e58f | Shell | jubnzv/dotfiles | /.config/polybar/mouse-battery.sh | UTF-8 | 216 | 2.71875 | 3 | [] | no_license | #!/usr/bin/env bash
p="$(upower -i /org/freedesktop/UPower/devices/mouse_hidpp_battery_0 | grep percentage | awk '{print $2}' | cut -d '%' -f 1)"
if [[ "$(( $p ))" -ne 0 && "$(( $p ))" -lt 33 ]]; then
echo $p
fi
| true |
18eba03694b5c71ff0d52fcfa79e2534f47f5b4d | Shell | skylarthompson/pi2018-shell-programming-skylar | /hints/3-wsrid_lines_join.sh | UTF-8 | 1,162 | 3.71875 | 4 | [] | no_license | #!/usr/bin/env bash
# Accepts as input a hail dataset sorted on WSR_ID. Each argument to wsrid_lines will be a
# weather surveillance radar ID (WSR_ID). Outputs all lines matching the given WSR_IDs.
# Example usage: aprun -q -n 1 -d 1 -N 1 ./3-wsrid_lines_join.sh KDEN KBOS KGLD KCXX KCMH < ~/scratch/pi2018-shell-prog... | true |
f30775ee56e31e1ccd2f0fd0721dd5c47ced9996 | Shell | MrRachelWong/jenkins | /config/modules/job | UTF-8 | 528 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | #! /bin/bash
NAMESPACE=$app_prj
APP_NAME="${CNES}_$app_sub"
WEB_ROOT="$GFS_FILES_DIR/$app_prj/$app_env/$ENVIRONMENT_ID/$APP_NAME"
TEMPLATE="/data/dockerfiles/$app_prj/$app_env/$APP_SUB"
JobActionController(){
load base
load file
load check
load ssh
load docker
load kubectl
POD_CONFIG="... | true |
9d264a2882c5ad9d23b2112088e99f315d6dbbe7 | Shell | jtlap/nt2 | /script/bash/generate_bar_chart.sh | UTF-8 | 4,650 | 2.734375 | 3 | [
"BSL-1.0"
] | permissive | nb_data_types=$1
NUM_TEST=$2
nb_sizes=$3
LEGEND=$4
TITLE=$5
PLOT_NAME=$6
kk=$7
i=0
filename="create_plot${kk}.m"
count=0
for ((jj=0;jj<${NUM_TEST};jj++));do
for ((ll=1;ll<=${nb_sizes};ll++));do
((pos=${jj}*${nb_sizes}*${nb_data_types}+${ll}+${kk}*${nb_sizes}))
SIZE[count]=$(sed -n ${pos}p res.txt | tr "(" "\... | true |
013cfcc4914804db170d646d39139dcfe6164fca | Shell | untimtam/dotfiles | /os/ubuntu/tools/apt.sh | UTF-8 | 2,244 | 3.984375 | 4 | [
"MIT"
] | permissive | #!/usr/bin/env bash
#
# Install apt tools
# -----------------------------------------------------------------------------
# | Errors |
# -----------------------------------------------------------------------------
declare -r E_APT_FAILURE=101
# ---... | true |
11cf05249acb4baa3db55c77d0978ff6936ae595 | Shell | Britaliope/docker_vsftpd | /addVirtualUser.sh | UTF-8 | 576 | 3.515625 | 4 | [
"MIT"
] | permissive | #!/bin/bash
echo 'adduser script for vsftpd'
echo -n 'Enter username : '
read user
echo -n 'Enter password : '
read -s password
echo ''
echo -n 'Confirm password : '
read -s passwordBis
echo ''
if [ "$password" = "$passwordBis" ]; then
echo "${user}:$(openssl passwd -1 {password})" >> /conf/vsftpd/virtual_users ... | true |
9ce9836ec16a83a9c2b90008164400adbb2ddfb2 | Shell | FauxFaux/debian-control | /d/diaspora-installer/diaspora-installer_0.7.4.0+nmu1_all/preinst | UTF-8 | 1,204 | 3.578125 | 4 | [] | no_license | #! /bin/sh
set -e
diaspora_home=/usr/share/diaspora
# Keep it in sync with postrm
diaspora_symlinks_list="Gemfile.lock log tmp public app/assets bin/bundle vendor/bundle config/database.yml config/diaspora.yml config/oidc_key.pem"
# Fix bin symlink set by earlier versions
if test -L ${diaspora_home}/bin
then
rm ... | true |
966bb4221964d8e3cd9e860758688e9120138cf7 | Shell | eliashoffmann/lsqb | /hyp/build.sh | UTF-8 | 182 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | #!/bin/bash
set -eu
set -o pipefail
cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
. vars.sh
cd hyper-binaries
docker build . --tag ${HYPER_DOCKER_IMAGE}
| true |
299b1826ed2a9f1afa4178633a94a49e2e525205 | Shell | OurROM/.scripts | /build.sh | UTF-8 | 2,626 | 3.03125 | 3 | [] | no_license | #!/bin/bash
export USE_CCACHE=1 && export CCACHE_DIR=/home/thebytesmasher/.ccache && ~/aokp_kk/prebuilts/misc/linux-x86/ccache/ccache -M 30G
cd ~/aokp_kk/.scripts
date +"%r" | cut -d':' -f1,2 | cat > md5s.txt
for i in $*;
do
params="$params $i"
done
startBuildTimeAll=$(date +%r)
if [[ ! "$params" == *--noinc* ]];... | true |
491ecf2987a71cc3f2ccda04d835cb0d3963df4c | Shell | benbendaisy/CommunicationCodes | /JavaModule/src/main/java/com/example/bash/TenthLine.sh | UTF-8 | 541 | 4.0625 | 4 | [] | no_license | #How would you print just the 10th line of a file?
#
#For example, assume that file.txt has the following content:
#
#Line 1
#Line 2
#Line 3
#Line 4
#Line 5
#Line 6
#Line 7
#Line 8
#Line 9
#Line 10
#Your script should output the tenth line, which is:
#Line 10
# Read from the file file.txt and output the tenth line to... | true |
2ee1dfd1666c76d4a75cdf5a6e91f28ddeafb941 | Shell | olivia-dinica/PCDTBTplotgen | /hexVScex_spread.sh | UTF-8 | 1,771 | 3.09375 | 3 | [] | no_license | ##############################################################################################################################
# will measure spread of electron and hole of 1st occupied exciton for both mid-carb and mid-bt
#
#
###########################################################################################... | true |
fd1287d586b93b2bd4f7e7f00001d9ceae089fa0 | Shell | netzgut/ubuntu-setup | /scripts/android-studio.sh | UTF-8 | 1,758 | 3.59375 | 4 | [
"MIT"
] | permissive | #!/usr/bin/env bash
set -e
MARKER=$(basename "${BASH_SOURCE%.*}")
###############################################################################
# Android Studio 3.6
###############################################################################
# URL: https://developer.android.com/studio/index.html#downloads
#####... | true |
3671e4e25417019f075f8290dd2bd9f86bcdb7e0 | Shell | unmk2/server5 | /bin/rc.firewall_novo | ISO-8859-1 | 2,208 | 3.21875 | 3 | [] | no_license | #!/bin/bash
### Define as variaveis
IPT=/sbin/iptables
IPCLIENTE='/var/www/server/bin/firewall-ips'
IFACENET=eth3
#### Ativa o roteamento
echo "1" > /proc/sys/net/ipv4/ip_forward
#### Limpa as regras
$IPT -F
$IPT -X
$IPT -Z
$IPT -F -t nat
$IPT -X -t nat
$IPT -Z -t nat
#### Define a politica padrao
$IPT -P INPUT ACC... | true |
e68abd7e1d8862fa31dc379c7ad7493e74dfb3fa | Shell | eduardofcgo/gago-os | /entrypoint.sh | UTF-8 | 391 | 3.4375 | 3 | [] | no_license | #!/bin/bash
stop() {
echo "Received SIGINT or SIGTERM. Will shut down $DAEMON"
pid=$(cat /var/run/sshd/sshd.pid)
kill -SIGTERM "${pid}"
wait "${pid}"
}
/scripts/setup_users.sh
echo "Starting sshd"
trap stop SIGINT SIGTERM
/usr/sbin/sshd -D -e & pid="$!"
echo "${pid}" > /var/run/sshd/sshd.pid
wait "${pi... | true |
9dcab32b6641bf02e1a776bd6904b6fafa4bc971 | Shell | dongAxis/yarpgen | /check_format.sh | UTF-8 | 1,934 | 4.0625 | 4 | [
"Apache-2.0",
"BSL-1.0"
] | permissive | #!/bin/bash
###############################################################################
#
# Copyright (c) 2018-2020, Intel Corporation
# Copyright (c) 2019-2020, University of Utah
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
... | true |
ee8a05a43129b8cd7b4077ea550abfa8c73727ad | Shell | vzaicev/bash | /2022/03_anastasia_borisenok/lab3/lab03_z3.sh | UTF-8 | 381 | 2.875 | 3 | [] | no_license | #!/bin/bash
if [ -n "$1" ] && [ "$1" == "-task" ];
then
echo "Задание"
echo "3. Десятерное пространство между каждой 2-ой строкой"
echo
echo
fi
sed '/^$/n;G' file.txt # выполнила только для двойного пространства, поскольку не знаю, как будет десятерное
| true |
85e0aabecc9430ae85081d7e958bf46714633c56 | Shell | fgolemo/mcdp | /web/demo.co-design.science/status.sh | UTF-8 | 253 | 2.703125 | 3 | [] | no_license | echo `date`
dir=`dirname $0`
out=${dir}/status.png
tmp=${dir}/status.tmp.png
wget -O${tmp} "https://api.browshot.com/api/v1/simple?key=OGJL7hwDXO47n2LOWRnBZHyaG2p&url=http%3A//status.co-design.science&size=page"
mv ${tmp} ${out}
echo `date` > ${dir}/status.timestamp.txt
| true |
06233d582903dd8cb1f0ec27dcb870f07bfd45a1 | Shell | cgirard-mir/doom | /ipxserver/run.sh | UTF-8 | 278 | 3.21875 | 3 | [] | no_license | #!/usr/bin/env bash
echo "Searching for Docker image ..."
DOCKER_IMAGE_ID=$(docker images --format="{{.ID}}" ipxserver:latest | head -n 1)
echo "Found and using ${DOCKER_IMAGE_ID}"
USER_UID=$(id -u)
docker run -it -p 6080:6080 \
-h ipxserver \
${DOCKER_IMAGE_ID} \
${@}
| true |
e181b6a2acdc16238ffc858e4fd5c77052d48c37 | Shell | jcstr/arch4edu | /devtools-qemu/PKGBUILD | UTF-8 | 1,163 | 2.765625 | 3 | [] | no_license | pkgname=devtools-qemu
pkgver=6.ee39808
pkgrel=1
pkgdesc='QEMU based cross-build tools for Arch Linux ARM package maintainers'
arch=('x86_64')
url='http://github.com/petronny/devtools-qemu'
license=('GPL')
depends=('archlinuxarm-keyring' 'binfmt-qemu-static' 'devtools-alarm' 'qemu-user-static-bin')
makedepends=('git')
s... | true |
4ba53f822bdc96a65652870158a3cedbb4c28cc9 | Shell | hmag/docker | /hmmpd/Build/Build.sh | UTF-8 | 1,058 | 3.640625 | 4 | [] | no_license | #!/bin/bash
ISARM=`arch | grep arm | wc -l`
ISMPD=`grep mpd /etc/passwd | wc -l`
ARCH="amd64"
if [ $ISARM -eq 1 ]; then
ARCH="armhf"
fi
if [ $ISMPD -eq 0 ]; then
echo "le user mpd n'existe pas sur le system hote"
exit 1
fi
MPDUID=`grep mpd /etc/passwd | awk -v FS=":" '{print $3}'`
AUDIOGID=`grep mpd /etc/pass... | true |
5106d68cce0c5de191667d5f2269813203d72bc8 | Shell | chef/chef-workstation | /omnibus/package-scripts/chef-workstation/preinst | UTF-8 | 687 | 3.984375 | 4 | [
"Apache-2.0"
] | permissive | #!/bin/sh
#
# Perform necessary steps to remove dk
# before package is installed.
#
PROGNAME=`basename $0`
error_exit()
{
echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2
exit 1
}
is_darwin()
{
uname -a | grep "^Darwin" 2>&1 >/dev/null
}
if is_darwin; then
pkgId='com.getchef.pkg.chefdk'
echo "Checking f... | true |
4079af423b8d0d5adc007caedcfa924e0a4a6df0 | Shell | deemhristov/Summarisation | /scripts/co-getid-new.sh | UTF-8 | 439 | 3.34375 | 3 | [] | no_license | #!/bin/bash
FILE=$(readlink -f "$1")
BASE=$(basename "$FILE")
RID="L?[0-9]{8}[a-z][A-Z]{3}"
RBGTXT="^($RID)-bg\.txt$"
RBGSEN="^($RID)-bg-sen\.txt$"
RBGCLA="^($RID)-bg-cla\.txt$"
TYPE="unknown"
ID="UNKNOWN"
if [[ $BASE =~ $RBGTXT ]]; then TYPE="bg-txt"; ID=${BASH_REMATCH[1]}; fi
if [[ $BASE =~ $RBGSEN ]]; then TYPE=... | true |
3c7c807b9c086ebafea5d40e8dfd3dcef544ff01 | Shell | john-heinnickel/citadel-search | /scripts/pipenv/populate-instance.sh | UTF-8 | 536 | 2.515625 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env bash
# -*- coding: utf-8 -*-
#
# This file is part of CERN Search.
# Copyright (C) 2018-2021 CERN.
#
# Citadel Search is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
readonly SYS_PREFIX=$(python -c "import sys; print(sys... | true |
46afb4a87e8ff697949ea2273c57f262e13626c6 | Shell | extinction057/AIM_HUST_TEST | /run.sh | UTF-8 | 602 | 3.234375 | 3 | [] | no_license | #!/bin/bash
sec=1
cnt=0
name=armorDetector
root=$(pwd)
Thread=`ps -ef | grep $name | grep -v "grep"`
cd root/build
make clean && make -j8
while [ 1 ]
do
count=`ps -ef | grep $name | grep -v "grep" | wc -l`
echo "Thread count: $count"
echo "Expection count: $cnt"
if [ $count -gt 1 ]; then
echo "The $name is still aliv... | true |
a7b6bebec57bd07917765b964966f0ca4c43e75a | Shell | openbsd/src | /regress/sys/ffs/tests/link/13.t | UTF-8 | 1,023 | 2.859375 | 3 | [
"BSD-2-Clause"
] | permissive | #!/bin/sh
# $FreeBSD: src/tools/regression/fstest/tests/link/13.t,v 1.1 2007/01/17 01:42:09 pjd Exp $
desc="link returns EPERM if the parent directory of the destination file has its immutable flag set"
n0=`namegen`
n1=`namegen`
n2=`namegen`
expect 0 mkdir ${n0} 0755
expect 0 create ${n0}/${n1} 0644
expect 0 link $... | true |
5c585ddbe12710fb239f986e9a78c25bc315eec1 | Shell | pierre-pvln/compose-on_host | /stacks/lvl0/baseline/settings/level.sh | UTF-8 | 179 | 2.734375 | 3 | [] | no_license | #!/bin/bash
MY_START_FOLDER="$PWD"
cd ../..
export MY_LEVEL="${PWD##*/}"
cd "$MY_START_FOLDER"
echo "==============="
echo "Integrationlevel:" $MY_LEVEL
echo "==============="
| true |
d495862f92b90618350d4f5866332ed160b25b03 | Shell | anurag6892/charging-stations | /station-locs-csv.sh | UTF-8 | 273 | 2.84375 | 3 | [] | no_license | #!/bin/bash
FILE=$(ls -Art logs | grep station-locations | tail -n 1)
echo "${FILE}"
cp logs/${FILE} .
sed 's/ : /,/g' ${FILE} > tmp
mv tmp ${FILE}
sed 's/:/,/g' ${FILE} > tmp
mv tmp ${FILE}
cp ${FILE} ~/Dropbox\ \(Personal\)/Public/station-locations-latest.csv
rm ${FILE}
| true |
2de31962a389bf1aadf09ea7a0fd2ec2659c0cac | Shell | c-bata/bin | /filter/bin/deleted_branch | UTF-8 | 487 | 3.59375 | 4 | [
"MIT",
"LGPL-2.1-or-later"
] | permissive | #!/bin/sh
set -e
pattern=$1
if [ -z "$GITHUB_EVENT_PATH" ]; then
echo "\$GITHUB_EVENT_PATH" not found
exit 1
fi
DELETE_EVENT_REF_TYPE=$(jq --raw-output .ref_type "$GITHUB_EVENT_PATH")
if [ "$DELETE_EVENT_REF_TYPE" != "branch" ]; then
echo "ref_type is not branch: ${DELETE_EVENT_REF_TYPE}"
exit 1
fi
DELETE_... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.