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 / extarct_files_vdi.md
Created April 13, 2020 05:39
Extract files from VDI linux

Introduction

We have problem that not able to run virtual box machine due to some windows VTX lock issue, so then I decided why not to run new machine using hyper-V, but what about the disk data. Here I am explaining how to get your data easily.

There may be multiple type of disk:

1. Linux plain partition disk:

Use 7zip to open vdi file, you can easily get the file content, then extract it.

@varunpalekar
varunpalekar / git-crypt
Created March 5, 2020 15:08
git-crypt.md
Simple command to see git-crypt is working
==========================================
`git-crypt status */ | grep gpg | tee >( cut -d: -f 2 | xargs file )`
@varunpalekar
varunpalekar / README.md
Last active July 10, 2019 09:11
DevOps points for starting

Part 1

  1. Virtualbox with vagrant
    1. Creating a ubuntu 16.04 machine
    2. Setting up private ethernet by ubuntu network manager (not vagrant)
    3. Tune virtualbox by vagrant file (increase ram and CPU count)
  2. Process lookout
  3. Memory Lookout
  4. Deploy application
@varunpalekar
varunpalekar / gitlab-registry-delete.py
Created July 2, 2019 10:06
python script to delete all repository registry of gitlab
import requests
api_token = "secret_token"
res = requests.get("https://gitlab.com/api/v4/projects/8525642/registry/repositories",
headers={"PRIVATE-TOKEN": api_token}
)
for rep in res.json():
print( rep['id'] )
@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"
  1. Create file /etc/init.d/tomcat8 with following content
#!/bin/bash
#
# tomcat8
#
# chkconfig: - 80 20
#
### BEGIN INIT INFO
@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"
}

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 / 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

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