Skip to content

Instantly share code, notes, and snippets.

View aspyatkin's full-sized avatar

Aleksandr Piatkin aspyatkin

View GitHub Profile

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:

@aspyatkin
aspyatkin / ruby-2.3.0-cygwin-x64.md
Last active March 5, 2019 01:02
Ruby 2.3.0 on Cygwin x64

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

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

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
@aspyatkin
aspyatkin / generate_csr.rb
Last active October 7, 2023 18:20
Generate X509 CSR with SAN extension in Ruby
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],