Skip to content

Instantly share code, notes, and snippets.

View alogoc's full-sized avatar

Georgios Taranis alogoc

  • Prague, Czech Republic
View GitHub Profile
@alogoc
alogoc / Howto convert a PFX to a seperate .key & .crt file
Created July 25, 2018 16:59 — forked from TemporaryJam/Howto convert a PFX to a seperate .key & .crt file
How to convert a .pfx SSL certificate to .crt/key (pem) formats. Useful for NGINX
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]`
First, find the pulp_id for the repository having issues
foreman-rake console
> Katello::Repository.find(REPO_ID).pulp_id
Copy the value returned above, it should look like something crazy, e.g. Sat6-CI-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7Server
Now we alter mongo:
@alogoc
alogoc / shmsetup.sh
Created July 10, 2017 11:22 — forked from jodell/shmsetup.sh
kernel shared memory calculator
#!/bin/bash
# http://archives.postgresql.org/pgsql-admin/2010-05/msg00285.php
# Output lines suitable for sysctl configuration based
# on total amount of RAM on the system. The output
# will allow up to 50% of physical memory to be allocated
# into shared memory.
# On Linux, you can use it as follows (as root):
#
# ./shmsetup >> /etc/sysctl.conf