Skip to content

Instantly share code, notes, and snippets.

giehlman

Block or report user

Report or block giehlman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View bb-pipelines-builder-nodejs.sh
#!/usr/bin/env sh
#title : bb-pipelines-builder-nodejs.sh
#description : For npm/yarn projects! Convenience script to build, check and pack fat artifacts. For personal and experimental use only!
#author : Christian-André Giehl <christian@emailbrief.de>
#date : 20190816
#version : 1.0
#usage : sh bb-pipelines-builder-nodejs.sh <intermediateTgzName> <finalZipName>
#==============================================================================
PROJECT_NAME=${1}
@giehlman
giehlman / setup-cloudwatch.sh
Last active Jul 18, 2019
Creates cloudwatch log filter, metric and alarm
View setup-cloudwatch.sh
#!/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 $?
View bb-pipelines-builder.sh
#!/usr/bin/env bash
#title : bb-pipelines-builder.sh
#description : For gradle or mvn projects! Convenience script to build, check and pack fat artifacts. For personal and experimental use only!
#author : Christian-André Giehl <christian@emailbrief.de>
#date : 20190720
#version : 2.2
#usage : sh bb-pipelines-builder.sh
#==============================================================================
# Exits in case the supplied state is != 0. State is typically supplied via $?
@giehlman
giehlman / updateSonarProps.sh
Created Feb 20, 2018
Update SonarQube properties file with project name and version from package.json
View updateSonarProps.sh
#!/usr/bin/env bash
#title : updateSonarProps.sh
#description :
# This script parses the project's name and version from its package.json and automagically
# updates the version and package name in the SonarQube configuration properties file.
# It can be used as a pre step before running the sonar-scanner command
# It also creates a backup of the props file with suffix *.bak
#prerequisites : NodeJS based project with package.json, sonar*.properties file in the cwd
#author : Christian-André Giehl <christian@emailbrief.de>
#date : 20180220
@giehlman
giehlman / updateVersionInSwagger.sh
Last active Feb 1, 2018
Takes the version in package.json and seds it in swagger.yaml
View updateVersionInSwagger.sh
# Get the version from package.json
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g' \
| tr -d '[[:space:]]')
echo "Extracted version: ${PACKAGE_VERSION}"
# Find the swagger file
@giehlman
giehlman / .bash_profile
Created Dec 3, 2017
Excerpt of my mostly used commands written in my bash_profile
View .bash_profile
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'
@giehlman
giehlman / eb-deploy-gradle.sh
Created Nov 21, 2017
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!
View eb-deploy-gradle.sh
#!/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
#==============================================================================
@giehlman
giehlman / lambda-publish-npm.sh
Last active Nov 21, 2017
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!
View lambda-publish-npm.sh
#!/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 $?
@giehlman
giehlman / lambda-publish.sh
Last active Apr 29, 2018
For gradle projects! Convenience script to build, pack and upload code to an AWS Lambda function, using the AWS CLI. For personal and experimental use only!
View lambda-publish.sh
#!/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 $?
@giehlman
giehlman / .htaccess
Created Nov 1, 2017
.htaccess snippet hiding some files, i.e. .git, .svn, etc.
View .htaccess
RedirectMatch 404 (?i)\.git
RedirectMatch 404 (?i)\.svn
RedirectMatch 404 (?i)/\..+
RedirectMatch 404 (?i)\_.+
You can’t perform that action at this time.