Skip to content

Instantly share code, notes, and snippets.

Alexander Pyatkin aspyatkin

View GitHub Profile
@aspyatkin
aspyatkin / generate_csr.rb
Last active Mar 20, 2019
Generate X509 CSR with SAN extension in Ruby
View generate_csr.rb
require 'openssl'
# Generate X509 CSR (certificate signing request) with SAN (Subject Alternative Name) extension and sign it with the RSA key
def generate_csr(common_name, organization, country, state_name, locality, domain_list)
# create signing key
signing_key = OpenSSL::PKey::RSA.new 2048
# create certificate subject
subject = OpenSSL::X509::Name.new [
['CN', common_name],
View berkshelf-4.0.1-cygwin-x64.md

Installing Berkshelf 4.0.1 on Cygwin x64

Prerequisites

Installation

Install Gecode

Obtain Gecode tarball

$ curl -O http://www.gecode.org/download/gecode-3.7.3.tar.gz
$ tar zxvf gecode-3.7.3.tar.gz
View ruby-2.2.4-cygwin-x64.md

Installing Ruby 2.2.4 on Cygwin x64

Prerequisites

Installation

Install essential packages

The following packages should be installed with apt-cyg:

  • git
  • gcc-core
@aspyatkin
aspyatkin / ruby-2.3.0-cygwin-x64.md
Last active Mar 5, 2019
Ruby 2.3.0 on Cygwin x64
View ruby-2.3.0-cygwin-x64.md

Installing Ruby 2.3.0 on Cygwin x64

Warning!

You won't get a fully-functional installation! At the time of writing, it turned out gem is kind of broken on Ruby 2.3.0. Ruby gem installation fails with an error like kernel_require.rb:54:in require': cannot load such file -- win32/resolv`.

Prerequisites

Installation

Install essential packages

View keybase.md

Keybase proof

I hereby claim:

  • I am aspyatkin on github.
  • I am aspyatkin (https://keybase.io/aspyatkin) on keybase.
  • I have a public key whose fingerprint is 092B ECDF 2385 8B3F 3E84 A6BE 6060 7C61 1D53 57A6

To claim this, I am signing this object:

You can’t perform that action at this time.