Skip to content

Instantly share code, notes, and snippets.

View alexcpn's full-sized avatar

Alex Punnen alexcpn

View GitHub Profile
@alexcpn
alexcpn / ceph-cluster.yaml
Created March 11, 2020 11:51
ceph with block devices
[root@green--1 ~]# cat cluster-green.yaml
#################################################################################################################
# Define the settings for the rook-ceph cluster with settings that should only be used in a test environment.
# A single filestore OSD will be created in the dataDirHostPath.
# For example, to create the cluster:
# kubectl create -f common.yaml
# kubectl create -f operator.yaml
# kubectl create -f cluster-test.yaml
#################################################################################################################
apiVersion: ceph.rook.io/v1
@alexcpn
alexcpn / cassandra_green_statefulset.yaml
Last active April 1, 2020 10:00
Cassandra in Kuberenetes
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: cassandra
namespace: green
labels:
app: cassandra
spec:
serviceName: cassandra
replicas: 3
________________
> pulseaudio_ps_do
alex 1953 0.4 0.2 1332100 16788 ? S<l 19:13 0:03 /usr/bin/pulseaudio --start --log-target=syslog
alex 5319 0.0 0.0 11468 1008 pts/0 S+ 19:25 0:00 grep pulseaudio
________________
> which pulseaudio
/usr/bin/pulseaudio
________________
> pidof pulseaudio
1953
[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 / 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
// 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 / CMakeLists.txt
Last active April 18, 2021 05:16
CMake for GRPC Protobuffer C++
cmake_minimum_required(VERSION 3.3)
project(CvMat)
find_package(Protobuf 3.2 REQUIRED)
if ( NOT (PROTOBUF_FOUND))
message(FATAL_ERROR "Please Compile and Install ProtoBuffer -version 3 using GRPC C++: CMake will Exit")
endif()
set(CMAKE_BUILD_TYPE Debug)