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 / main.go
Last active May 11, 2024 09:14
go time ticker and context timeout
package main
import (
"context"
"fmt"
"os"
"os/signal"
"syscall"
"time"
)
@dipankardas011
dipankardas011 / main.go
Last active May 3, 2024 09:05
Without kubernetes service exposed how to get http client connect?
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
"net/http"
"os"
@dipankardas011
dipankardas011 / .zshrc
Created February 29, 2024 09:48
zshrc-server
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH=$HOME/.local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
ZSH_THEME="gnzh"
plugins=(git z)
@dipankardas011
dipankardas011 / README.md
Created February 18, 2024 05:08
Open Build Service By OpenSuse

Open Build Service By OpenSuse (Automation)

@dipankardas011
dipankardas011 / README.md
Last active January 24, 2024 15:27
automate-creation-self-signed-tls-certs
@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 👍

@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

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 / configuration for nix.md
Last active June 19, 2024 14:30
nixos configuration for i3 basic /etc/nixos/configuration.nix