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
riy / README.md
Last active Aug 3, 2018 — forked from jimzucker/README.md
Install Oracle instant client (sqlplus) v12.1 on MacOSX
View README.md

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 install.sh, copy the content below into that file, run chmod +x install.sh and execute it as sudo.
@riy
riy / README.md
Created Aug 3, 2018 — forked from mmasashi/README.md
Install Oracle instant client (sqlplus) v12.1 on MacOSX
View README.md

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 install.sh and copy the following code and past it on that file.
@riy
riy / install-rabbitmq.sh
Created Jul 4, 2018 — forked from yetanotherchris/install-rabbitmq.sh
RabbitMQ on Docker with admin UI
View install-rabbitmq.sh
# 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
riy / stop-old-containers.sh
Created Jun 6, 2018 — forked from ewjoachim/stop-old-containers.sh
Stop docker containers older than 1 day old
View stop-old-containers.sh
#!/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
do
# line looks like:
# 123456789abcdef 2017-01-01 00:00:00 +02:00 CEST
set $line
id=$1
@riy
riy / jenkins-plugins-batch-install.md
Created May 3, 2018 — forked from hgomez/jenkins-plugins-batch-install.md
Mass install/update of Jenkins Plugins
View jenkins-plugins-batch-install.md

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
riy / generate_docker_cert.sh
Created Feb 13, 2018 — forked from bradrydzewski/generate_docker_cert.sh
Generate trusted CA certificates for running Docker with HTTPS
View generate_docker_cert.sh
#!/bin/bash
#
# Generates client and server certificates used to enable HTTPS
# remote authentication to a Docker daemon.
#
# See http://docs.docker.com/articles/https/
#
# To start the Docker Daemon:
#
# sudo docker -d \
@riy
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
<?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'))
{
exit;
@riy
riy / generate_docker_keys.sh
Last active Jan 16, 2016
Create Docker Certificate Authority, Server and Client Certificates
View generate_docker_keys.sh
#!/bin/bash
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.