Skip to content

Instantly share code, notes, and snippets.

View naumvd95's full-sized avatar
🐙
breaking things, fixing things

Vladislav Naumov naumvd95

🐙
breaking things, fixing things
View GitHub Profile
@naumvd95
naumvd95 / lint-only-changed-files.MD
Created March 5, 2021 11:54 — forked from seeliang/lint-only-changed-files.MD
How to lint only changed files?

find out the differences

use git diff to generate file list

git diff --name-only master

limited to certain file types

add ext filter

git diff --name-only master | grep -E "(.js$|.ts$|.tsx$)"

@naumvd95
naumvd95 / auto_mke_support_dump.sh
Created February 22, 2021 15:14 — forked from Richard-Barrett/auto_mke_support_dump.sh
auto_mke_support_dump.sh
#!/bin/bash
# ============================================
# Created by: Richard Barrett
# Date Created: 11/11/2020
# Purpose: MKE Auto Collector for Support Dump
# Company: Mirantis
# ============================================
#set -e
# keep track of the last executed command
@naumvd95
naumvd95 / export-google-docs-to-restructured-text.js
Created February 18, 2021 13:55 — forked from simonw/export-google-docs-to-restructured-text.js
Google Apps script to convert a Google Docs document into reStructuredText
function onOpen() {
var ui = DocumentApp.getUi();
ui.createMenu('Convert to .RST')
.addItem('Convert to .RST and email me the result', 'ConvertToRestructuredText')
.addToUi();
}
// Adopted from https://github.com/mangini/gdocs2md by Renato Mangini
// License: Apache License Version 2.0
String.prototype.repeat = String.prototype.repeat || function(num) {
@naumvd95
naumvd95 / go_cpu_memory_profiling_benchmarks.sh
Created February 1, 2021 10:38 — forked from arsham/go_cpu_memory_profiling_benchmarks.sh
Go cpu and memory profiling benchmarks. #golang #benchmark
go test -run=. -bench=. -benchtime=5s -count 5 -benchmem -cpuprofile=cpu.out -memprofile=mem.out -trace=trace.out ./package | tee bench.txt
go tool pprof -http :8080 cpu.out
go tool pprof -http :8081 mem.out
go tool trace trace.out
go tool pprof $FILENAME.test cpu.out
# (pprof) list <func name>
# go get -u golang.org/x/perf/cmd/benchstat
benchstat bench.txt
@naumvd95
naumvd95 / README-Template.md
Created September 6, 2018 09:58 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@naumvd95
naumvd95 / cleanup_docker.sh
Created June 26, 2018 19:14 — forked from ralphtheninja/cleanup_docker.sh
Cleanup and reset docker on Jenkins workers / slaves
#!/bin/bash
# This script should be located on each Jenkins slave, and the jenkins user should have permission to run it with sudo
# Attempts to cleanly stop and remove all containers, volumes and images.
docker ps -q | xargs --no-run-if-empty docker stop
docker ps -q -a | xargs --no-run-if-empty docker rm --force --volumes
docker volume ls -q | xargs --no-run-if-empty docker volume rm
docker images -a -q | xargs --no-run-if-empty docker rmi -f
# Stops the docker service, unmounts all docker-related mounts, removes the entire docker directory, and starts docker again.
@naumvd95
naumvd95 / setup-gh-cli-auth-2fa.md
Created May 13, 2018 16:12 — forked from ateucher/setup-gh-cli-auth-2fa.md
Setup git on the CLI to use 2FA with GitHub

These are instructions for setting up git to authenticate with GitHub when you have 2-factor authentication set up. This authentication should be inherited by any GUI client you are using. These are intentionally brief instructions, with links to more detail in the appropriate places.

  1. Download and install the git command-line client (if required).

  2. Open the git bash window and introduce yourself to git (if required):

    git config --global user.name 'Firstname Lastname'
    git config --global user.email 'firstname.lastname@gov.bc.ca'
    
@naumvd95
naumvd95 / iterm2-solarized.md
Last active February 3, 2022 09:36 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@naumvd95
naumvd95 / AKS_public_ip
Last active March 22, 2018 11:37 — forked from tsaarni/README.md
How to connect to Azure AKS Kubernetes node VM by SSH
# How to connect to Azure AKS Kubernetes worker node by SSH
Nodes are not assigned public IP. If you have accessible VM in the same VNET as worker nodes,
then you can use that VM as jump host and connect the worker via private IP.
Alternatively public IP can be assigned to a worker node. This readme shows how to do that.
## Steps how to attach public IP to a worker node
find out the resource group that AKS created for the node VMs
@naumvd95
naumvd95 / gist:021227e3cb4761945be999faf0a8e9c7
Created March 7, 2018 10:36 — forked from jessedearing/gist:2351836
Create self-signed SSL certificate for Nginx
#!/bin/bash
echo "Generating an SSL private key to sign your certificate..."
openssl genrsa -des3 -out myssl.key 1024
echo "Generating a Certificate Signing Request..."
openssl req -new -key myssl.key -out myssl.csr
echo "Removing passphrase from key (for nginx)..."
cp myssl.key myssl.key.org
openssl rsa -in myssl.key.org -out myssl.key