Skip to content

Instantly share code, notes, and snippets.

View os3albert's full-sized avatar
🎯
Focusing

Albert Bici os3albert

🎯
Focusing
View GitHub Profile
@vepo
vepo / curl-with-java-keystore.md
Last active March 13, 2024 08:52 — forked from Hakky54/curl-with-java-keystore.md
Curl with Java KeyStore

cURL with Java Keystore/Truststore

Curl doesn't have support for java keystore file, so therefor the file should be converted to a PEM format. It consists of the following multiple steps:

  1. Convert keystore to p12 file
  2. Convert p12 file to pem file
  3. Run curl command with pem files

Convert keystore to p12 file

@odan
odan / nginx-php-windows-setup.md
Last active April 23, 2024 05:23
Nginx and PHP Setup on Windows

Nginx and PHP Setup on Windows

For local development you could also use Nginx with PHP as an replacement for XAMPP.

Install Nginx

@Hakky54
Hakky54 / curl-with-java-keystore.md
Last active March 13, 2024 08:52
Curl with Java KeyStore

Curl with Java KeyStore

Curl doesn't have support for java keystore file, so therefor the file should be converted to a PEM format. It consists of the following multiple steps:

  1. Convert keystore to p12 file
  2. Convert p12 file to pem file
  3. Run curl command with pem files

One way TLS/SSL/Authentication

Convert keystore to p12 file

@Eng-Fouad
Eng-Fouad / ssl-certs.md
Last active January 17, 2024 17:22
Generate self-signed PKCS#12 SSL certificate and export its keys using Java keytool and openssl.

Steps to generate self-signed PKCS#12 SSL certificate and export its keys:

1- Create PKCS#12 keystore (.p12 or .pfx file)

keytool -genkeypair -keystore myKeystore.p12 -storetype PKCS12 -storepass MY_PASSWORD -alias KEYSTORE_ENTRY -keyalg RSA -keysize 2048 -validity 99999 -dname "CN=My SSL Certificate, OU=My Team, O=My Company, L=My City, ST=My State, C=SA" -ext san=dns:mydomain.com,dns:localhost,ip:127.0.0.1
  • myKeystore.p12 = keystore filename. It can with .pfx extension as well.
  • MY_PASSWORD = password used for the keystore and the private key as well.
  • CN = commonName, it will be shown as certiciate name in certificates list.
  • OU = organizationUnit, department name for example.
@odan
odan / xampp_php7_xdebug.md
Last active April 17, 2024 05:36
Installing Xdebug for XAMPP
@subfuzion
subfuzion / global-gitignore.md
Last active April 23, 2024 22:47
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file:

  • Create a file called .gitignore in your home directory and add any filepath patterns you want to ignore.
  • Tell git where your global gitignore file is.

Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute .config/git/ignore for .gitignore in your home directory, if you prefer.

@RobertAudi
RobertAudi / ideavimrc
Created July 28, 2014 08:46
System clipboard support in IdeaVim
nnoremap yy "+yy
vnoremap y "+y
nnoremap p "+p
vnoremap p "+p
nnoremap P "+P
vnoremap P "+P
@soarez
soarez / ca.md
Last active April 22, 2024 03:01
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@shamil
shamil / gist:2165160
Created March 22, 2012 22:35 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -out ca.key 2048
openssl req -new -x509 -days 365 -key ca.key -out ca.crt

Create the Client Key and CSR

@mtigas
mtigas / gist:952344
Last active April 3, 2024 07:57
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes: