Skip to content

Instantly share code, notes, and snippets.

View prashant-shahi's full-sized avatar
:shipit:
Working remotely

Prashant Shahi prashant-shahi

:shipit:
Working remotely
View GitHub Profile
@sanketsudake
sanketsudake / kind-kubernetes-metrics-server.md
Last active April 5, 2024 07:06
Running metric-server on Kind Kubernetes

I have created a local Kubernetes cluster with kind. Following are changes you need to get metric-server running on Kind.

Deploy latest metric-server release.

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.5.0/components.yaml

Within existing arguments to metric-server container, you need to add argument --kubelet-insecure-tls.

@witmin
witmin / ffmpeg-mp4-to-animated-webp.md
Last active April 20, 2024 23:49
Convert MP4 file to animated WebP in ffmpeg

Convert MP4 file to animated WEBP file in ffmpeg CLI

1. Install ffmpeg CLI through homebrew

In terminal.app, install ffmpeg through homebrew

brew install ffmpeg

Validate the installation:

@prashant-shahi
prashant-shahi / The Technical Interview Cheat Sheet.md
Last active May 2, 2021 15:10 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Big-O Complexity Chart

Data Structure Basics

Common Data Structure operations

@prashant-shahi
prashant-shahi / instruction.md
Created March 4, 2019 08:02
Increase or Decrease size of Virtual Machine (VM) in Google Cloud

Follow the steps to increase or decrease the size of VM in Google Cloud :

  1. Goto https://console.cloud.google.com
  2. Goto Compute Engine tab, followed by VM Instances.
  3. Select the VM for which you want to increase/decrease the disk size.
  4. Under Boot disk, you will see one(or more) disks for the VM. Click on one for which you desire to update disk size.
  5. Click Edit in the top. Then, modify the Size. At last, click on save.
  6. Now, we just need to tell the OS to grow the partition to the total size. This can be done by executing following commands :
fdisk -l
growpart /dev/sda 1
@qoomon
qoomon / conventional_commit_messages.md
Last active May 3, 2024 21:49
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@LinuxDevOpsGirl
LinuxDevOpsGirl / anydeskuninstall.sh
Created October 27, 2018 11:57
Uninstall AnyDesk & Install New AnyDesk Ubuntu 16 64 bit Machine
sudo apt-get purge anydesk
sudo apt-get autoclean
sudo apt-get autoremove
sudo apt update
sudo apt list --upgradable
sudo apt upgrade -y
https://download.anydesk.com/linux/anydesk_4.0.0-1_amd64.deb
sudo dpkg -i anydesk_4.0.0-1_amd64.deb
sudo apt install -f
sudo apt update
import findspark
findspark.init("/opt/spark")
import random
from pyspark import SparkContext
sc = SparkContext(appName="EstimatePi")
def inside(p):
x, y = random.random(), random.random()
return x*x + y*y < 1
NUM_SAMPLES = 1000000
count = sc.parallelize(range(0, NUM_SAMPLES)) \
@sanchezzzhak
sanchezzzhak / clickhouse-get-tables-size.sql
Created January 18, 2018 13:43
clickhouse get tables size
SELECT table,
formatReadableSize(sum(bytes)) as size,
min(min_date) as min_date,
max(max_date) as max_date
FROM system.parts
WHERE active
GROUP BY table
@alanbsmith
alanbsmith / papercall-cfp-outline.md
Last active May 11, 2021 06:54
PaperCall.io CFP Outline

CFP Outline

an outline for talks to be submitted to PaperCall.io

OVERVIEW

This document is a collection of resources and helpful information for writing a good CFP. Many of the notes and tips are direct quotes from the resources listed below. They are mostly notes I took as I read. The outline itself is formatted for PaperCall.io, and the italicized notes are from their site as well.

GENERAL TIPS

@marwei
marwei / how_to_reset_kafka_consumer_group_offset.md
Created November 9, 2017 23:39
How to Reset Kafka Consumer Group Offset

Kafka 0.11.0.0 (Confluent 3.3.0) added support to manipulate offsets for a consumer group via cli kafka-consumer-groups command.

  1. List the topics to which the group is subscribed
kafka-consumer-groups --bootstrap-server <kafkahost:port> --group <group_id> --describe

Note the values under "CURRENT-OFFSET" and "LOG-END-OFFSET". "CURRENT-OFFSET" is the offset where this consumer group is currently at in each of the partitions.

  1. Reset the consumer offset for a topic (preview)