Skip to content

Instantly share code, notes, and snippets.

@veny
veny / Vagrantfile
Last active December 14, 2018 11:55
Vagrant based K8s cluster on CentOS/7
# Author: vaclav.sykora@oracle.com
# Description: Installs Docker Engine and setup Kubernetes cluster
#
# Optional plugins:
# vagrant-proxyconf (if you don't have direct access to the Internet)
# see https://github.com/tmatilai/vagrant-proxyconf for configuration
#
# Usage:
# > vagrant plugin install vagrant-proxyconf # optional, in case you are behind a corporate proxy server
# > vagrant init # optional, just to initialize the current directory to be a Vagrant environment
@veny
veny / gist:6c72c7bf89fd464b28c7512d2c472a5e
Last active February 27, 2021 17:57
PHP, RSA, Encrypt/Decrypt
<?php
// generate private/public key as follows:
// > openssl genrsa -out private.pem 2048
// > openssl rsa -in private.pem -outform PEM -pubout -out public.pem
$data = "String to encrypt";
$privKey = openssl_pkey_get_private('file:///path/to/private.pem');
$encryptedData = "";
@veny
veny / Spotify, Linux, Ruby, D-Bus, Lyrics
Last active August 29, 2015 14:12
This script opens lyrics of a song currently played by Spotify in default browser (for Linux, using Ruby and D-Bus).
#!/usr/bin/ruby
# This script opens lyrics of a song currently played by Spotify in default browser
# (for Linux, using Ruby and D-Bus).
#
# @see https://bbs.archlinux.org/viewtopic.php?id=134635
# @see https://github.com/mvidner/ruby-dbus
#
# Author:: Vaclav Sykora (mailto:vaclav.sykora@gmail.com)