Skip to content

Instantly share code, notes, and snippets.

View kameshsampath's full-sized avatar

Kamesh Sampath kameshsampath

View GitHub Profile
#!/bin/bash
set -e
minishift addon enable istio
minishift addon apply istio
#!/bin/bash
set -e
git clone https://github.com/minishift/minishift-addons
minishift addon install ./minishift-addons/add-ons/istio
@kameshsampath
kameshsampath / istio_minshift_profile.sh
Last active October 6, 2018 04:59
Commands required to setup minishift profile for Istio
#!/bin/bash
set -e
# Create a profile called "servicemesh"
minishift profile set servicemesh
# give the profile 8GB of memory
minishift config set memory 8GB
# give the profile 4 CPU
minishift config set cpus 4
# adding container image caching to allow faster profile setup

Run Strimzi on Minishift

As a cluster-admin user, with a correctly running Minishift, perform the following steps:

#!/usr/bin/env bash

# Turn colors in this script off by setting the NO_COLOR variable in your
# environment to any value:
#
@kameshsampath
kameshsampath / photobooth.html
Last active September 24, 2018 16:47
How to use fabricjs and HTML5 to create a image application
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Collaby by Code :: Demo Code for Photo and Filter</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- the javascript library used for build the Photo with Frames -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/2.3.6/fabric.min.js"></script>
@kameshsampath
kameshsampath / ow_promise_blog_working.js
Last active February 23, 2018 05:38
The working version of the api
'use strict';
const gmap = require('@google/maps');
function location(params) {
const latlng = JSON.parse(JSON.stringify(params.coords))
const gmapClient = gmap.createClient({
key: process.env.GOOGLE_MAPS_API_KEY,
@kameshsampath
kameshsampath / ow_promise_blog_blocked.js
Created February 23, 2018 05:30
This you should not do
'use strict';
const gmap = require('@google/maps');
function location(params) {
const latlng = JSON.parse(JSON.stringify(params.coords))
const gmapClient = gmap.createClient({
key: process.env.GOOGLE_MAPS_API_KEY
@kameshsampath
kameshsampath / ow_promise_blog_notworking.js
Last active February 23, 2018 05:30
The snippet to show whats the wrong code looks like
'use strict';
const gmap = require('@google/maps');
function location(params) {
const latlng = JSON.parse(JSON.stringify(params.coords))
const gmapClient = gmap.createClient({
key: process.env.GOOGLE_MAPS_API_KEY
})
gmapClient.reverseGeocode({
"latlng": latlng,
@kameshsampath
kameshsampath / Jenkinsfile
Last active February 13, 2018 09:19
OpenShift Maven Mirror Pod template Jenkinsfile
podTemplate(name: 'maven33', label: 'maven33', cloud: 'openshift',serviceAccount: 'jenkins', containers: [
containerTemplate(name: 'jnlp',
image: 'openshift/jenkins-slave-maven-centos7',
workingDir: '/tmp',
envVars: [
envVar(key: 'MAVEN_MIRROR_URL',value: 'http://nexus.infra:8081/nexus/content/groups/public/')
],
cmd: '',
args: '${computer.jnlpmac} ${computer.name}')
]){
@kameshsampath
kameshsampath / istio_clean.sh
Created December 8, 2017 12:28
Cleanup istio on OpenShift
#!/bin/bash
set -o pipefail
set -e
oc login -u system:admin
oc project istio-system