Skip to content

Instantly share code, notes, and snippets.

@rudolfolah
rudolfolah / fix.sh
Last active February 29, 2024 04:18
update github author for commits, useful for older repos with inactive/non-github associated emails
# Preserves the date when updating all commits
git -c rebase.instructionFormat='%s%nexec GIT_COMMITTER_DATE="%cD" git commit --amend --no-edit --author "Your Name Goes Here <your-email@example.com>"' rebase -r --root
# Updates all commits from the current HEAD commit until the given commit hash
git rebase -r <commit> --exec 'git commit --amend --no-edit --author "Your Name Goes Here <your-email@example.com>"'
# You can update all commits, use only if all the commits are your own!
# git rebase -r --root --exec 'git commit --amend --no-edit --author "Your Name Goes Here <your-email@example.com>"'
# Source: https://stackoverflow.com/a/75841127
@rudolfolah
rudolfolah / Dockerfile
Created May 7, 2023 20:28
updates for Secure Coding with Django
FROM python:3.8
# install redis
RUN apt-get update && apt-get install -y redis-server
# copy the dependencies file to the working directory
COPY requirements.txt /app/requirements.txt
COPY demo /app/demo
COPY post_data.txt /app/post_data.txt
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
@rudolfolah
rudolfolah / check_tf.sh
Last active June 26, 2023 22:52
Code for checking Terraform configuration: runs the formatter, validator, linting and security checks
# Install:
# brew install tflint
# brew install tfsec
# brew install terraform
# nano /path/to/check_tf.sh
# chmod +x /path/to/check_tf.sh
#
# Usage:
# cd /path/to/terraform/tf_files
# tflint --init