This script is modeled after tee
(see [man tee
][2]).
It's like your normal copy and paste commands, but unified and able to sense when you want it to be chainable
#!/bin/bash | |
## https://github.com/Tojaj/librepo/issues/16 | |
#set -e # Fail on error | |
echo "Sanity check" | |
echo "Testing if directory '$1' exists" | |
test -e $1 || exit 1 |
#!/usr/bin/env bash | |
# Licensed by author Alex Birch under CC BY-SA 4.0 | |
# https://creativecommons.org/licenses/by-sa/4.0/ | |
# detects whether any of your passwords have been exposed in a data breach, by | |
# submitting (prefixes of hashes of) all your passwords to Troy Hunt's | |
# Pwned Passwords API. | |
# https://haveibeenpwned.com/Passwords |
#!/bin/bash | |
# exit when the command fails | |
set -o errexit; | |
# exit when try to use undeclared var | |
set -o nounset; | |
accessKeyToSearch=${1?"Usage: bash $0 AccessKeyId"} |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python | |
import hashlib | |
import optparse | |
import paramiko | |
from Crypto.PublicKey import RSA | |
def insert_char_every_n_chars(string, char='\n', every=64): | |
return char.join( |
#!/bin/bash | |
TEMP=`getopt -o ro:lLdvtRsS: --long refresh,output:,list-packages,list-repos,download,verbose,trim-repos,refresh-cache,skip-repos,settings-dir: -n 'rpm-backup' -- "$@"` | |
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi | |
# Note the quotes around `$TEMP': they are essential! | |
eval set -- "$TEMP" | |
REFRESH=false | |
LREPOS=false |
#!/bin/bash | |
set -eu | |
shopt -s nullglob | |
readonly base_dir=/var/local/docker-registry | |
readonly output_dir=$(mktemp -d -t trace-images-XXXX) | |
readonly jq=/tmp/jq | |
readonly repository_dir=$base_dir/repositories |
#!/bin/bash | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |
FROM node:7.8-alpine | |
LABEL maintainer "Mark Niehe<mark@niehe.ca>" | |
# Install all build dependencies | |
# Add bash for debugging purposes | |
RUN apk update \ | |
&& apk add --virtual build-dependencies \ | |
build-base \ | |
gcc \ | |
wget \ |