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 | |
| ad_hosts_url="https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts" | |
| # The IP address below should point to the IP where blocked traffic should go | |
| # or to a non routable address such as 0.0.0.0 | |
| # OpenDNS block page | |
| # pixelserv_ip="146.112.61.104" | |
| # not routable address |
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
| [Unit] | |
| Description=Apache Kafka server (broker) | |
| Documentation=http://kafka.apache.org/documentation.html | |
| Requires=zookeeper.service network.target remote-fs.target | |
| After=zookeeper.service network.target remote-fs.target | |
| [Service] | |
| Type=forking | |
| PIDFile=/var/run/kafka.pid | |
| ExecStart=/home/user/bin/kafka start |
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
| ZOO_LOG4J_PROP="INFO,ROLLINGFILE" | |
| ZOO_LOG_DIR="/var/log/zookeeper/" |
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
| # /opt/zookeeper/conf/java.env | |
| ZOO_LOG4J_PROP="INFO,ROLLINGFILE" | |
| ZOO_LOG_DIR="/var/log/zookeeper/" |
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
| import java.io.IOException; | |
| import java.net.URLClassLoader; | |
| import java.nio.file.Files; | |
| import java.nio.file.Paths; | |
| import java.nio.file.Path; | |
| /** | |
| * Example demonstrating a ClassLoader leak. | |
| * | |
| * <p>To see it in action, copy this file to a temp directory somewhere, |
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
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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
| openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr | |
| http://support.godaddy.com/help/article/3601/generating-a-certificate-signing-request-nginx | |
| http://support.godaddy.com/help/article/4976/rekeying-an-ssl-certificate | |
| # Be sure to remember to chain them! | |
| cat gd_bundle-g2-g1.crt >> yourdomain.crt | |
| # Move 'em | |
| sudo mv yourdomain.crt /etc/ssl/certs/yourdomain.crt |
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
| source: http://www.markbrilman.nl/2011/08/howto-convert-a-pfx-to-a-seperate-key-crt-file/ | |
| `openssl pkcs12 -in [yourfile.pfx] -nocerts -out [keyfile-encrypted.key]` | |
| What this command does is extract the private key from the .pfx file. Once entered you need to type in the importpassword of the .pfx file. This is the password that you used to protect your keypair when you created your .pfx file. If you cannot remember it anymore you can just throw your .pfx file away, cause you won’t be able to import it again, anywhere!. Once you entered the import password OpenSSL requests you to type in another password, twice!. This new password will protect your .key file. | |
| Now let’s extract the certificate: | |
| `openssl pkcs12 -in [yourfile.pfx] -clcerts -nokeys -out [certificate.crt]` |
NewerOlder