Skip to content

Instantly share code, notes, and snippets.

Rias A. Sherzad riy

Block or report user

Report or block riy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
riy /
Last active Aug 3, 2018 — forked from jimzucker/
Install Oracle instant client (sqlplus) v12.1 on MacOSX

Install Oracle instant client (sqlplus) on MacOSX (including High Sierra, as of August 2018)

  1. Get the Oracle instant client for MacOSX
  1. Unarchive downloaded zip files into the same directory
  • ex: $HOME/Downloads/instantclient_12_2
  1. Create, copy the content below into that file, run chmod +x and execute it as sudo.
riy /
Created Aug 3, 2018 — forked from mmasashi/
Install Oracle instant client (sqlplus) v12.1 on MacOSX

Install Oracle instant client (sqlplus) on MacOSX

  1. Get Oracle instant client for MacOSX
  1. Unarchive downloaded zip files into a same directory
  • ex: $HOME/Downloads/instantclient_12_1
  1. Create and copy the following code and past it on that file.
riy /
Created Jul 4, 2018 — forked from yetanotherchris/
RabbitMQ on Docker with admin UI
# AWS specific install of Docker
sudo yum update -y
sudo yum install -y docker
sudo service docker start
sudo usermod -a -G docker ec2-user
# exit the SSH session, login again
# Docker
docker run -d --hostname my-rabbit --name some-rabbit -p 4369:4369 -p 5671:5671 -p 5672:5672 -p 15672:15672 rabbitmq
View ant-copy-from-gradle.gradle
ant.copy(todir: '/copy/to/dir', encoding: 'UTF-8', outputEncoding: 'Windows-31J') {
fileset(dir: '/copy/from/dir')
riy /
Created Jun 6, 2018 — forked from ewjoachim/
Stop docker containers older than 1 day old
#!/bin/bash -eux
yesterday=$(date -d yesterday +%s)
# dnsdock should not be stopped : we limit to the containers created after it
docker ps --filter since=dnsdock -q --format "{{.ID}} {{.CreatedAt}}" | while read line
# line looks like:
# 123456789abcdef 2017-01-01 00:00:00 +02:00 CEST
set $line
riy /
Created May 3, 2018 — forked from hgomez/
Mass install/update of Jenkins Plugins

Scripted Jenkins Plugins install

Jenkins has a very rich catalog of plugins and it's quite easy to install and update them via UI. BTW, when you want to add tons of plugin via UI, it's a fairly long and boring procedure.

Hopefully, mass installation (or update) could be easy using a simple bash script (curl/python required) :

Create a file containing plugins to be installed (or updated), ie iplugins :

View gist:2997c84da5960e08afa8ea9806af4c5f
## Useful Commands
Get kubectl version
kubectl version
Get cluster info:
riy /
Created Feb 13, 2018 — forked from bradrydzewski/
Generate trusted CA certificates for running Docker with HTTPS
# Generates client and server certificates used to enable HTTPS
# remote authentication to a Docker daemon.
# See
# To start the Docker Daemon:
# sudo docker -d \
riy / woo-orderdetails-on-thankyou-page.php
Last active Jul 13, 2017
WooCommerce Plugin: Order Details on "Thank You" Page As Global JavaScript variables
View woo-orderdetails-on-thankyou-page.php
* Plugin Name: Order Details on Thank You Page
* Version: 1.0
* Author: Rias A. Sherzad
* Description: This plugin will export some order details on the thank you page as global JavaScript variables, e.g. for accessing them from Google Tag Manager
if (!defined('ABSPATH'))
riy /
Last active Jan 16, 2016
Create Docker Certificate Authority, Server and Client Certificates
HOST_IP=`ifconfig eth0| awk '/inet addr/{print substr($2,6)}'`
mkdir docker-ca
chmod 0700 docker-ca
cd docker-ca
openssl genrsa -aes256 -out ca-key.pem 2048
openssl req -new -x509 -days 365 -key ca-key.pem -sha256 -out ca.pem
openssl genrsa -out server-key.pem 2048
openssl req -subj "/CN=${HOST_IP}" -new -key server-key.pem -out server.csr
You can’t perform that action at this time.