Skip to content

Instantly share code, notes, and snippets.

View dipankardas011's full-sized avatar
:octocat:
Hustling

Dipankar Das dipankardas011

:octocat:
Hustling
View GitHub Profile
@dipankardas011
dipankardas011 / copy.c
Created January 13, 2022 11:07
Linux system utility commands in C programming language E.g. cp, mv
/***
* @author Dipankar Das
* cc -o util copy.c
*
* ./util cp <source> <destination>
*
* ./util mv <source> <destination>
*/
#include <stdio.h>
@dipankardas011
dipankardas011 / HuggingFace Dockerfile
Last active June 10, 2023 11:44
kubesimplify-hugging-face
# Use the official Python 3.9 image
FROM python:3.9
# Set the working directory to /code
WORKDIR /code
# Copy the current directory contents into the container at /code
COPY ./requirements.txt /code/requirements.txt
# Install requirements.txt
[Watch the video in YouTube<br> ![thumbnail](http://img.youtube.com/vi/6-UJzEXMvGY/0.jpg)](https://youtu.be/6-UJzEXMvGY)
###########################
# IT IS ONLY
# INSTRUCTIONS (NOT MENT TO BE EXECUTABLE DIRECTLY)
###########################
# reference: https://gist.github.com/saiyam1814/c3e91322441fdb53bbf5958b943a41f3
# 192.168.1.6 kubeadm-cp-1-5db6-f1562d
# 192.168.1.7 kubeadm-cp-2-11ce-f1562d
# 192.168.1.8 kubeadm-cp-3-16c3-f1562d
@dipankardas011
dipankardas011 / Dockerfile-Rust-wasi-wasm
Created June 12, 2023 16:33
Wasi dockerfile for rust
FROM --platform=$BUILDPLATFORM rust:1.64 AS buildbase
WORKDIR /src
RUN <<EOT bash
set -ex
apt-get update
apt-get install -y git clang
rustup target add wasm32-wasi
EOT
FROM buildbase AS build
@dipankardas011
dipankardas011 / configuration for nix.md
Last active June 19, 2024 14:30
nixos configuration for i3 basic /etc/nixos/configuration.nix

here is command to resolve it in fedora

   sudo nmcli connection modify <connection_name> ipv4.dns "8.8.8.8, 8.8.4.4"
   sudo nmcli connection modify <connection_name> ipv4.ignore-auto-dns yes
   
      sudo nmcli connection down <connection_name>
   sudo nmcli connection up <connection_name>
@dipankardas011
dipankardas011 / README.md
Created September 26, 2023 06:09
Avoid Null pointer issues in go

used a interface called Option[T any] which helps in defining the types

image

@dipankardas011
dipankardas011 / README.md
Last active December 21, 2023 17:19
Simple example of using go channels with context and having graceful termination

This gist provides a simple way to try out graceful termination

If any errors are there feel free to comment down below, I happy to fix them 👍