This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| #/pdf-bulk-merge.sh.sh <INPUT_PATTERN e.g. in_%d.pdf> <OUTPUT_PATTERN e.g. out_%d.pdf> <PAGES> <JOBS e.g. $(ls -la INPUT_PATTERN* | wc -l) | |
| INPUT_PATTERN=$1 | |
| OUTPUT_PATTERN=$2 | |
| PAGES=$3 | |
| JOBS=$4 | |
| echo -e "Starting to work on\ninputPattern\t${INPUT_PATTERN}\npages\t${PAGES}\njobs\t${JOBS}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://stackoverflow.com/questions/3936373/how-to-cut-out-and-save-a-rectangle-from-an-image | |
| http://stackoverflow.com/questions/18189314/convert-a-pdf-file-to-image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| log4j.rootLogger=DEBUG, stdout, RollingFile | |
| # Redirect log messages to console | |
| log4j.appender.stdout=org.apache.log4j.ConsoleAppender | |
| log4j.appender.stdout.Target=System.out | |
| log4j.appender.stdout.layout=org.apache.log4j.PatternLayout | |
| log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n | |
| # Define the file appender | |
| log4j.appender.FILE=org.apache.log4j.FileAppender |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RedirectMatch 404 (?i)\.git | |
| RedirectMatch 404 (?i)\.svn | |
| RedirectMatch 404 (?i)/\..+ | |
| RedirectMatch 404 (?i)\_.+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| #title : lambda-publish-npm.sh | |
| #description : For npm projects! Convenience script to build, pack and upload code to an AWS Lambda function, using the AWS CLI. For personal and experimental use only! | |
| #author : Christian-André Giehl <christian@emailbrief.de> | |
| #date : 20170410 | |
| #version : 1.1 | |
| #usage : sh lambda-publish-npm.sh | |
| #============================================================================== | |
| # Exits in case the supplied state is != 0. State is typically supplied via $? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| msg=$(echo $(git log -1 --pretty=%B)) | |
| lbl=$(echo $(git log -1 --format='%H')) | |
| echo "--- Deploying to EB ---" | |
| echo "Message: " $msg | |
| echo "Label: " $lbl | |
| read -p "-----> DO YOU WANT TO DEPLOY? [Yy]es " -n 1 -r | |
| if ! [[ $REPLY =~ ^[Yy]$ ]] | |
| then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| #title : eb-publish-gradle.sh | |
| #description : For gradle projects! Convenience script to build, pack and upload code to an AWS ElasticBeanstalk environment, using the AWS CLI 'eb' command. For personal and experimental use only! | |
| #prerequisites : AWS CLI with 'eb' cmd, Procfile, gradle project, .elasticbeanstalk/config.yml | |
| #author : Christian-André Giehl <christian@emailbrief.de> | |
| #date : 20170410 | |
| #version : 1.1 | |
| #usage : sh eb-publish-gradle.sh | |
| #============================================================================== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if [ -f ~/.bashrc ]; then | |
| source ~/.bashrc | |
| fi | |
| export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ " | |
| export CLICOLOR=1 | |
| export LSCOLORS=ExFxBxDxCxegedabagacad | |
| export AWS_PROFILE=internal-user | |
| alias ls='ls -GFh' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| #title : lambda-publish.sh | |
| #description : For gradle or mvn projects! Convenience script to build, pack and upload code to an AWS Lambda function, using the AWS CLI. For personal and experimental use only! | |
| #author : Christian-André Giehl <christian@emailbrief.de> | |
| #date : 20170410 | |
| #version : 1.1 | |
| #usage : sh lambda-publish.sh | |
| #============================================================================== | |
| # Exits in case the supplied state is != 0. State is typically supplied via $? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| #title : setup-cloudwatch.sh | |
| #description : Creates cloudwatch log filter, metric and alarm | |
| #author : Christian-André Giehl <christian@emailbrief.de> | |
| #date : 20190718 | |
| #version : 1.1 | |
| #usage : sh setup-cloudwatch.sh <keyword-list> <lambda-function-name> | |
| #============================================================================== | |
| # Exits in case the supplied state is != 0. State is typically supplied via $? |
OlderNewer