If you want to process just the files under A/
, then a simple for
loop should be enough:
for file in A/*.dat; do ./a.out < "$file" > "${file%.dat}.ans"; done
# Optimize PNG files with pngcrush | |
find . -type f -iname "*.png" -exec pngcrush -ow {} \; | |
# Optimize JPG & JPEG files with ImageMagick following this recommendations: https://dev.to/feldroy/til-strategies-for-compressing-jpg-files-with-imagemagick-5fn9 | |
find . -type f -iname "*.jpg" -exec convert {} -sampling-factor 4:2:0 -strip -quality 85 -interlace Plane -gaussian-blur 0.05 -colorspace RGB {} \; | |
find . -type f -iname "*.jpeg" -exec convert {} -sampling-factor 4:2:0 -strip -quality 85 -interlace Plane -gaussian-blur 0.05 -colorspace RGB {} \; | |
# Optimize SVG images using SVGO | |
find . -type f -iname "*.svg" -exec svgo -i {} \; |
If you want to process just the files under A/
, then a simple for
loop should be enough:
for file in A/*.dat; do ./a.out < "$file" > "${file%.dat}.ans"; done
#!/usr/bin/env bash | |
#shellcheck disable=SC2116 | |
TILLER_NS=$( kubectl get pods --all-namespaces --selector name=tiller --output custom-columns=:.metadata.namespace | grep -v ^$ ) | |
export TILLER_NS | |
for ns in $( echo "$TILLER_NS" ) | |
do | |
helm ls --tiller-namespace "$ns" \ | |
| cut -f1 \ |
# Source: https://serverfault.com/questions/228170/export-and-import-a-postgresql-database-with-a-different-name | |
pg_dump --no-owner --no-acl blah > blah.psql | |
psql blah_devel < blah.psql > /dev/null |
module "eks" { | |
source = "terraform-aws-modules/eks/aws" | |
cluster_name = "${var.cluster_name}" | |
subnets = "${module.vpc.private_subnets}" | |
vpc_id = "${module.vpc.vpc_id}" | |
} |
module "vpc" { | |
source = "terraform-aws-modules/vpc/aws" | |
name = "${var.vpc_name}" | |
cidr = "${var.vpc_cidr}" | |
azs = "${var.azs}" | |
private_subnets = "${var.priv_subnets_cidrs}" | |
public_subnets = "${var.pub_subnets_cidrs}" |
#!/usr/bin/env bash | |
set -euo pipefail | |
IFS=$'\n\t' |
--- | |
kind: RoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
name: deployer-binding | |
namespace: ${NAMESPACE} | |
subjects: | |
- kind: Group | |
name: deploys | |
namespace: ${NAMESPACE} |
grep -E -v "^\s*(#|$)" ${FILENAME} |
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git branch --unset-upstream new_branch # Unset the tracking info, so it doesn't push with the old name | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |