Skip to content

Instantly share code, notes, and snippets.

View varunpalekar's full-sized avatar

Varun Palekar varunpalekar

  • Siemens
  • Pune
View GitHub Profile
@varunpalekar
varunpalekar / multiple image match.py
Last active April 22, 2020 15:51
OpenCV Python
import cv2
import pathlib
import datetime
import operator
import numpy as np
import pickle
detector = cv2.SURF(200)
norm = cv2.NORM_L2
FLANN_INDEX_KDTREE = 1
@varunpalekar
varunpalekar / create_deployment.md
Last active November 17, 2017 18:47
kubernetes

deployment-example.yml

---

apiVersion: extensions/v1beta1
kind: Deployment 
metadata:
   name: varun-test-deployment 

List all phases:

mvn help:describe -Dcmd=compile

@varunpalekar
varunpalekar / gitlab-ci.md
Last active November 1, 2017 19:02
gitlab

Download artifacts

You can download artifact through private-token or job_token of gitlab api.

1. Download latest artifact of a branch/ref

Project Name: gm%2Fcom

Ref/Branch name: develop

Compile Driver:

WIFI Adpater: RTL8192EU
OS: ubuntu 16.04
Kernal: 4.4.0-1079
Driver URL: https://github.com/masterzorag/RTL8192EU-linux/archive/v4.4.1_linux-4.11.zip
Hostapd URL: https://www.dropbox.com/s/4tmutshuy7k33a7/LEO-NANO300N%20linux%20driver.zip?dl=0
@varunpalekar
varunpalekar / helm
Last active July 24, 2018 13:35
Kubernetes and helm
1. install in current dir
`helm install --namespace=gm-integration -f values-integration.yaml .`
2. Upgrade
`helm upgrade "gm" -i --namespace=gm-integration -f values-integration.yaml .`
3. Delete purge

Installing minikube with vagrant

  1. Install vagrant-timezone plugin for vagrant to sync time
  2. Have following vagrant file
Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/xenial64"
  if Vagrant.has_plugin?("vagrant-timezone")
    config.timezone.value = :host
@varunpalekar
varunpalekar / Nginx_ingress_dashboard.json
Last active December 14, 2018 10:01
grafana dashboard
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
  1. Create file /etc/init.d/tomcat8 with following content
#!/bin/bash
#
# tomcat8
#
# chkconfig: - 80 20
#
### BEGIN INIT INFO
@varunpalekar
varunpalekar / trst.vba
Created December 16, 2018 20:05
Excel vba
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If TypeName(Range("A" & Selection.Row).Value) = "Date" Then
Select Case Selection.Column
Case 2, 3, 4
ActiveSheet.Unprotect Password:="123"
Target.Locked = True
ActiveSheet.Protect Password:="123"
If DateDiff("d", Range("A" & Selection.Row).Value, Now) = 0 Then
If DateDiff("n", Range("A" & Selection.Row).Value, Now) < 2 Then
ActiveSheet.Unprotect Password:="123"