Skip to content

Instantly share code, notes, and snippets.

View byteshiva's full-sized avatar
🎯
Focusing

Siva byteshiva

🎯
Focusing
View GitHub Profile
@byteshiva
byteshiva / ceph-benaco.nix
Created May 21, 2024 13:33 — forked from nh2/ceph-benaco.nix
Open-sourcing Benaco's NixOS Ceph service module
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.ceph-benaco;
inherit (pkgs.callPackage ../helpers.nix {}) ensureUnitExists;
in
@byteshiva
byteshiva / rename-pictures.sh
Created December 15, 2023 11:43 — forked from jart/rename-pictures.sh
Shell script for renaming all images in a folder
#!/bin/sh
# rename-pictures.sh
# Author: Justine Tunney <jtunney@gmail.com>
# License: Apache 2.0
#
# This shell script can be used to ensure all the images in a folder
# have good descriptive filenames that are written in English. It's
# based on the Mistral 7b and LLaVA v1.5 models.
#
# For example, the following command:
@byteshiva
byteshiva / How to setup VirtualGL and TurboVNC on Ubuntu.md
Created November 20, 2023 13:23 — forked from cyberang3l/How to setup VirtualGL and TurboVNC on Ubuntu.md
Setup VirtualGL and TurboVNC on Ubuntu for OpenGL forwarding
@byteshiva
byteshiva / data_cleaning_customer_data_analysis_csv_parquet.ipynb
Last active March 31, 2023 15:09
Data_Cleaning_Customer_Data_Analysis_CSV_Parquet.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

New Year Gift - Curated List of Top 75 LeetCode Questions to Save Your Time

Facebook / Eng tech lead

140 Comments

New Year Gift to every fellow time-constrained engineer out there looking for a job, here's a list of the best LeetCode questions that teach you core concepts and techniques for each category/type of problems! Many other LeetCode questions are a mash of the techniques from these individual questions. I used this list in my last job hunt to only do the important questions.

Good luck and Happy New Year!

Array

@byteshiva
byteshiva / xdp.md
Created September 7, 2021 05:13 — forked from satrobit/xdp.md
Absolute Beginner's Guide to BCC, XDP, and eBPF

Introduction

If you're reading this, chances are you have some idea of eBPF and XDP. In this article, we'll write an eBPF program that will count and categorize packets based on the destination port.

eBPF

Writing low-level tracing, monitoring, or network programs in Linux is not easy. Through all the layers of the kernel, people have been squeezing every bit of performance they could get.

And that's where eBPF comes in. eBPF is basically an extended and modern variation of BPF which is like a virtual machine inside the Linux kernel. It can execute user-defined programs inside a sandbox in the kernel.

These programs can be executed in various hook points but we will focus on XDP for now.

@byteshiva
byteshiva / configure_docker0.sh
Created May 31, 2021 14:43 — forked from kamermans/configure_docker0.sh
Change the IP subnet of Docker's docker0 interface
#!/bin/sh -e
#
# NOTE: Since Docker 1.10 (February 4, 2016), it has been possible to configure the
# Docker daemon using a JSON config file. On Linux, this file is normally located at
# /etc/docker/daemon.json. You should use this JSON config method if you are running
# a version of Docker that is at least 1.10!
# Here is an example configuration that sets the docker0 bridge IP to 192.168.254.1/24:
# {
# "bip": "192.168.254.1/24"
# }
@byteshiva
byteshiva / setWebhook-telegram.txt
Created April 16, 2021 05:52 — forked from haxpor/setWebhook-telegram.txt
How to set webhook url for bot on Telegram
https://api.telegram.org/bot<bot-token>/setWebhook?url=<webhook-url>
<bot-token> - bot token get from BotFather on Telegram
<webhook-url> - webhook url in base64
@byteshiva
byteshiva / eleventy_build.yml
Created April 12, 2021 15:39 — forked from hardfire/eleventy_build.yml
Use this action to build an eleventy site and push to gh-pages
name: Eleventy Build
on: [push]
jobs:
build_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Build using node.ks
uses: actions/setup-node@v1