Skip to content

Instantly share code, notes, and snippets.

View alexcpn's full-sized avatar

Alex Punnen alexcpn

View GitHub Profile
@alexcpn
alexcpn / minio in k8s
Last active October 15, 2020 07:07
Deploying sample Mino S3 in Kuberentes cluster
apiVersion: apps/v1
kind: Deployment
metadata:
# This name uniquely identifies the Deployment
name: minio
namespace: minio
spec:
selector:
matchLabels:
app: minio # has to match .spec.template.metadata.labels
@alexcpn
alexcpn / Velero-Restic-CSI tests.md
Last active February 23, 2023 07:43
Test of Velero Restic based bacup of PV,PVCs, CSI Snapshot , StatefulSets etc from one cluster to another
[root@green--1 velero]# velero backup logs test-nginx-b2 | grep error
time="2020-08-05T12:39:04Z" level=error msg="Error getting volume snapshotter for volume snapshot location" backup=velero/test-nginx-b2 error="rpc error: code = Unknown desc = missing region in aws configuration" error.file="/go/src/github.com/vmware-tanzu/velero-plugin-for-aws/velero-plugin-for-aws/volume_snapshotter.go:78" error.function="main.(*VolumeSnapshotter).Init" logSource="pkg/backup/item_backupper.go:437" name=pvc-a7a87cee-abb2-4db8-a445-fc95b4f8a237 namespace= persistentVolume=pvc-a7a87cee-abb2-4db8-a445-fc95b4f8a237 resource=persistentvolumes volumeSnapshotLocation=default
[root@green--1 velero]#
----
Solution edit VolumeSnapshotClass
k edit VolumeSnapshotLocation -n velero
```
// ---------------------------------------------------------------- //
// Arduino Ultrasoninc Sensor HC-SR04
// Re-writed by Arbi Abdul Jabbaar
// Using Arduino IDE 1.8.7
// Using HC-SR04 Module
// Tested on 17 September 2019
// ---------------------------------------------------------------- //
#include <Arduino.h>
#include <SoftwareSerial.h>
@alexcpn
alexcpn / minios3ceph.md
Last active May 12, 2024 22:19
Mino S3 Gateway(GUI) for Ceph backed S3

Mino S3 Gateway(GUI) for Ceph backed S3

Step 1: Installing S3 on Rook-Ceph

Follow https://rook.io/docs/rook/v1.4/ceph-object.html

Create the CephObjectStore as described above and then instead of creating a ObjectBucketCalim, create a CephObjectStoreUser

cat &lt;&lt; EOF | kubectl apply -f -
// in := [][]int{{}} in := [][]int{{1,3},{2,3}}
// addtoEndofSliceArray(in,1)
// out=[[1]] out=[[1,3],[2,3,1]]
func addtoEndofSliceArray(in [][]int,element int)(out [][]int){
if len(in) >0 {
k :=in[len(in)-1]
k = append(k,element)
in = in[:len(in)-1]
in = append(in, k)
@alexcpn
alexcpn / haproxyIngressController.md
Last active April 12, 2021 14:51
Ofifical HAProxyIngress Controller for GRPC
package computerdatabase
import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
class BasicSimulation extends Simulation {
val httpProtocol = http.enableHttp2
@alexcpn
alexcpn / locust.py
Created April 22, 2021 08:44
Testing GRPC using locust test tool
import time
from locust import HttpUser, task, between
from locust.contrib.fasthttp import FastHttpUser
from locust import task, events, constant
from locust.runners import STATE_STOPPING, STATE_STOPPED, STATE_CLEANUP, WorkerRunner
import test_pb2
import test_pb2_grpc
import grpc
import gevent
import sys
@alexcpn
alexcpn / explain_neuralnet_asifiama_-schoolkid_2.ipynb
Created April 29, 2021 04:39
explain_neuralnet_asifiama_ schoolkid_2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.