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
# 1. docker build -t your_image_name . | |
# 2. Logon to DockerHub: docker login --username username --password password | |
# 3. docker tag my-image username/my-repo | |
# 4. docker push username/my-repo |
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 | |
rm $(docker inspect $1 | grep -G '"LogPath": "*"' | sed -e 's/.*"LogPath": "//g' | sed -e 's/",//g'); | |
# run this script like this: sudo ./docker-logs-clean.sh <container-name>; |
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
# Generate a Java keystore and key pair | |
keytool -genkey -alias mydomain -keyalg RSA -keystore keystore.jks -keysize 2048 | |
# Generate a certificate signing request (CSR) for an existing Java keystore | |
keytool -certreq -alias mydomain -keystore keystore.jks -file mydomain.csr | |
# Import a root or intermediate CA certificate to an existing Java keystore | |
keytool -import -trustcacerts -alias root -file Thawte.crt -keystore keystore.jks | |
# Import a signed primary certificate to an existing Java keystore |
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
Backup: | |
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql | |
Restore: | |
cat your_dump.sql | docker exec -i your-db-container psql -U postgres postgresDatabaseName |
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
apt -y update && apt install -y python-minimal |
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
# This describes a fix for: | |
# "Invalid Bundle - Disallowed LLVM instrumentation. Do not submit apps with LLVM profiling instrumentation or coverage collection enabled. Turn off LLVM profiling or code coverage, rebuild your app and resubmit the app." | |
# 1. Go to your Project root directory and run the following command: | |
carthage update | |
# 2. Set test-coverage for all frameworks to NO | |
grep -lR "codeCoverageEnabled" --include *.xcscheme --null Carthage | xargs -0 sed -i '' -e 's/codeCoverageEnabled = "YES"/codeCoverageEnabled = "NO"/g' | |
# 3. build your modified carthage checkouts/frameworks |
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
sudo rm -rf /usr/local/lib/ruby/gems/ && brew reinstall ruby |
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
1.36.59.75 [16/08/2017 12:00:00] | |
1.52.122.21 [16/08/2017 12:00:00] |
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
[Definition] | |
# Option: failregex | |
# Notes : Detection of blocked ip addresses. | |
# Values: TEXT | |
# | |
failregex = ^<HOST> \[.*\]$ | |
# Option: ignoreregex |
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
[ip-blacklist] | |
enabled = true | |
banaction = iptables-allports | |
port = anyport | |
filter = ip-blacklist | |
logpath = /etc/fail2ban/ip.blacklist | |
maxretry = 0 | |
findtime = 15552000 | |
bantime = -1 |