This file contains 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
plugins { | |
id 'maven-publish' | |
} | |
publishing { | |
repositories { | |
maven { | |
name = "GitHubPackages" | |
// Replace OWNER and REPOSITORY with your GitHub username/repository | |
// (must be both lowercase according to the documenations) |
This file contains 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
wget http://ipecho.net/plain -O - -q ; echo | |
# or add this to ~/.bash_aliases or ~/.zshrc in order to make the command available by the `ip` alias | |
# alias ip="wget http://ipecho.net/plain -O - -q ; echo" |
This file contains 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
# Add middlerwares to `settings.py` -> `MIDDLEWARE` array to enable them. | |
def log_request_headers_middleware(get_response): | |
""" | |
Middleware to log every request's header. | |
""" | |
def middleware(request): | |
print('REQUEST HEADERS:', request.headers) | |
response = get_response(request) | |
return response |
This file contains 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
# == | |
# ls | |
# == | |
alias ll='ls -alF' | |
alias la='ls -A' | |
alias l='ls -CF' | |
# ====== | |
# Docker | |
# ====== |
This file contains 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
.DS_Store | |
.idea | |
.gradle | |
*.iml | |
out | |
bin | |
build |
This file contains 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 | |
# Add java and gradle to path variable | |
export JAVA_HOME=/opt/java/openjdk | |
export GRADLE_HOME=/opt/gradle | |
export PATH=$PATH:$JAVA_HOME/bin:$GRADLE_HOME/bin | |
# Start MySQL server in background | |
docker-entrypoint.sh mysqld & | |
# Give MySQL server time to boot |
This file contains 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
FROM mysql:5 as sqldump | |
WORKDIR /home | |
# Copy required artifacts and source code | |
COPY initial.sql . | |
COPY java-program ./java-program | |
COPY sqldump.sh . | |
# Copy jdk11 and gradle from the gradle:jdk11 image | |
COPY --from=gradle:jdk11 /opt/java /opt/java |