Prints an horizontal line taking the whole terminal length (no auto resize)
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' _
input=$1 | |
result="${input/find/replacement}" |
# List common lines in $1 and $2 | |
function common { | |
comm --check-order -12 $1 $2 | |
} | |
# List lines only present in $1 | |
function onlyina { | |
comm --check-order -3 $1 $2 | sed '/\t/d' | |
} |
function parallel_function { | |
# something | |
} | |
max_parallel_jobs=4 | |
while true | |
do | |
parallel_function & | |
((start_date=start_date+1)) | |
while [ $(jobs | wc -l) -ge $max_parallel_jobs ] ; do sleep 1 ; done |
find . -type f -exec awk 'END { if (NR > 1) print FILENAME }' {} \; |
Prints an horizontal line taking the whole terminal length (no auto resize)
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' _
for (i = 0; i < sources.length; i++){
String source = sources[i]
String contrib_url = source.split(" ")[0]
String contrib_tag = source.split(" ")[1]
String contrib_dest_path = i.toString().padLeft(4,'0') + "__" + contrib_url.split('/').last() + "__" + contrib_tag
builders[contrib_dest_path] = {
echo "\u2600 Pulling [${contrib_url}] using tag [${contrib_tag}] to [${contrib_dest_path}]"
checkout([$class: 'GitSCM', branches: [[name: "refs/tags/"+contrib_tag]], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: contrib_dest_path]], submoduleCfg: [], userRemoteConfigs: [[credentialsId: credentials, url: contrib_url]]])
}
# Remove a block beginning with $1, ending with $2 if it contains $3, in file $4 | |
# $1 and $2 are sed regexp escaped surrounded with '/' | |
# Example: remove_block_if_pattern_found '/\/\*/' '/\*\//' '@license' $f | |
function remove_block_if_pattern_found { | |
start=$1 | |
end=$2 | |
pattern=$3 | |
file=$4 | |
# Considering everything above "package ...;" as header |
# Your fingerprint | |
gpgKey=0x1234123123123 | |
# Export the full backup to store somewhere | |
gpg --export-secret-keys --armor ${gpgKey} > ${gpgKey}.full_backup.asc | |
# Export partial backup with only your subkeys | |
gpg --export-secret-subkeys --armor ${gpgKey} > ${gpgKey}.only_subkeys.asc | |
# Erase your .gnupg |
calendar.google.sendEventNotifications = false
, calendar.google.enableAttendees = false
and calendar.google.enableEmailInvitations = false
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account. | |
Token for proof: | |
[Verifying my OpenPGP key: openpgp4fpr:65b4874cef9335afb7dfd21215dbc405801c44e0] |