Skip to content

Instantly share code, notes, and snippets.

View isawrub's full-sized avatar

Saurabh Chowdhury isawrub

View GitHub Profile
@isawrub
isawrub / git-branching-diagram.md
Created September 10, 2024 15:04 — forked from bryanbraun/git-branching-diagram.md
Example Git Branching Diagram

Example Git Branching Diagram

You can use this diagram as a template to create your own git branching diagrams. Here's how:

  1. Create a new diagram with diagrams.net (formerly draw.io)
  2. Go to File > Open From > URL
  3. Insert this url (it points to the xml data below): https://gist.github.com/bryanbraun/8c93e154a93a08794291df1fcdce6918/raw/bf563eb36c3623bb9e7e1faae349c5da802f9fed/template-data.xml
  4. Customize as needed for your team.

@isawrub
isawrub / HttpClient.cs
Created January 21, 2023 06:39 — forked from dfch/HttpClient.cs
HttpClient and how to use Headers, Content-Type and PostAsync
// HttpClient and how to use Headers, Content-Type and PostAsync
// http://d-fens.ch/2014/04/12/httpclient-and-how-to-use-headers-content-type-and-postasync/
// Copyright 2014-2015 Ronald Rink, d-fens GmbH
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
@isawrub
isawrub / [email protected]
Created October 9, 2022 11:21
PiHole Starter
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
127.0.0.1 local
255.255.255.255 broadcasthost
::1 localhost
::1 ip6-localhost
::1 ip6-loopback
fe80::1%lo0 localhost
ff00::0 ip6-localnet
ff00::0 ip6-mcastprefix
@isawrub
isawrub / [email protected]
Created October 8, 2022 13:49
Youtube Ad-Block List
# Mostly YouTube ad domains
0.0.0.0 www.googletagservices.com
0.0.0.0 www-googletagmanager.l.google.com
0.0.0.0 www-google-analytics.l.google.com
0.0.0.0 www.googleadservices.com
0.0.0.0 www.analytic-google.com
0.0.0.0 tpc.googlesyndication.com
0.0.0.0 stats.g.doubleclick.net
0.0.0.0 static.doubleclick.net
0.0.0.0 ssl.google-analytics.com

Oh My Zsh with autosuggestions & syntax-highlighting + PowerLevel10k.

Zsh?

Oh My Zsh is a framework for Zsh, the Z shell.

  • In order for Oh My Zsh to work, Zsh must be installed.
    • Please run zsh --version to confirm.
    • Expected result: zsh 5.0.8 or more recent
  • Additionally, Zsh should be set as your default shell.
  • Please run echo $SHELL from a new terminal to confirm.
@isawrub
isawrub / PowerShell Customization.md
Last active May 19, 2018 16:44 — forked from jchandra74/PowerShell Customization.md
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.

@isawrub
isawrub / git-aliases.md
Created January 27, 2017 17:22 — forked from mwhite/git-aliases.md
The Ultimate Git Alias Setup

The Ultimate Git Alias Setup

If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.

Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.

The simplest way to add an alias for a specific git command is to use a standard bash alias.

# .bashrc

Using SemaphoreSlim. This way you can also limit the number of concurrent tasks to be less than the actual number of sites, or add new sites on-the-fly. A CancellationToken is used to stop the processing from outside. The use of async void is justified here IMO, QueueSiteAsync keeps track of the tasks it starts. Looping Async Task List in C# on StackOverflow

@isawrub
isawrub / Extension.cs
Created September 8, 2015 12:02
NewLine Extensions
public static class StringExtensions
{
public static string RemoveLineBreaks( this string lines )
{
return lines.Replace( "\r", "").Replace( "\n", "" );
}
public static string ReplaceLineBreaks( this string lines, string replacement )
{
return lines.Replace( "\r\n", replacement )

Check if current data stream is Gzip encoded.